Difference between API and ABI

前端 未结 9 2024
余生分开走
余生分开走 2020-12-04 04:34

I am new to linux system programming and I came across API and ABI while reading Linux System Programming.

Definition of API :

9条回答
  •  旧巷少年郎
    2020-12-04 05:02

    API: Application Program Interface

    This is the set of public types/variables/functions that you expose from your application/library.

    In C/C++ this is what you expose in the header files that you ship with the application.

    ABI: Application Binary Interface

    This is how the compiler builds an application.
    It defines things (but is not limited to):

    • How parameters are passed to functions (registers/stack).
    • Who cleans parameters from the stack (caller/callee).
    • Where the return value is placed for return.
    • How exceptions propagate.

提交回复
热议问题