这一项给出 ELF 文件头部的字节长度(ELF Header Size)。 e_phentsize¶ 这一项给出程序头部表中每个表项的字节长度(Program Header ENTry SIZE)。每个表项的大小相同。 e_phnum¶ 这一项给出程序头部表的项数( Program Header entry NUMber)。因此,e_phnum 与e_phentsize 的乘积即为程序头部表的字节长度...
elf头是位于elf文件的头部,里面存储着一些机器和该ELF文件的基本信息。 typedefstruct{unsignedchare_ident[EI_NIDENT];Elf64_Halfe_type;Elf64_Halfe_machine;Elf64_Worde_version;Elf64_Addre_entry;Elf64_Offe_phoff;Elf64_Offe_shoff;Elf64_Worde_flags;Elf64_Halfe_ehsize;Elf64_Halfe_phentsize;Elf6...
*/Elf64_Off e_phoff;/* Program header table file offset */Elf64_Off e_shoff;/* Section header table file offset */Elf64_Word e_flags;/* Processor-specific flags */Elf64_Half e_ehsize;/* ELF header size in bytes */Elf64_Half e_phentsize;/* Program header table entry size */...
/* Program header table file offset */ Elf64_Off e_shoff; /* Section header table file offset */ Elf64_Word e_flags; /* Processor-specific flags */ Elf64_Half e_ehsize; /* ELF header size in bytes */ Elf64_Half e_phentsize; /* Program header table entry size */ Elf64_Half...
第18 行 Size of section headers:sections header 的大小 第19 行 Number of section headers:sections header 的数量。 第20 行 Section header string table index:节头部表格中与节名称字符串表相关的表项的索引。如果文件没有节名称字符串表,此参数可以为 SHN_UNDEF 。
e_phoff表示Program Header Table在文件中的偏移量。e_shoff表示Section Header Table在文件中的偏移量。e_phentsizze表示 Program Header Table的大小。e_phnum表示Program Header的数量。同理,e_shentsize和e_shnum表示Section Header Table的大小和Section Header的数量。e_shstrndx表示Section名称字符串表的索引,...
段头表(Program header table),可加载的文件必选,重定位文件可选 段和节的实际内容,包括可加载的数据,符号表等 节头表和段头表其实分别是链接和加载的视图,结构大致如下: image.png ELF 64的数据类型定义如下: image.png ELF文件头格式 文件头格式如下: ...
Elf64_Half e_ehsize; /* ELF header size in bytes,2bytes */ Elf64_Half e_phentsize; /* Program header table entry size,2bytes */ Elf64_Half e_phnum; /* Program header table entry count,2bytes */ Elf64_Half e_shentsize; /* Section header table entry size,2bytes */ ...
Size of this header: 52 (bytes) Size of program headers: 0 (bytes) Number of program headers: 0 Size of section headers: 40 (bytes) Number of section headers: 11 Section header string table index: 8 1. 2. 3. 4. 5. 6. 7. ...