其实是这样的,在一个 ELF 文件中,存在很多个 Sections,这些 Sections 的具体信息,是在Program header table或者Section head table中进行描述的。 就拿Section head table来举例吧: 假如一个 ELF 文件中一共存在4个 Section:.text、.rodata、.data、.bss,那么在Section head table中,将会有4个 Entry(条目)来...
sh_link,含有一个section header的index,该值的解释依赖于section type。 如果是SHT_DYNAMIC,sh_link是string table的section header index,也就是说指向字符串表。 如果是SHT_HASH,sh_link指向symbol table的section header index,hash table应用于symbol table。 如果是重定位节SHT_REL或SHT_RELA,sh_link指向相应...
借助readelf工具或010 Editor分析上面libdemo1.so中的Section Header Table结构,如下: 几个比较重要的section: 加固提示 由链接视图和执行视图,我们知道so加载到内存中时section header table是没有用的,它主要是有助于静态分析elf文件结构。在对so做加固的时候,可以篡改或删除section header table的数据,增加静态分析...
(3)节头表(Section Header Table):由一组section header组成。section header描述了文件中节(section)的信息,比如节的类型、大小、加载到内存中的地址、在文件中的偏移等。 (4)节(Sections):包含了实际的数据和代码,比如.text中保存了程序的代码,.data中保存了初始化不为0全局变量,.rodata中保存了一些只读的数...
---文件头(ELF Header) ---程序头表(Program Head Table) ---节(Sections)或段(Segments) ---节头表(Section Header Table)。 ELF文件提供了两种视图,分别是链接视图和执行视图。 其中,节section是链接视图的基本单位,在文件进行链接操作时使用;
sections 或者 segments:segments是从运行的角度来描述elf文件,sections是从链接的角度来描述elf文件,也就是说,在链接阶段,我们可以忽略program header table来处理此文件,在运行阶段可以忽略section header table来处理此程序(所以很多加固手段删除了section header table)。从图中我们也可以看出,segments与sections是包含的...
ELF是一种用于二进制文件、可执行文件、目标代码、共享库和核心转储格式文件,它由4部分组成,分别是ELF头(ELF header)、程序头表(Program header table)、节(Section)和节头表(Section header table)。实际上,一个文件中不一定包含全部内容,而且它们的位置也未...
描述ELF header 的结构体: 描述Program header table 的结构体: 描述Section header table 的结构体: ELF header(ELF 头) 头部内容,就相当于是一个总管,它决定了这个完整的 ELF 文件内部的所有信息,比如: 这是一个 ELF 文件; 一些基本信息:版本,文件类型,机器类型; ...
When DWARF 1.0 debugging information is included by the linker in the ELF executable, the file contains the following ELF Sections, each of which has a Section Header Table entry: DWARF version 2.0 When DWARF 2.0 debugging information is included by the linker in the ELF executable, the file ...