PE(Portable Executable),即可移植的执行体。所有Windows下可执行文件,均使用PE文件结构。
PE文件通常包括以下节(Section)
.textbss/BSS
BSS段(bss segment)通常是指用来存放程序中未初始化的全局变量的一块内存区域。BSS是英文Block Started by Symbol的简称。BSS段属于静态内存分配。
.text/CODE
代码段(text segment)通常是指用来存放程序执行代码的一块内存区域。这部分区域的大小在程序运行前就已经确定,并且内存区域属于只读。在代码段中,也有可能包含一些只读的常数变量,例如字符串常量等。需要注意的是,borland这里叫做code,而不是text 。
.rdata
只读数据段。
The .rdata section is used for at least two things. First, in Microsoft linker-produced EXEs, the .rdata section holds the debug directory, which is only present in EXE files.
The other useful portion of an .rdata section is the description string. If you specified a DESCRIPTION entry in your program’s DEF file, the specified description string appears in the .rdata section.
.data
数据段(data segment)通常是指用来存放程序中已初始化