Linux x64 Calling Convention: Stack Frame
TL; DR
Code
#include <stdio.h>
int test(int a, int b, int c, int d, int e, int f, int g, int h, int i)
{
//int a2 = 0x555577;
return 1;
}
int main(int argc, char *argv[])
{
test(0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8, 0x9);
return 1;
}
// compile with gcc stack.c -o stackHow Arguments Are Passed

Stack Inside test()

Accessing the 1st Argument & Local Variables




State Inside main()



References
Last updated