Tom St Denis wrote:
priyanka wrote:
>Hi there,
>>
>I want to learn about the calling convention that is adopted by the gcc
>compiler for C programs ? I need to learn about it immidiately for
>finding out the parameters passed to registers when a function call is
>made and print out the values of the parameters. Can anyone give me
>some pointers or refer to some book that would be helpful ? I tried
>searching at google but did not find any useful papers or reference.
>
What you want is called the Application Binary Interface [or something
like that] the acronym is ABI.
The compiler doesn't specify it. The platform does.
To be precise in a way that does matter, some interested parties writing
code for the platform do.
There's no such thing as "the" ABI for a platform (in contrast to, say, the
register set) except that which is agreed upon by everyone. Unless, of
course, one reverses things and takes up the position that the platform is
*defined* by the ABI, which has its own problems.
S.