
An application binary interface (ABI) is an
interface exposed by
software
Software consists of computer programs that instruct the Execution (computing), execution of a computer. Software also includes design documents and specifications.
The history of software is closely tied to the development of digital comput ...
that is defined for in-
process
A process is a series or set of activities that interact to produce a result; it may occur once-only or be recurrent or periodic.
Things called a process include:
Business and management
* Business process, activities that produce a specific s ...
machine code access. Often, the exposing software is a
library
A library is a collection of Book, books, and possibly other Document, materials and Media (communication), media, that is accessible for use by its members and members of allied institutions. Libraries provide physical (hard copies) or electron ...
, and the consumer is a
program.
An ABI is at a relatively low-level of
abstraction
Abstraction is a process where general rules and concepts are derived from the use and classifying of specific examples, literal (reality, real or Abstract and concrete, concrete) signifiers, first principles, or other methods.
"An abstraction" ...
. Interface compatibility depends on the target
hardware and the
software build toolchain. In contrast, an
application programming interface
An application programming interface (API) is a connection between computers or between computer programs. It is a type of software Interface (computing), interface, offering a service to other pieces of software. A document or standard that des ...
(API) defines access in
source code
In computing, source code, or simply code or source, is a plain text computer program written in a programming language. A programmer writes the human readable source code to control the behavior of a computer.
Since a computer, at base, only ...
which is a relatively high-level, hardware-independent, and
human-readable format. An API defines interface at the source code level, before compilation, whereas an ABI defines an interface to compiled code.
API compatibility is generally the concern for
system design and of the toolchain. However, a
programmer
A programmer, computer programmer or coder is an author of computer source code someone with skill in computer programming.
The professional titles Software development, ''software developer'' and Software engineering, ''software engineer' ...
may have to deal with an ABI directly when writing a program in a multiple
languages or
compiler
In computing, a compiler is a computer program that Translator (computing), translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primaril ...
s.
A complete ABI enables a program that supports an ABI to run without modification on multiple operating systems that provide the ABI. The target system must provide any required libraries (that implement the ABI), and there may be other prerequisites.
Description
Interface aspects covered by an ABI include:
*
Processor instruction set
In computer science, an instruction set architecture (ISA) is an abstract model that generally defines how software controls the CPU in a computer or a family of computers. A device or program that executes instructions described by that ISA, s ...
, with details like register file structure,
memory
Memory is the faculty of the mind by which data or information is encoded, stored, and retrieved when needed. It is the retention of information over time for the purpose of influencing future action. If past events could not be remembe ...
access types, etc.
* Size, layout, and
alignment of basic
data type
In computer science and computer programming, a data type (or simply type) is a collection or grouping of data values, usually specified by a set of possible values, a set of allowed operations on these values, and/or a representation of these ...
s 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:
** How the
call stack
In computer science, a call stack is a Stack (abstract data type), stack data structure that stores information about the active subroutines and block (programming), inline blocks of a computer program. This type of stack is also known as an exe ...
is organized
** Whether all parameters are passed on the call stack, or some are passed in registers
** Which registers are used for which function parameters
** Whether the first function parameter passed on the call stack is pushed first or last
** Whether the caller or callee is responsible for cleaning up the call stack after the function call
*
Name mangling
*
Exception propagation
* 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.
ABIs include the
Intel Binary Compatibility Standard (iBCS) and the
System V Release 4 ABIs for various instruction sets.
Embedded ABI
An embedded ABI (EABI), used on an
embedded operating system, specifies aspects such as
file format
A file format is a Computer standard, standard way that information is encoded for storage in a computer file. It specifies how bits are used to encode information in a digital storage medium. File formats may be either proprietary format, pr ...
s, data types, register usage,
stack frame organization, and function parameter passing of an
embedded software program.
Each compiler and
assembler that supports an EABI creates
object code that is compatible with code generated by other such compilers and assemblers. This allows developers to link libraries generated by one compiler with object code generated by another.
Typically, an EABI is optimized for performance for the limited resources of the target embedded system. Therefore, an EABI may omit abstractions between
kernel and user space typically found in
desktop operating systems. For example,
dynamic linking
In computing, a dynamic linker is the part of an operating system that loads and links the shared libraries needed by an executable when it is executed (at " run time"), by copying the content of libraries from persistent storage to RAM, fill ...
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.
The choice of EABI can affect performance.
Widely used EABIs include the
PowerPC
PowerPC (with the backronym Performance Optimization With Enhanced RISC – Performance Computing, sometimes abbreviated as PPC) is a reduced instruction set computer (RISC) instruction set architecture (ISA) created by the 1991 Apple Inc., App ...
,
Arm, and
MIPS EABIs. 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.
See also
*
*
*
*
*
*
*
*
*
*
*
*
Visual C++ Compatibility
References
External links
Policies/Binary Compatibility Issues With C++a compendium of development rules of thumb for not breaking binary compatibility between library releases
Debian ARM EABI portμClib: Motorola 8/16-bit embedded ABI*
* a summary and comparison of some popular ABIs
M•CORE Applications Binary Interface Standards Manualfor the Freescale
M·CORE M·CORE is a low-power, RISC-based microcontroller architecture developed by Motorola (subsequently Freescale, now part of NXP), intended for use in embedded systems. Introduced in late 1997, the architecture combines a 32-bit internal data pa ...
processors
{{Application binary interface
Application programming interfaces
Operating system technology