Application Binary Interface (ABI): Difference between revisions
pc>Yuron No edit summary |
W81054ch [PHRhYmxlIGNsYXNzPSJ0d3BvcHVwIj48dHI+PHRkIGNsYXNzPSJ0d3BvcHVwLWVudHJ5dGl0bGUiPkdyb3Vwczo8L3RkPjx0ZD51c2VyPGJyIC8+YnVyZWF1Y3JhdDxiciAvPmludGVyZmFjZS1hZG1pbjxiciAvPnN5c29wPGJyIC8+PC90ZD48L3RyPjwvdGFibGU+] (talk | contribs) m (1 revision imported) |
(No difference)
|
Latest revision as of 10:02, 5 August 2019
Depends on | Libraries • Shell |
---|
"Application Binary Interface" (ABI) is the name given to the set of rules which a particular processor (e.g. x86, ARM, …) uses to communicate between different program elements in the object (i.e. the ‘binary’) code level. Although influenced by the processor architecture, it is a software convention.
For example, if function arguments are passed on the stack, which is pushed first?
int funcy(int x, int y, int z)
When calling this, should one: push x; push y; push z; call funcy;
or push z; push y; push x; call funcy;
?
The ABI specifies which. This is important if parts of the code are written in different languages or built using different compilers.
It is (a bit) relevant here as operating system calls will have a definition which must be met, although for the applications programmer this will typically be provided by library calls.
API
The ABI is a lower level specification than the (perhaps) more
familiar Application Programming Interface
(API),
which is a source level specification. For example, in the above
example it would specify what the arguments {x
, y
, z
} are and
the order in which they appear in the source code.
Also refer to: | Operating System Concepts, 10th Edition: Chapter 2.6, pages 78-79 |
---|