Search code examples
c++coperating-systembinary-compatibilityabi

Why is Application Binary Interface important for programming


I don't understand why the ABI is important context of developing user-space applications. Is the set of system calls for an operating system considered an ABI? But if so then aren't all the complexities regarding system calls encapsulated within standard libraries?

So then is ABI compatibility only relevant for running statically linked applications on different platforms, since the system calls would be embedded into the binary?


Solution

  • An ABI defines a set of alignment, calling convention, and data types that are common to a system. This makes an ABI awfully important if you're doing any sort of dynamic linking; as without it code from one application has no way of calling code provided by another.

    So, no. ABI compatibility is relevant for all dynamic linking (less so for static).

    Its worth emphasizing again that a system's ABI affects inter-application work as well as application-to-operating-system work.