Content deleted Content added
Stevebroshar (talk | contribs) it's not an interface between binary modules. It's an interface _exposed_ by something (could call it a module, but module implies stuff that's not accurate so call it something more general like software) that is at the machine code level; not source level |
Guy Harris (talk | contribs) Multiple compilers for the *same* language, presumably; multiple compilers for multiple languages is usually the case. |
||
(18 intermediate revisions by 4 users not shown) | |||
Line 4:
[[File:Linux API and Linux ABI.svg|thumb|300px|The [[Linux kernel]] and [[GNU C Library]] define the [[Linux kernel interfaces#Kernel–user space API|Linux API]]. After compilation, the binaries offer an ABI. Keeping this ABI stable over a long time is important for [[Independent software vendor|ISVs]].]]
An '''application binary interface''' ('''ABI''') is an [[interface (computing)|interface]] exposed by [[software]] that is defined for in-[[Process (computing)|process]] [[machine code]] access. Often, the exposing software is a [[Library (computing)|library]], and the consumer is a [[computer program|program]].
An ABI is at a relatively low-level of [[abstraction (computer science)|abstraction]]. Interface compatibility depends on the target [[computer hardware|hardware]] and the [[software build]] [[toolchain]]. In contrast, an [[application programming interface]] (API) defines access in [[source code]] 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]] may have to deal with an ABI directly when writing a program in
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.
▲API compatibility is generally the concern for [[system design]] and of the toolchain. However, a [[programmer]] may have to deal with an ABI directly when writing a program in a multiple [[programming language|languages]] or [[compiler]]s.
== Description ==
* [[Processor (computing)|Processor]] [[instruction set]], with details like register file structure,
*
* [[Calling convention]], which controls how the arguments of [[function (programming)|function]]s are passed, and return values retrieved; for example, it controls the following:
** How the [[call stack]] 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]]<ref>{{cite web|url=https://itanium-cxx-abi.github.io/cxx-abi/|title=Itanium C++ ABI}} (compatible with multiple architectures)</ref>
* [[exception handling|Exception]] propagation<ref>{{cite web|url=http://itanium-cxx-abi.github.io/cxx-abi/abi-eh.html|title=Itanium C++ ABI: Exception Handling}} (compatible with multiple architectures)</ref>
* How an application should make [[system call]]s to the operating system, and if the ABI specifies direct system calls rather than procedure calls to system call [[Method stub|stubs]], the system call numbers
* In the case of a complete operating system ABI, the binary format of [[object file]]s, program libraries, etc.
ABIs include the [[Intel Binary Compatibility Standard]] (iBCS)<ref>{{cite web |url=http://www.everything2.com/index.pl?node=iBCS |title=Intel Binary Compatibility Standard (iBCS)}}</ref> and the [[System V Release 4]] ABIs for various instruction sets.
An '''embedded
Each compiler and [[
▲== {{Anchor|EABI}}Embedded ABIs ==
▲An ''embedded-application binary interface'' (EABI) specifies standard conventions for [[file format]]s, data types, register usage, [[stack frame]] organization, and function parameter passing of an [[Embedded system|embedded]] software program, for use with an [[embedded operating system]].
▲[[Compiler]]s 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.<ref name="ppc-eabi">{{cite book
| title = PowerPC Embedded Application Binary Interface: 32-Bit Implementation
| date = 1 October 1995
Line 63:
}}</ref>
Widely used EABIs include the [[PowerPC]],<ref name="ppc-eabi"/> [[Arm architecture|Arm]]
== See also ==
{{Portal|Computer programming}}
* {{Annotated link|Bytecode}}
▲* [[Binary-code compatibility]]
▲* [[Comparison of application virtualization software]]
▲* [[Debug symbol]]
▲* [[Foreign function interface]]
▲* [[Language binding]]
▲* [[Native (computing)]]
▲* [[Opaque pointer]]
▲* [[PowerOpen Environment]]
* {{Annotated link|SWIG}}
▲* [[Symbol table]]
▲* [[Visual C++#Compatibility|Visual C++ ABI instability details]]
==References==
|