Abi/Eabi/oabi

Source: Internet
Author: User
Abi/Eabi/oabi

Http://wiki.debian.org/ArmEabiPort
Armeabiport

(..............................)
Terminology

Strictly
Speaking, both the old and new arm Abis are subsets of the arm Eabi
Specification, but in everyday usage the term "Eabi" is used to mean
The new one described here and "oabi" or "old-Abi" to mean the old one. however, there are one or two programs that sometimes describe an old Abi binary as "Eabi ".
To add to the confusion,PowerPC has also had an ABI called "Eabi" for some, which has nothing to do with this one.
(..............................)
GCC View

New Abi is not only a new Abi field, it is alsoNew GCC target.

Legacy Abi
* Abi flags passed to binutils:-mabi = APCs-GNU-mfpu = FPA
* Gcc-dumpmachine: Arm-unknown-Linux
* Objdump-X for compiled binary:

Private flags = 2: [APCS-32] [FPA float format] [Has entry point]

* "File" on compiled Debian binary:

Elf
32-bit LSB executable, arm, Version 1 (ARM), for GNU/Linux 2.2.0,
Dynamically linked (uses SHARED libs), for GNU/Linux 2.2.0, stripped

* "Readelf-H | grep flags ""

Flags: 0x0

Arm Eabi:
* Abi flags passed by GCC to binutils:-mabi = aapcs-Linux-mfloat-Abi = soft-meabi = 4
* Gcc-dumpmachine: Arm-unknown-Linux-gnueabi
* Objdump-X for compiled binary:

Private flags = 4000002: [version4 Eabi] [Has entry point]

* "File" on compiled binary (under Debian ):

Elf
32-bit LSB executable, arm, Version 1 (sysv), for GNU/Linux 2.4.17,
Dynamically linked (uses SHARED libs), for GNU/Linux 2.4.17, stripped

* "Readelf-H | grep flags ""

Flags: 0x4000002, has entry point, version4 Eabi

Furthermore, as well as the usual _ arm _ and maybe also _ thumb _ symbols, the C Preprocessor symbol _ arm_eabi _ is also defined when compiling into Eabi.
(..............................)
Struct packing and alignment
With the new Abi,Default structure packing changes,
As do some default data sizes and alignment (which also have a knock-on
Effect on Structure packing). In particle the minimum size and
Alignment of a structure was 4 bytes.Under the Eabi there is no minimum and the alignment is determined by the types of the components it contains.
This will break programs that know too much about the way Structures
Are packed and can break code that writes binary files by dumping and
Reading structures.
(..............................)

Http://en.wikipedia.org/wiki/Application_binary_interface
Application binary interface (ABI)

Application binary interface (ABI) describes
The low-level interface between an application program and
Operating system, or the interface between an application and its
Libraries, or that between component parts of an application. An Abi is
Similar to an application programming interface (API); however,
Latter defines a source code interface. [1] Simply put, Abis enable
Binary Compatibility, whereas APIs enable source code compatibility.

For
Example, the POSIX standard defines an API that allows a wide range
Common computing functions to be written such that they may operate on
Hierarchical different systems (Mac OS X, varous bsds and Microsoft Windows
All implement this interface); however, making use of this requires
Re-compilation for each platform.A compatible Abi, on the other
Hand, allows compiled object code to function without any changes, on
Any system implementing that Abi.
This is advantageous to both
Software Providers (where they may distribute existing software on new
Systems without producing/distributing upgrades) and users (where they
May install older software on their new systems without purchasing
Upgrades), although this generally requires various software libraries
Implementing the necessary APIs too.

Abis cover details such
The calling convention, which controls how functions 'arguments are
Passed and return values retrieved; the system call numbers and how
Application shoshould make system cballs to the operating system; and in
The case of a complete operating system Abi, the binary format
Object files, program libraries and so on. A complete Abi, such as
Intel binary compatibility standard (IBCs), [2] allows a program from
One operating system supporting that Abi to run without modifications
On any other such system. Other Abis standardize details such as
C ++ name decoration, [3] Exception Propagation, [4] and calling
Convention between compilers on the same platform, but do not require
Cross-platform compatibility.

What is Eabi and how do I use it?
Http://www.applieddata.net/forums/topic.asp? Topic_id = 2305

What is Eabi?

GNU
Eabi is a new application binary interface (ABI) for Linux. It is part
Of a new family of Abi's from arm. Ltd. known in the arm-Linux
Community as Eabi (or sometimes embedded Abi ).

How do I use Eabi?

To use Eabi, you'll need:

  • A
    Linux Kernel that supports Eabi. All bitsyg5 kernels and boards that
    Run the latest 2.6 kernel are configured with Eabi support enabled. You
    Can boot these kernels from an ATA flash card or on-board flash just
    You wowould our regular kernels.
  • An Eabi root file system based on ads 'new Debian port which is available for download here.
    You can install this root on an NFS server or harddrive, just as you wowould our regular full Debian distribution.

