ABI, Application Binary Interface has no direct relationship with API, but bears some resemblance.
Just as the API is the way codes communicate through the source, ABI is the way the codes communicate through the target. The API is about what the compiler gets to work on, the ABI is about what it sends to run.
Just as the API is about specifying how communication should occur with your code, the ABI is specifying how communication should occur internally in the executable.
The specification determines:
- data size and layout
- function call convention, where arguments are passed, which go by register and which by stack, and how
- how operational system functions calls should occur
- the format of the binary code.
It only makes sense to understand ABI in languages that generate native code and communicate with other compilers, of the same or different languages, or make direct access to the operating system. If they generate code from different ABI compilers they probably won’t be able to talk directly requiring some intermediation. So some things will always have to call a DLL.
In the wikipedia article has an image that shows this relationship better:
There is the use of API in another context, and even a lot of people think it’s just this one, but I think it’s a different context than what’s here.
i don’t know right but ABI has the interface of how to mount the frame to call an external function.
– lemoce