In an ELF file, how does the address for _start get detemined?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I've been reading the ELF specification and cannot figure out where the program entry point and _start address come from. It seems like they should have to be in a pretty consistent place, but I made a few trivial programs, and _start is always in a different place. Can anyone clarify? 回答1: The _start symbol may be defined in any object file. Normally it is generated automatically (it corresponds to main in C). You can generate it yourself, for instance in an assembler source file: . globl _start _start : // assembly here When the