$linuxjunkies
>

ABI

also: Application Binary Interface

Application Binary Interface (ABI) is a set of rules and conventions that define how software components interact at the binary level, including function calling conventions, memory layout, and system calls.

ABI specifies the low-level details of how compiled programs communicate with the operating system and libraries. Unlike an API (which defines how source code interfaces), an ABI governs the actual machine instructions and memory organization at runtime.

Key aspects include: calling conventions (how function arguments are passed), register usage, data type sizes and alignment, and how system calls are invoked. For example, on x86-64 Linux, the ABI dictates that the first integer argument to a function goes in the rdi register, the second in rsi, and so on.

ABI compatibility is critical for binary compatibility—a program compiled for one ABI cannot run on a system with a different ABI without recompilation. This is why binaries built for ARM processors won't run on x86-64 systems, even if both run Linux.

Related terms