main.c int enable; ; int main() { int temp; ; } int add() { ; } elf反汇编结果如下,可以看出main函数中的栈多开了8字节,虽然局部变量只是int,占4字节 这是因为堆栈是要求8字节对齐的,为了能够使用更高效的LDD,STD指令,v8 manual,p191. The stack pointer %sp must always be doubleword-aligned. This allows window overflow a
本文信息来源: 又是一期硬核内容:ELF文件格式 What's the difference of section and segment in ELF file format ELF Sections & Segments and Linux VMA Mappings ELF简介 ELF全称 executable and linkable format 精灵 是一种linux下常用的可执行文件 对象 共享库的标准文件格式 还有许多其他可执行文件格式 PE Mach-O COFF COM 内核中