Application binary interface
Encyclopedia
In computer software
, an application binary interface (ABI) describes the low-level interface between an application (or any type of) program and the operating system
or another application.
, size, and alignment
; the calling convention
, which controls how functions' arguments are passed and return values retrieved; the system call
numbers and how an application should make system calls to the operating system; and in the case of a complete operating system ABI, the binary format of object file
s, program libraries and so on. A complete ABI, such as the Intel Binary Compatibility Standard (iBCS), 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.
Other ABIs standardize details such as the C++ name mangling, exception
propagation, and calling convention between compilers on the same platform, but do not require cross-platform compatibility.
An ABI should not be confused with an application programming interface
(API) which defines a library of routines to call, data structures to manipulate, and/or object classes to use in the construction of an application using that particular (often language specific) API.
s, data types, register usage, stack frame organization, and function parameter passing of an embedded
software program.
Compiler
s that support the EABI create object code
that is compatible with code generated by other such compilers, thus allowing developers to link libraries generated with one compiler with object code generated with a different compiler. Developers writing their own assembly language
code may also use the EABI to interface with assembly generated by a compliant compiler.
The main differences of an EABI with respect to an ABI for general purpose operating systems are that privileged instructions are allowed in application code, dynamic linking is not required (sometimes it is completely disallowed), and a more compact stack frame organization is used to save memory.
Widely used EABIs include PowerPC
and ARM
.
Computer software
Computer software, or just software, is a collection of computer programs and related data that provide the instructions for telling a computer what to do and how to do it....
, an application binary interface (ABI) describes the low-level interface between an application (or any type of) program and the operating system
Operating system
An operating system is a set of programs that manage computer hardware resources and provide common services for application software. The operating system is the most important type of system software in a computer system...
or another application.
Description
ABIs cover details such as data typeData type
In computer programming, a data type is a classification identifying one of various types of data, such as floating-point, integer, or Boolean, that determines the possible values for that type; the operations that can be done on values of that type; the meaning of the data; and the way values of...
, size, and alignment
Data structure alignment
Data structure alignment is the way data is arranged and accessed in computer memory. It consists of two separate but related issues: data alignment and data structure padding. When a modern computer reads from or writes to a memory address, it will do this in word sized chunks...
; the calling convention
Calling convention
In computer science, a calling convention is a scheme for how subroutines receive parameters from their caller and how they return a result; calling conventions can differ in:...
, which controls how functions' arguments are passed and return values retrieved; the system call
System call
In computing, a system call is how a program requests a service from an operating system's kernel. This may include hardware related services , creating and executing new processes, and communicating with integral kernel services...
numbers and how an application should make system calls to the operating system; and in the case of a complete operating system ABI, the binary format of object file
Object file
An object file is a file containing relocatable format machine code that is usually not directly executable. Object files are produced by an assembler, compiler, or other language translator, and used as input to the linker....
s, program libraries and so on. A complete ABI, such as the Intel Binary Compatibility Standard (iBCS), 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.
Other ABIs standardize details such as the C++ name mangling, exception
Exception handling
Exception handling is a programming language construct or computer hardware mechanism designed to handle the occurrence of exceptions, special conditions that change the normal flow of program execution....
propagation, and calling convention between compilers on the same platform, but do not require cross-platform compatibility.
An ABI should not be confused with an application programming interface
Application programming interface
An application programming interface is a source code based specification intended to be used as an interface by software components to communicate with each other...
(API) which defines a library of routines to call, data structures to manipulate, and/or object classes to use in the construction of an application using that particular (often language specific) API.
EABI
An embedded-application binary interface (EABI) specifies standard conventions for file formatFile format
A file format is a particular way that information is encoded for storage in a computer file.Since a disk drive, or indeed any computer storage, can store only bits, the computer must have some way of converting information to 0s and 1s and vice-versa. There are different kinds of formats for...
s, data types, register usage, stack frame organization, and function parameter passing of an embedded
Embedded system
An embedded system is a computer system designed for specific control functions within a larger system. often with real-time computing constraints. It is embedded as part of a complete device often including hardware and mechanical parts. By contrast, a general-purpose computer, such as a personal...
software program.
Compiler
Compiler
A compiler is a computer program that transforms source code written in a programming language into another computer language...
s that support the EABI create object code
Object code
Object code, or sometimes object module, is what a computer compiler produces. In a general sense object code is a sequence of statements in a computer language, usually a machine code language....
that is compatible with code generated by other such compilers, thus allowing developers to link libraries generated with one compiler with object code generated with a different compiler. Developers writing their own assembly language
Assembly language
An assembly language is a low-level programming language for computers, microprocessors, microcontrollers, and other programmable devices. It implements a symbolic representation of the machine codes and other constants needed to program a given CPU architecture...
code may also use the EABI to interface with assembly generated by a compliant compiler.
The main differences of an EABI with respect to an ABI for general purpose operating systems are that privileged instructions are allowed in application code, dynamic linking is not required (sometimes it is completely disallowed), and a more compact stack frame organization is used to save memory.
Widely used EABIs include PowerPC
PowerPC
PowerPC is a RISC architecture created by the 1991 Apple–IBM–Motorola alliance, known as AIM...
and ARM
ARM architecture
ARM is a 32-bit reduced instruction set computer instruction set architecture developed by ARM Holdings. It was named the Advanced RISC Machine, and before that, the Acorn RISC Machine. The ARM architecture is the most widely used 32-bit ISA in numbers produced...
.
See also
- ABI Compliance CheckerABI Compliance CheckerABI Compliance Checker is a tool for checking binary-level backward compatibility of shared libraries written in C and C++ programming languages....
- Comparison of application virtual machinesComparison of Application Virtual MachinesThis article lists some software virtual machines that are typically used for allowing application bytecode to be portably run on many different computer architectures and operating systems. The application is usually run on the computer using an interpreter or just-in-time compilation...
- Foreign function interfaceForeign function interfaceA foreign function interface is a mechanism by which a program written in one programming language can call routines or make use of services written in another. The term comes from the specification for Common Lisp, which explicitly refers to the language features for inter-language calls as...
- Language bindingLanguage bindingIn computing, a binding from a programming language to a library or OS service is an API providing that service in the language.Many software libraries are written in systems programming languages such as C or C++...
- LibffiLibffilibffi is a foreign function interface library. It provides a C programming language interface for calling natively compiled functions given information about the target function at run time instead of compile time...
- Opaque pointerOpaque pointerIn computer programming, an opaque pointer is a special case of an opaque data type, a datatype that is declared to be a pointer to a record or data structure of some unspecified type....
- PowerOpen EnvironmentPowerOpen EnvironmentThe PowerOpen Environment , created in 1991, is an open standard for running a Unix-based operating system on the PowerPC computer architecture.The POE contains API and ABI specifications...
- SWIGSWIGSWIG is an open source software tool used to connect computer programs or libraries written in C or C++ with scripting languages such as Lua, Perl, PHP, Python, R, Ruby, Tcl, and other languages like C#, Java, Modula-3, Objective Caml, Octave, and Scheme...
- Upstream TrackerUpstream TrackerUpstream Tracker is a web service providing API changes/compatibility analysis for a variety of shared libraries written in C and C++ programming languages. It includes more than 300 software libraries at the moment...
External links
- KDE Techbase Policies - Good compendium of development rules of thumb (with some examples) for not breaking binary compatibility between releases of your library.
- Mac OS X ABI Function Call Guide
- Debian ARM EABI port
- µClib: Motorola 8/16-bit embedded ABI
- AMD64 (x86-64) Application Binary Interface
- Application Binary Interface (ABI) for the ARM Architecture
- MIPS EABI documentation
- Sun Studio 10 Compilers and the AMD64 ABI - Good summary and comparison about some popular ABIs
- "M•CORE Applications Binary Interface Standards Manual" for the Freescale M·COREM·COREM·CORE is a low-power, RISC-based microcontroller architecture developed by Motorola , intended for use in embedded systems. Introduced in late 1997, the architecture combines a 32-bit internal data path with 16-bit instructions, and includes a four-stage instruction pipeline. Initial...
processors