CoffFileHeader

COFF File Header (Object and Image)

At the beginning of an object file, or immediately after the signature of an image file, is a standard COFF file header in the following format. Note that the Windows loader limits the number of sections to 96.

Members

Functions

print
void print(Sink sink)
Undocumented in source. Be warned that the author may not have intended to support it.
write
size_t write(Arena!ubyte sink)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

Characteristics
ushort Characteristics;

The flags that indicate the attributes of the file. See CoffFlags.

Machine
MachineType Machine;

The number that identifies the type of target machine.

NumberOfSections
ushort NumberOfSections;

The number of sections. This indicates the size of the section table, which immediately follows the headers.

NumberOfSymbols
uint NumberOfSymbols;

The number of entries in the symbol table. This data can be used to locate the string table, which immediately follows the symbol table. This value should be zero for an image because COFF debugging information is deprecated.

PointerToSymbolTable
uint PointerToSymbolTable;

The file offset of the COFF symbol table, or zero if no COFF symbol table is present. This value should be zero for an image because COFF debugging information is deprecated.

SizeOfOptionalHeader
ushort SizeOfOptionalHeader;

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 section 3.4, “Optional Header (Image Only).

TimeDateStamp
uint TimeDateStamp;

The low 32 bits of the number of seconds since 00:00 January 1, 1970 (a C run-time time_t value), that indicates when the file was created.

Meta