#include <stdio.h>
int g(int x)
{
return x + 3;
}
int f(int x)
{
return g(x);
}
int main()
{
return f(8) + 1;
}
1.预处理
gcc -E test.c -o test.i
2.汇编
gcc -S test.i -o test.s
3.编译
gcc -c test.s -o test.o
4.链接
gcc test.o -o test
执行反编译命令objdump -d test.out,查看生成的汇编指令
大致画画堆栈的创建和销毁过程hh~
简洁版hh~