0% found this document useful (0 votes)
2 views

Application_binary_interface

An application binary interface (ABI) is a low-level interface that defines how binary program modules interact, particularly between libraries and user programs. It includes specifications for data structures, calling conventions, and system calls, and is essential for maintaining compatibility across different compilers and operating systems. Embedded ABIs (EABIs) optimize performance for embedded systems by standardizing conventions for file formats and function parameter passing while minimizing resource usage.

Uploaded by

Void
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Application_binary_interface

An application binary interface (ABI) is a low-level interface that defines how binary program modules interact, particularly between libraries and user programs. It includes specifications for data structures, calling conventions, and system calls, and is essential for maintaining compatibility across different compilers and operating systems. Embedded ABIs (EABIs) optimize performance for embedded systems by standardizing conventions for file formats and function parameter passing while minimizing resource usage.

Uploaded by

Void
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Application binary interface

In computer software, an application binary


interface (ABI) is an interface between two binary
program modules. Often, one of these modules is a
library or operating system facility, and the other is a
program that is being run by a user.

An ABI defines how data structures or computational


routines are accessed in machine code, which is a
low-level, hardware-dependent format. In contrast, an
application programming interface (API) defines this
access in source code, which is a relatively high-level,
hardware-independent, often human-readable format.
A high-level comparison of in-kernel and kernel-
A common aspect of an ABI is the calling convention, to-userspace APIs and ABIs
which determines how data is provided as input to, or
read as output from, computational routines.
Examples of this are the x86 calling conventions.

Adhering to an ABI (which may or may not be


officially standardized) is usually the job of a
compiler, operating system, or library author.
However, an application programmer may have to
deal with an ABI directly when writing a program in a
mix of programming languages, or even compiling a
program written in the same language with different
compilers.

The Linux kernel and GNU C Library define the


Description Linux API. After compilation, the binaries offer an
ABI. Keeping this ABI stable over a long time is
important for ISVs.
Details covered by an ABI include the following:

Processor instruction set, with details like


register file structure, stack organization, memory access types, etc.
Sizes, layouts, and alignments of basic data types that the processor can directly access
Calling convention, which controls how the arguments of functions are passed, and return
values retrieved; for example, it controls the following:
Whether all parameters are passed on the stack, or some are passed in registers
Which registers are used for which function parameters
Whether the first function parameter passed on the stack is pushed first or last
Whether the caller or callee is responsible for cleaning up the stack after the function call
How an application should make system calls to the operating system, and if the ABI
specifies direct system calls rather than procedure calls to system call stubs, the system call
numbers
In the case of a complete operating system ABI, the binary format of object files, program
libraries, etc.

Complete ABIs
A complete ABI, such as the Intel Binary Compatibility Standard (iBCS),[1] allows a program from one
operating system supporting that ABI to run without modifications on any other such system, provided
that necessary shared libraries are present, and similar prerequisites are fulfilled.

ABIs can also standardize details such as the C++ name mangling,[2] exception propagation,[3] and
calling convention between compilers on the same platform, but do not require cross-platform
compatibility.

Embedded ABIs
An embedded-application binary interface (EABI) specifies standard conventions for file formats, data
types, register usage, stack frame organization, and function parameter passing of an embedded software
program, for use with an embedded operating system.

Compilers that support the EABI create object code that is compatible with code generated by other such
compilers, allowing developers to link libraries generated with one compiler with object code generated
with another compiler. Developers writing their own assembly language code may also interface with
assembly generated by a compliant compiler.

EABIs are designed to optimize for performance within the limited resources of an embedded system.
Therefore, EABIs omit most abstractions that are made between kernel and user code in complex
operating systems. For example, dynamic linking may be avoided to allow smaller executables and faster
loading, fixed register usage allows more compact stacks and kernel calls, and running the application in
privileged mode allows direct access to custom hardware operation without the indirection of calling a
device driver.[4] The choice of EABI can affect performance.[5][6]

