您的位置:首页 > 其它

ELF文件整体格式小结

2011-10-09 23:45 267 查看
因为elf格式中不同的section,不同的segment有不同的作用。这里只是注重整体ELF的作用,具体详细的用到了再看。

1 Elf files have a dual nature:

Compilers, assemblers, and linkers treat the file as a set of logical sections described by a section header table.

The system loader treats the file as a set of segments described by a program header table.

2 Elf defines the format of executable binary files. There are four different types:

Relocatable ---- Created by compilers or assemblers. Need to be processed by the linker before running.

Executable ---- Have all relocation done and all symbol resolved except perhaps shared library symbols that must be resolved at run time.

Shared object ---- Shared library containing both symbol information for the linker and directly runnable code for run time.

Core file ---- A core dump file.

格式为:

elf header------
segment table---------
sections/segments--------(一般一个segment可以包括n个section)
section table

具体细节可以使用objdump 或者 readelf命令查看。

更加细节的内容可以查看unit elf PPT.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: