23 #ifndef LLVM_SUPPORT_COFF_H
24 #define LLVM_SUPPORT_COFF_H
26 #include "llvm/Support/DataTypes.h"
37 static const char PEMagic[] = {
'P',
'E',
'\0',
'\0' };
40 '\xc7',
'\xa1',
'\xba',
'\xd1',
'\xee',
'\xba',
'\xa9',
'\x4b',
41 '\xaf',
'\x20',
'\xfa',
'\xf6',
'\x6a',
'\xa4',
'\xdc',
'\xb8',
436 assert(
isOrdinal() &&
"ILT entry is not an ordinal!");
437 return data & 0xFFFF;
448 assert(!
isOrdinal() &&
"ILT entry is not a Hint/Name RVA!");
671 return SectionNumber <= 0;
A byte; unsigned 1-byte integer.
The Windows character subsystem.
Image can handle > 2GiB addresses.
void setOrdinal(uint16_t o)
Set the ordinal value and set isOrdinal to true.
uint32_t ImportAddressTableRVA
Physical end of function.
uint32_t SymbolTableIndex
Device drivers and native Windows processes.
uint16_t getOrdinal() const
Get the ordinal value of this entry. isOrdinal must be true.
Aggressively trim working set. This is deprecated and must be 0.
Image supports Control Flow Guard.
Isolation aware, but do not isolate the image.
AuxiliarySectionDefinition SectionDefinition
The Windows GUI subsystem.
static const char BigObjMagic[]
The import name is the public symbol name, but skipping the leading ?, @, or optionally _...
COFF symbol table entries for local symbols have been removed.
".bf" or ".ef" - beginning or end of function
No complex type; simple scalar variable.
The import name is identical to the public symbol name.
ASLR with 64 bit address space.
bool isOrdinal() const
Is this entry specified by ordinal, or name?
const int32_t MaxNumberOfSections16
External symbol in dmert public lib.
An unsigned integer of natural size.
bool isReservedSectionNumber(int32_t SectionNumber)
A 4-byte floating-point number.
AuxiliaryWeakExternal WeakExternal
The OS/2 character subsytem.
uint16_t NumberOfRelocations
The PE32 Import Lookup Table.
uint8_t NumberOfAuxSymbols
Used with void pointers and functions.
Machine is based on a 32bit word architecture.
An EFI driver with run-time services.
An EFI driver with boot services.
No type information or unknown base type.
uint32_t SymbolTableIndex
Line number, reformatted as symbol.
An 8-byte floating-point number.
uint32_t ImportLookupTableRVA
Type is formed as (base + (derived << SCT_COMPLEX_TYPE_SHIFT))
void setHintNameRVA(uint32_t rva)
Set the Hint/Name entry RVA and set isOrdinal to false.
A function that returns a base type.
If the image is on removable media, fully load it and copy it to swap.
uint16_t NumberOfLineNumbers
A word; unsigned 2-byte integer.
Little endian: the LSB precedes the MSB in memory.
An unsigned 4-byte integer.
This file should only be run on a uniprocessor machine.
uint32_t PointerToRelocations
DLL can be relocated at load time.
If the image is on network media, fully load it and copy it to swap.
Debugging info has been removed.
uint32_t PointerToNextFunction
uint32_t PointerToRawData
uint32_t RelativeVirtualAddress
SymbolStorageClass
Storage class tells where and what the symbol represents.
".bb" or ".eb" - beginning or end of block
COFF line numbers have been stripped.
Big endian: the MSB precedes the LSB in memory.
A character (signed byte).
The POSIX character subsystem.
The Import Directory Table.
Code integrity checks are enforced.
static const char PEMagic[]
uint32_t PointerToNextFunction
Does not use structured exception handling (SEH).
The image file is a system file, not a user program.
uint32_t PointerToLinenumber
uint16_t NumberOfRelocations
AuxiliaryFunctionDefinition FunctionDefinition
A member of enumeration (a specific value).
uint32_t PointerToLineNumbers
The file does not contain base relocations and must be loaded at its preferred base.
uint32_t getHintNameRVA() const
Get the Hint/Name entry RVA. isOrdinal must be false.
uint16_t NumberOfLinenumbers
The import name is the public symbol name, but skipping the leading ?, @, or optionally _...
WeakExternalCharacteristics
These are not documented in the spec, but are located in WinNT.h.
AuxiliarybfAndefSymbol bfAndefSymbol
The file is valid and can be run.
Native Windows 9x driver.
A natural integer type on the target.