Widely used EABIs include PowerPC,[4] Arm EABI[7] and MIPS EABI.[8] Specific software
implementations like the C library may impose additional limitations to form more concrete ABIs; one
example is the GNU OABI and EABI for ARM, both of which are subsets of the ARM EABI .[9]

See also
Computer
programming portal

Binary-code compatibility
Bytecode
Comparison of application virtualization software
Debug symbol
Foreign function interface
Language binding
Native (computing)
Opaque pointer
PowerOpen Environment
Symbol table
SWIG
Visual C++ ABI instability details

References
1. Intel Binary Compatibility Standard (iBCS) (http://www.everything2.com/index.pl?node=iBC
S)
2. "Itanium C++ ABI" (https://itanium-cxx-abi.github.io/cxx-abi/). (compatible with multiple
architectures)
3. "Itanium C++ ABI: Exception Handling" (http://itanium-cxx-abi.github.io/cxx-abi/abi-eh.html).
(compatible with multiple architectures)
4. "EABI Summary". PowerPC Embedded Application Binary Interface: 32-Bit Implementation
(http://www.nxp.com/docs/en/application-note/PPCEABI.pdf) (PDF) (Version 1.0 ed.).
Freescale Semiconductor, Inc. 1 October 1995. pp. 28–30.
5. "Debian ARM accelerates via EABI port" (https://web.archive.org/web/20070121183413/htt
p://www.linuxdevices.com/news/NS9048137234.html). Linuxdevices.com. 16 October 2016.
Archived from the original (http://linuxdevices.com/news/NS9048137234.html) on 21
January 2007. Retrieved 11 October 2007.
6. Andrés Calderón and Nelson Castillo (14 March 2007). "Why ARM's EABI matters" (https://
web.archive.org/web/20070331193917/http://www.linuxdevices.com/articles/AT5920399313.
html). Linuxdevices.com. Archived from the original (http://linuxdevices.com/articles/AT5920
399313.html) on 31 March 2007. Retrieved 11 October 2007.
7. "ABI for the Arm Architecture" (https://developer.arm.com/architectures/system-architecture
s/software-standards/abi). Developer.arm.com. Retrieved 4 February 2020.
8. Eric Christopher (11 June 2003). "mips eabi documentation" (https://sourceware.org/legacy-
ml/binutils/2003-06/msg00436.html). [email protected] (Mailing list). Retrieved
19 June 2020.
9. "ArmEabiPort" (https://wiki.debian.org/ArmEabiPort). Debian Wiki. "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."

External links
Policies/Binary Compatibility Issues With C++ (https://community.kde.org/Policies/Binary_Co
mpatibility_Issues_With_C%2B%2B) – a compendium of development rules of thumb for not
breaking binary compatibility between library releases
OS X ABI Function Call Guide (https://developer.apple.com/library/content/documentation/D
eveloperTools/Conceptual/LowLevelABI/000-Introduction/introduction.html)
Debian ARM EABI port (http://wiki.debian.org/ArmEabiPort)
μClib: Motorola 8/16-bit embedded ABI (http://www.uclibc.org/)
AMD64 (x86-64) Application Binary Interface (https://web.archive.org/web/2008052807080
3/http://www.x86-64.org/documentation.html) at the Wayback Machine (archived 2008-05-
28)
Application Binary Interface (ABI) for the ARM Architecture (http://infocenter.arm.com/help/in
dex.jsp?topic=/com.arm.doc.ihi0036b/index.html)
MIPS EABI documentation (https://sourceware.org/legacy-ml/binutils/2003-06/msg00436.ht
ml)
Sun Studio 10 Compilers and the AMD64 ABI (https://web.archive.org/web/2015011406544
4/http://www.oracle.com/technetwork/server-storage/solaris10/about-amd64-abi-141142.htm
l) at the Wayback Machine (archived 2015-01-14) – a summary and comparison of some
popular ABIs
M•CORE Applications Binary Interface Standards Manual (https://www.nxp.com/docs/en/ref
erence-manual/MCOREABISM.pdf) for the Freescale M·CORE processors

Retrieved from "https://en.wikipedia.org/w/index.php?title=Application_binary_interface&oldid=1258780468"

You might also like