Better document PE headers

This commit is contained in:
Justine Tunney 2023-08-09 00:29:01 -07:00
parent 50394064d7
commit 9dd50f7dfc
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
3 changed files with 86 additions and 17 deletions

View file

@ -3,12 +3,35 @@
#if !(__ASSEMBLER__ + __LINKER__ + 0)
struct NtImageFileHeader {
/*
* E.g. kNtImageFileMachineNexgen32e
*/
uint16_t Machine;
/*
* The number of sections. This indicates the size of the section
* table, which immediately follows the headers.
*/
uint16_t NumberOfSections;
uint32_t TimeDateStamp;
uint32_t PointerToSymbolTable;
uint32_t NumberOfSymbols;
/*
* [File Size] The size of the optional header, which is required for
* executable files but not for object files. This value should be
* zero for an object file. For a description of the header format,
* see Optional Header (Image Only).
*/
uint16_t SizeOfOptionalHeader;
/*
* E.g. kNtPeFileExecutableImage | kNtImageFileLargeAddressAware
*/
uint16_t Characteristics;
};