The root file system has des an arm-Linux-gnueabi toolchain which you can use to recompile your own source code.

Why switch to Eabi?

According to Debian wiki the new Eabi:

  • Allows mixing softfloat and hardfloat code.
  • Uses a more efficient syscall convention.
  • Will be more compatible with future tools.

Furthermore, the GCC default for Eabi will be to use softfloat instructions for floating point arithmetic.

Traditionally, GCC used hardfloat FPA [1]
Instructions in arm-Linux software. Unfortunately, most arm Processors
Lack support for FPA and instead rely on the kernel for Floating Point
Emulation (FPE). They do this through illegal instruction faults which
Are rather inefficient. emulating floating point instructions using
Softfloat is significantly faster than the standard nwfpe used in most
Arm-linux kernels and appreciably faster than the fastfpe we use in our
Kernels.

Like most root file systems for ARM computers, Debian
Uses GCC's default for floating point operations. Prior to
Introduction of Eabi, the only way to use softfloat was to recompile
The entire root file system with softfloat enabled. Now, with an Eabi
Root file system, softfloat instructions will be used by defaultAndYou'll be able to mix hard and soft float executables.

In
The absence of FPA hardware, the switch to softfloat alone will offer
Appreciable performance improvement. additionaly, if your system has
Some non-FPA floating point hardware, You Can recompile critical
Software with the appropriate hardfloat instructions for an even
Greater improvement in performance and still be able to run it
Alongside software that uses softfloat.

Besides fpa, what other intruction sets are there?

We
Have or will have systems that use VFP (vector floating points ),
Maverick crunch (Cirrus Logic), and iwmmxt (Intel) instructions. (
Iwmmxt instructions are actually integer SIMD instructions but their
Opcodes overlap those for FPA ).

Http://unadventure.wordpress.com/2008/01/04/2-abi-translation/
2: Abi Translation

Why arm's Eabi matters
Http://www.linuxdevices.com/articles/AT5920399313.html
Http://www.chineselinuxuniversity.net/courses/embedded/introductions/6243.shtml
Http://emqbit.com/eabi-oabi-benchmark

The arm Eabi (Embedded Application binary Interface) improves the floating point performance. So, it's not striking if you read how your processor is wasting a lot of cycles now. From the Debian ARM-EABI wiki:

The current Debian port creates hardfloat FPA instructions. FPA comes
From "floating point accelerator". Since the FPA floating point unit
Was implemented only in very few arm cores, these days FPA instructions
Are emulated in kernel via illegal instruction faults. This is
Course very inefficient: about 10 times slower that-msoftfloat for
Fir test program. The FPA Unit also has the peculiarity of having
Mixed-Endian doubles, which is usually the biggest grief for ARM
Porters, along with structure packing issues.

So,
What does it mean? It means that the compilers usually generate
Inscructions for a piece of harware, namely a floating point unit that
Is not actually there!

So, when you make a floating point
Operation, such at 3.58 * X, the CPU runs into an illegal instruction,
And it raises an exception.

The kernel catches this specific
Exception and performs the intended float point operation, and then
Resumes executing the program. And this is slow because it implies
Context switch.

Http://zh-kernel.org/pipermail/linux-kernel/2008-January/002793.html
Re: About kernel arm_eabi

Eabi is an old Abi launched by arm company later called embeded Abi.
Called Old-Abi or legacy-Abi
In oabi, all these functions implement sys_ipc in Eabi through a system call.
So any Abi has no impact on the function.
The following are the differences between the two Abi types in system calling:
Take long ftruncate64 (unsigned int FD, loff_t length) as an example:

Legacy ABI:
-Put FD into R0
-Put length into r1-r2
-Use "SWI #(0x900000 + 194)" to call the kernel

New arm Eabi:
-Put FD into R0
-Put length into r2-r3 (skipping over R1)
-Put 194 into r7
-Use "SWI 0" to call the kernel

Http://www.oesf.org/index.php? Title = Q3: _ what_are_oabi_and_eabi % 3f
Q3: what are oabi and Eabi?
Q3: what are oabi and Eabi?
A3: they are two kinds of ABI (Application binary interface ). the 'O' stands for 'old', And the 'E' means 'embedded ', a new approach to API for portable devices like the zaurus.
GNU
Eabi is a new application binary interface (ABI) for Linux. It is part
Of a new family of Abi's from arm Ltd. known in the arm-Linux
Community as Eabi (or sometimes embedded Abi ).

According to Debian wiki the new Eabi:

* Allows mixing softfloat and hardfloat code.
* Uses a more efficient syscall convention.
* Will be more compatible with future tools.

Furthermore, the GCC default for Eabi will be to use softfloat instructions for floating point arithmetic.

Related Keywords:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.