How are compilation and ABI related?
Is a compiler’s solely job to build Application Binary Interface (ABI) to OS and/or other applications?
About ABI, quoted from Wikipedia:
ABIs cover details such as data type,
size, and alignment; the calling
convention, which controls how
functions’ arguments are passed and
return values retrieved; the system
call numbers and how an application
should make system calls to the
operating system; and in the case of a
complete operating system ABI, the
binary format of object files, program
libraries and so on.
Thanks and regards!
An ABI describes the features of the underlying OS, and includes some rules about how a program must be compiled. It’s the compiler’s job not to “build” the ABI, but to conform to the ABI as it creates executable code.