<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://debianws.lexgopc.com/wiki1463/index.php?action=history&amp;feed=atom&amp;title=Application_binary_interface</id>
	<title>Application binary interface - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://debianws.lexgopc.com/wiki1463/index.php?action=history&amp;feed=atom&amp;title=Application_binary_interface"/>
	<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki1463/index.php?title=Application_binary_interface&amp;action=history"/>
	<updated>2026-12-01T03:56:38Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.3</generator>
	<entry>
		<id>http://debianws.lexgopc.com/wiki1463/index.php?title=Application_binary_interface&amp;diff=40400&amp;oldid=prev</id>
		<title>imported&gt;Artoria2e5: /* C++ */ ~</title>
		<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki1463/index.php?title=Application_binary_interface&amp;diff=40400&amp;oldid=prev"/>
		<updated>2026-08-04T03:27:31Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;C++: &lt;/span&gt; ~&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Short description|Interface to software defined in terms of in-process, machine code access}}&lt;br /&gt;
{{Use dmy dates|date=June 2020}}&lt;br /&gt;
[[File:Linux kernel interfaces.svg|thumb|300px|A high-level comparison of in-kernel and kernel-to-userspace APIs and ABIs]]&lt;br /&gt;
[[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]].]]&lt;br /&gt;
&lt;br /&gt;
An &amp;#039;&amp;#039;&amp;#039;application binary interface&amp;#039;&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;ABI&amp;#039;&amp;#039;&amp;#039;) 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]].&lt;br /&gt;
&lt;br /&gt;
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 an interface at the source code level, before compilation, whereas an ABI defines an interface to compiled code.&lt;br /&gt;
&lt;br /&gt;
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 multiple [[programming language|languages]] or when using multiple [[compiler]]s for the same language.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
Interface aspects covered by an ABI include:&lt;br /&gt;
* [[Processor (computing)|Processor]] [[instruction set]], with details like register file structure, [[Computer memory|memory]] access types, etc.&lt;br /&gt;
* Size, layout, and [[Data structure alignment|alignment]] of basic [[data type]]s that the processor can directly access&lt;br /&gt;
* [[Calling convention]], which controls how the arguments of [[function (programming)|function]]s are passed, and return values retrieved; for example, it controls the following:&lt;br /&gt;
** How the [[call stack]] is organized&lt;br /&gt;
** Whether all parameters are passed on the call stack, or some are passed in registers&lt;br /&gt;
** Which registers are used for which function parameters&lt;br /&gt;
** Which registers should be preserved by the callee (restore its value if changed) &lt;br /&gt;
** Whether the first function parameter passed on the call stack is pushed first or last&lt;br /&gt;
** Whether the caller or callee is responsible for cleaning up the call stack after the function call&lt;br /&gt;
* [[Stack unwinding]] (&amp;lt;code&amp;gt;setjmp&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;longjmp&amp;lt;/code&amp;gt;)&lt;br /&gt;
* [[Name mangling]], or how an API entity is named in the resulting [[object file]] (not in C)&amp;lt;ref name=Itanium&amp;gt;{{cite web|url=https://itanium-cxx-abi.github.io/cxx-abi/|title=Itanium C++ ABI}} (compatible with multiple architectures)&amp;lt;/ref&amp;gt;&lt;br /&gt;
* [[exception handling|Exception]] propagation (not in C)&amp;lt;ref&amp;gt;{{cite web|url=https://itanium-cxx-abi.github.io/cxx-abi/abi-eh.html|title=Itanium C++ ABI: Exception Handling}} (compatible with multiple architectures)&amp;lt;/ref&amp;gt;&lt;br /&gt;
* 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&lt;br /&gt;
* In the case of a complete operating system ABI, the binary format of [[object file]]s, program libraries, etc.&lt;br /&gt;
&lt;br /&gt;
Example ABIs include the obsolete [[Intel Binary Compatibility Standard]] (iBCS),&amp;lt;ref&amp;gt;{{cite web |url=http://www.everything2.com/index.pl?node=iBCS |title=Intel Binary Compatibility Standard (iBCS)}}&amp;lt;/ref&amp;gt;, the [[System V Release 4]] ABIs for various instruction set architectures (ISAs) used by many Unix-like systems, and the Microsoft Windows ABIs for various ISAs.&amp;lt;ref name=&amp;quot;ms-x64&amp;quot;&amp;gt;{{cite web |title=x64 Calling Convention |url=https://learn.microsoft.com/en-us/cpp/build/x64-calling-convention?view=msvc-170 |website=learn.microsoft.com |language=en-us}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== &amp;lt;span class=&amp;quot;anchor&amp;quot; id=&amp;quot;EABI&amp;quot;&amp;gt;&amp;lt;/span&amp;gt;Embedded ABI ==&lt;br /&gt;
An &amp;#039;&amp;#039;&amp;#039;embedded ABI&amp;#039;&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;EABI&amp;#039;&amp;#039;&amp;#039;), used on an [[embedded operating system]], specifies aspects such as [[file format]]s, data types, register usage, [[stack frame]] organization, and function parameter passing of an [[Embedded system|embedded]] software program.&lt;br /&gt;
&lt;br /&gt;
Each compiler and [[assembly language|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.&lt;br /&gt;
&lt;br /&gt;
Typically, an EABI is optimized for performance for the limited resources of the target embedded system. Therefore, an EABI may omit abstractions between [[User space and kernel space|kernel and user space]] typically found in [[desktop computer|desktop]] 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.&amp;lt;ref name=&amp;quot;ppc-eabi&amp;quot;&amp;gt;{{cite book&lt;br /&gt;
 |     title = PowerPC Embedded Application Binary Interface: 32-Bit Implementation&lt;br /&gt;
 |      date = 1 October 1995&lt;br /&gt;
 |   edition = Version 1.0&lt;br /&gt;
 |   chapter = EABI Summary&lt;br /&gt;
 |     pages = 28&amp;amp;ndash;30&lt;br /&gt;
 | publisher = Freescale Semiconductor, Inc&lt;br /&gt;
 |       url = https://www.nxp.com/docs/en/application-note/PPCEABI.pdf&lt;br /&gt;
}}&amp;lt;/ref&amp;gt;  The choice of EABI can affect performance.&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
 |title=Debian ARM accelerates via EABI port&lt;br /&gt;
 |date=16 October 2016&lt;br /&gt;
 |publisher=Linuxdevices.com&lt;br /&gt;
 |url=http://linuxdevices.com/news/NS9048137234.html&lt;br /&gt;
 |access-date=11 October 2007&lt;br /&gt;
 |archive-url=https://web.archive.org/web/20070121183413/http://www.linuxdevices.com/news/NS9048137234.html&lt;br /&gt;
 |archive-date=21 January 2007&lt;br /&gt;
|url-status=dead&lt;br /&gt;
}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
 |author=Andrés Calderón and Nelson Castillo&lt;br /&gt;
 |title=Why ARM&amp;#039;s EABI matters&lt;br /&gt;
 |date=14 March 2007&lt;br /&gt;
 |publisher=Linuxdevices.com&lt;br /&gt;
 |url=http://linuxdevices.com/articles/AT5920399313.html&lt;br /&gt;
 |access-date=11 October 2007&lt;br /&gt;
 |archive-url=https://web.archive.org/web/20070331193917/http://www.linuxdevices.com/articles/AT5920399313.html&lt;br /&gt;
 |archive-date=31 March 2007&lt;br /&gt;
|url-status=dead&lt;br /&gt;
}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Widely used EABIs include the [[PowerPC]],&amp;lt;ref name=&amp;quot;ppc-eabi&amp;quot;/&amp;gt; [[Arm architecture|Arm]],&amp;lt;ref&amp;gt;{{cite web|url=https://developer.arm.com/architectures/system-architectures/software-standards/abi |title=ABI for the Arm Architecture |publisher=Developer.arm.com |access-date=4 February 2020}}&amp;lt;/ref&amp;gt; and [[MIPS architecture|MIPS]] EABIs.&amp;lt;ref&amp;gt;{{cite mailing list |url=https://sourceware.org/legacy-ml/binutils/2003-06/msg00436.html |author=Eric Christopher |title=mips eabi documentation |mailing-list=binutils@sources.redhat.com |date=11 June 2003 |access-date=19 June 2020}}&amp;lt;/ref&amp;gt; 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.&amp;lt;ref&amp;gt;{{cite web |title=ArmEabiPort |url=https://wiki.debian.org/ArmEabiPort |website=Debian Wiki |quote=Strictly speaking, both the old and new ARM ABIs are subsets of the ARM EABI specification, but in everyday usage the term &amp;quot;EABI&amp;quot; is used to mean the new one described here and &amp;quot;OABI&amp;quot; or &amp;quot;old-ABI&amp;quot; to mean the old one.}}&amp;lt;/ref&amp;gt; Another point of distinction is whether optional features such as hardware floating-point is present. For example, in GCC and LLVM, &amp;lt;code&amp;gt;armv7-unknown-linux-musleabi&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;armv7-unknown-linux-musleabihf&amp;lt;/code&amp;gt; both refer to GNU EABI with the [[musl]] C library, except the latter uses hardware floating-point and therefore has a slightly different call convention.&amp;lt;ref name=&amp;quot;faultlore&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Language ABIs ==&lt;br /&gt;
Each [[programming language]] may use a different set of features and data types. If there is no existing ABI for a feature, the language often needs to define its own ABI as an extension of the existing ABI.&lt;br /&gt;
&lt;br /&gt;
=== C ===&lt;br /&gt;
The official website of the [[C (programming language)|C programming language]] describes C as a [[lingua franca]] in [[foreign function interface]]s (FFIs: function calls between different programming languages).&amp;lt;ref&amp;gt;{{cite web |title=C language: FAQ |url=https://www.c-language.org/faq |website=www.c-language.org}}&amp;lt;/ref&amp;gt; Many languages define their FFIs around the C ABI, for example the &amp;lt;code&amp;gt;extern &amp;quot;C&amp;quot;&amp;lt;/code&amp;gt; of Rust and C++.&amp;lt;ref name=&amp;quot;Sutter14&amp;quot;&amp;gt;{{cite web |last1=Sutter |first1=Herb |title=Defining a Portable C++ ABI |url=https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4028.pdf |date=2014}}&amp;lt;/ref&amp;gt; This is because almost every current operating system, both Unix-like and Windows, provides an agreed-upon C ABI. These systems themselves mainly provide a C API, which depends upon a C ABI for functioning, hence the ubiquity of a C ABI.&amp;lt;ref&amp;gt;{{cite web |title=Why C is still the most important programming language |url=https://dev.to/dimension-ai/why-c-is-still-the-most-important-programming-language-2n9j |website=DEV Community |language=en |date=7 January 2026}}&amp;lt;/ref&amp;gt; (Furthermore, C is relatively limited in what it requires of the ABI rules compared to other languages, only requiring definition of data structure layout and calling convention.)&amp;lt;ref&amp;gt;{{cite web |title=tool-conventions/BasicCABI.md at main · WebAssembly/tool-conventions |url=https://github.com/WebAssembly/tool-conventions/blob/main/BasicCABI.md |website=GitHub |language=en}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Nevertheless, C was not originally designed to serve in this role, and the ABI has been criticized for many of its perceived deficiencies as an FFI:&lt;br /&gt;
* C ABIs are defined by C APIs, which are defined in C header files. However, C header files are very hard to parse and most FFI implementations resort to calling the compiler.&amp;lt;ref name=&amp;quot;faultlore&amp;quot;/&amp;gt;&lt;br /&gt;
* C ABIs define interpretations for C-specific types such as &amp;lt;code&amp;gt;long long&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;time_t&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;intmax_t&amp;lt;/code&amp;gt;. These choices of types are set in stone by the ABI, but there exist valid reasons to change them, which ends up breaking the ABI.&amp;lt;ref&amp;gt;{{cite web |title=To Save C, We Must Save ABI |url=https://thephd.dev/to-save-c-we-must-save-abi-fixing-c-function-abi |website=The Pasture |language=en |date=13 March 2022}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
* C ABIs do not have parts required to support features in other languages, e.g. [[type safety]] and [[memory safety]].&amp;lt;ref name=&amp;quot;Sutter14&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== C++ ===&lt;br /&gt;
There is no portable C++ ABI: even on the same operating system, different compilers (or combination of compiler and standard library implementations) may use different ABIs.&amp;lt;ref name=&amp;quot;Sutter14&amp;quot;/&amp;gt; Most C++ ABIs are extensions on top of the C ABI, filling in the missing [[name mangling]] (required for [[function overloading]]) and [[exception handling]] details. In modern systems two main schemes are encountered: Microsoft&amp;#039;s Visual C++ scheme and the Itanium scheme.&amp;lt;ref name=Itanium/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Although the ABI documents define the rules for transforming identifiers into names, they do not define the whole ABI surface of the standard library, leaving it to the specific standard library implementation (see section &amp;quot;Library ABI&amp;quot; below). As a result, each implementation has its own ABI; even on the same architecture and operating system, two object files end up having different ABIs if linked to standard libraries with incompatible ABIs.&amp;lt;ref name=&amp;quot;Sutter14&amp;quot;/&amp;gt; In 2015, GCC/libstdc++ revised its implementation of &amp;lt;code&amp;gt;std::string&amp;lt;/code&amp;gt;, leading to an ABI change. Even though the new library supports both ABIs, users still had to make a choice between the old ABI and the new ABI, as this determines what precompiled libraries their programs can be linked to.&amp;lt;ref&amp;gt;{{cite web |title=Dual ABI |url=https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html |website=gcc.gnu.org}}&amp;lt;/ref&amp;gt; Similarly, [[Visual C++]] does not guarantee compatibility when code produced by different versions of the compiler (intended for different versions of the runtime library) are linked together.&amp;lt;ref&amp;gt;{{cite web |title=C++ binary compatibility 2015-2026 |url=https://learn.microsoft.com/en-us/cpp/porting/binary-compat-2015-2017?view=msvc-170 |website=learn.microsoft.com |language=en-us}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Library ABI ==&lt;br /&gt;
As defined above the &amp;quot;ABI&amp;quot; documents describe how an API is transformed into a concrete form at the [[assembly language]] level.&lt;br /&gt;
In the case of [[Library (computing)|libraries]], the term &amp;quot;ABI&amp;quot; instead refers to the concrete interface resulting from the transformation of ABI.&amp;lt;ref&amp;gt;{{cite web |title=libcurl - ABI |url=https://curl.se/libcurl/abi.html |website=curl.se}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
For example, changing the [[type signature]] of a function, either directly or indirectly (e.g. by changing the definition of a [[struct]] used by the function), often changes the ABI to the point of incompatibility, an &amp;quot;ABI break&amp;quot;.&amp;lt;ref&amp;gt;{{cite web |title=Application Binary Interface (ABI) - pypackaging-native |url=https://pypackaging-native.github.io/background/binary_interface/ |website=pypackaging-native.github.io}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{cite web |last1=Winters |first1=T |title=What is ABI, and What Should WG21 Do About It? |url=https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p2028r0.pdf |date=2020}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Because operating systems include a number of libraries for use by the programmer, their ABIs also include the library ABIs. The [[Linux Standard Base]] specifications, for example, includes details about what the [[symbol table]]s of certain libraries should contain, what API they correspond to, and that SysV ABI should be used.&amp;lt;ref&amp;gt;{{cite web |title=Interfaces for libc (LSB 5.0 PPC64) |url=https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-PPC64/LSB-Core-PPC64/libc.html |website=refspecs.linuxfoundation.org}}&amp;lt;/ref&amp;gt; This kind of distinctions matter for compilers and other kinds of code generators; in the case of GCC and LLVM, each option is given a name called a  &amp;#039;&amp;#039;target triple&amp;#039;&amp;#039;. (The choice of a standard library implementation also affects the ABI: for example, musl and [[uClibc]] for ARMv7 GNU EABI as well as libstdc++ and [[Microsoft Visual C++]] for x64 Windows each have different triples.)&amp;lt;ref name=&amp;quot;faultlore&amp;quot;&amp;gt;{{cite web |last1=Desires |first1=Aria |title=C Isn&amp;#039;t A Programming Language Anymore - Faultlore |url=https://faultlore.com/blah/c-isnt-a-language/ |date=16 March 2022 |language=en}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
{{Portal|Computer programming}}&lt;br /&gt;
&lt;br /&gt;
* {{Anl|Binary-code compatibility}}&lt;br /&gt;
* {{Anl|Bytecode}}&lt;br /&gt;
* {{Anl|Comparison of application virtualization software}}&lt;br /&gt;
* {{Anl|Debug symbol}}&lt;br /&gt;
* {{Anl|Foreign function interface}}&lt;br /&gt;
* {{Anl|Language binding}}&lt;br /&gt;
* {{Anl|Native (computing)}}&lt;br /&gt;
* {{Anl|Opaque pointer}}&lt;br /&gt;
* {{Anl|PowerOpen Environment}}&lt;br /&gt;
* {{Anl|Symbol table}}&lt;br /&gt;
* {{Anl|SWIG}}&lt;br /&gt;
* {{Anl|Microsoft Visual C++}}&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
{{Reflist|30em}}&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* [https://community.kde.org/Policies/Binary_Compatibility_Issues_With_C%2B%2B Policies/Binary Compatibility Issues With C++]{{snd}} a compendium of development rules of thumb for not breaking binary compatibility between library releases&lt;br /&gt;
* [https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/LowLevelABI/000-Introduction/introduction.html OS X ABI Function Call Guide]&lt;br /&gt;
* [https://wiki.debian.org/ArmEabiPort Debian ARM EABI port]&lt;br /&gt;
* [https://www.uclibc.org/ μClib: Motorola 8/16-bit embedded ABI]&lt;br /&gt;
* {{webarchive|url=https://web.archive.org/web/20080528070803/http://www.x86-64.org/documentation.html|title=AMD64 (x86-64) Application Binary Interface}}&lt;br /&gt;
* [http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ihi0036b/index.html Application Binary Interface (ABI) for the ARM Architecture]&lt;br /&gt;
* [https://sourceware.org/legacy-ml/binutils/2003-06/msg00436.html MIPS EABI documentation]&lt;br /&gt;
* {{webarchive|url=https://web.archive.org/web/20150114065444/http://www.oracle.com/technetwork/server-storage/solaris10/about-amd64-abi-141142.html|title=Sun Studio 10 Compilers and the AMD64 ABI}}{{snd}} a summary and comparison of some popular ABIs&lt;br /&gt;
* [https://www.nxp.com/docs/en/reference-manual/MCOREABISM.pdf M•CORE Applications Binary Interface Standards Manual] for the Freescale [[M·CORE]] processors&lt;br /&gt;
&lt;br /&gt;
{{Application binary interface}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Application programming interfaces]]&lt;br /&gt;
[[Category:Operating system technology]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Artoria2e5</name></author>
	</entry>
</feed>