main.c
int enable; int test = 1; int main() { int temp; return 0; } int add() { return 0; }
elf反汇编结果如下,可以看出main函数中的栈多开了8字节,虽然局部变量只是int,占4字节(好像在哪儿看到过栈区是8字节对齐的)
ELF文件之六——使用链接脚本-2个函数-data-bss-temp
原文:https://www.cnblogs.com/yanhc/p/12288420.html