如果您在 google 上搜索COFF 规范,它会带您到Section Table (Section Headers)。
转储显然包含三个 COFF 部分标题。如果你更喜欢他们在assembly 中的描述,你在这里:
COFF_SECTION_HEADER STRUC
.Name DB 8*BYTE ; Section name, NULL padded.
.VirtualSize DD ; Total aligned section size when loaded in memory.
.VirtualAddress DD ; RVA of section relative to ImageBase when loaded.
.SizeOfRawData DD ; Section size in the file (before loaded).
.PointerToRawData DD ; File pointer to section data.
.PointerToRelocations DD ; File pointer to relocations. NULL if no relocations.
.PointerToLinenumbers DD ; File pointer to line-number entries or NULL.
.NumberOfRelocations DW ; Number of relocation entries for this section.
.NumberOfLinenumbers DW ; Number of line-number entries for this section.
.Characteristics DD ; Section properties.
ENDSTRUC
Run Code Online (Sandbox Code Playgroud)
继续记住,在LittleEndian的DWORD值有不太显著字节(逆转)开始,例如.VirtualSize的 .text部分,这是作为倾倒00100000,其实0x00001000,也就是1 KB加载到内存中时。PE 文件中的大小.data或.text部分保存在成员中.SizeOfRawData。