ELF Executable and Linkable Format
时间:2007-01-01 来源:redoc
elf有两种格式,一种是从link角度看,一种是从execution角度看。
link view
execution view
elf header |
Program header table (optional) |
section 1 |
... |
section n |
... |
section header table |
elf header |
Program header table |
segment 1 |
segment 2 |
... |
section header table (optional) |
elf header 中放的是关于整个elf的一些基本的信息。elf header 分析
section header table 中存放的自然是有关section的信息,比如sectoin的类型等。section header table 分析 以及几个特别的section 的分析symbol table 分析
program header table 中存放的是在link时使用的一些信息。
其中section header tabel & program header table 都是一些结构体(structure)的数组,每个structure中存放着该structure的各种信息。section $ segment 是elf文件中具体的存放信息的地方,根据作用属性不同而有不同。
参考资料 1.《Executable and Linkable Format(FLE)》 2./usr/include/elf.h 相关阅读 更多 +