PE File Sections

The sections of a PE contain the actual data needed to make the file executable.

In contrast, the headers contain metadata about the PE file as well as the different sections. In the PE file format, the sections follow the headers and occupy the rest of the file.

Each section of a PE file has its own header (Section Header) that is stored in the Section Table. Sections often have names that give an indication of their purpose.

Common sections include:

  • .text: The .text section contains the executable code of the PE.
  • .data: Initialized data, i.e. the variables that get initialized in the code.
  • .rdata: Read-only initialized data. Constant variables (prefixed with const) live here.
  • .idata: The import tables. Used by the Loader to determine which DLL files to load, as well as the functions being used from each DLL.
  • .reloc: Contains the image relocation information needed to load the program into memory without errors.
  • .rsrc: Contains resources used by the program. These include images, icons, bitmaps, or embedded binaries.

Table of PE File Sections

The following table shows the reserved sections of

SectionDescription
.bssUninitialized data
.cormetaIndicates that the file contains managed code (object only)
.dataInitialized data
.debug$FFPO debug information (object only and obsolete)
.debug$PPrecompiled debug types (object only)
.debug$SDebug symbols (object only)
.debug$TDebug types (object only)
.drectiveLinker options
.edataExport tables
.idataImport tables
.idlsymIncludes registered SEH to support IDL attributes (image only)
.pdataException information
.rdataRead-only initialized data
.relocImage relocation information
.rsrcResource directory
.sbssGP-relative uninitialized data
.sdataGP-relative initialized data
.srdataGP-relative read-only data
.sxdataRegistered exception handler data (x86/object only)
.textExecutable code
.tlsThread-local storage (object only)
.tls$Thread-local storage (object only)
.vsdataGP-relative initialized data (for ARM, SH4, and Thumb architectures only)
.xdataException information
Scroll to Top