main.c

int main() { return 0; } int add() { return 0; }
main.o的比较
与之二相比,section header offset由0x90变为0xA4,增加0x14,即add函数的大小
需要注意的是,后面section header所有节的偏移都相应偏移0x14
readelf输出,text变为x28
symbol table增加add,数值为0x0000 0014,即增加了偏移;到elf文件时会再加上入口地址偏移。
main.elf的比较
section header offset增加0x14,
program header里项目1的大小由0x14变为0x28,项目2的偏移由88变为9c增加14