llvm::COFF

Constants, structures, and helpers for the Windows COFF and PE formats.

Types

NameDescription
Auxiliary Union of COFF auxiliary symbol record layouts.
AuxiliaryCLRToken Auxiliary record for a CLR token definition.
AuxiliaryFunctionDefinition Auxiliary record for a function-definition symbol.
AuxiliarySectionDefinition Auxiliary record for a section-definition symbol.
AuxiliaryWeakExternal Auxiliary record for a weak-external symbol.
AuxiliarybfAndefSymbol Auxiliary record for beginning-of-function / end-of-function symbols.
BigObjHeader Microsoft bigobj COFF file header for objects with many sections.
DOSHeader The DOS compatible header at the front of all PEs.
DataDirectory PE data-directory entry (RVA and size of a table).
ImportDirectoryTableEntry The Import Directory Table.
ImportHeader Short import library object header.
ImportLookupTableEntry32 The PE32 Import Lookup Table.
PE32Header PE32/PE32+ optional header fields shared by both formats.
header Standard COFF file header.
relocation COFF relocation entry.
section COFF section header.
symbol COFF symbol table entry.

Enums

NameDescription
Unnamed enum Fixed sizes in bytes of common COFF structures.
Arm64ECThunkType ARM64EC thunk kinds used in hybrid images.
Arm64XFixupType ARM64X dynamic value relocation fixup kinds.
AuxSymbolType Auxiliary symbol record type identifiers.
BaseRelocationType PE base relocation type codes.
COMDATType COMDAT section selection types.
Characteristics COFF file header characteristic flags.
CodeViewIdentifiers Magic values identifying CodeView debug sections.
DLLCharacteristics DLL characteristic flags in the PE optional header.
DataDirectoryIndex Indices into the PE optional-header data directory array.
DebugType PE debug directory entry type codes.
DynamicRelocationType Dynamic relocation types used in PE load configuration.
ExtendedDLLCharacteristics Extended DLL characteristic flags (debug directory type 20).
Feat00Flags Feature flags stored in the feat.00 COFF symbol.
GuardFlags Control Flow Guard and related flags from the load configuration.
ImportNameType Import name type encoding in a short import library header.
ImportType Import object type in a short import library header.
MachineTypes COFF target machine type identifiers.
RelocationTypeAMD64 AMD64 COFF relocation type codes.
RelocationTypeI386 i386 COFF relocation type codes.
RelocationTypesARM ARM COFF relocation type codes.
RelocationTypesARM64 ARM64 COFF relocation type codes.
RelocationTypesMips MIPS COFF relocation type codes.
ResourceTypeID Predefined Windows resource type identifiers.
SectionCharacteristics COFF section characteristic flags.
SymbolBaseType Fundamental COFF symbol base type codes.
SymbolComplexType Derived (complex) COFF symbol type codes and the packing shift.
SymbolSectionNumber Special COFF symbol section number values.
SymbolStorageClass Storage class tells where and what the symbol represents
WeakExternalCharacteristics Characteristics describing how a weak external should be resolved.
WindowsSubsystem Windows subsystem identifiers for PE images.

Functions

NameDescription
encodeSectionName Encode section name based on string table offset. The size of Out must be at least COFF::NameSize.
is64Bit Return true if Machine is a 64-bit COFF target (AMD64 or ARM64*).
isAnyArm64 Return true if Machine is any ARM64 variant (including EC/X).
isArm64EC Return true if Machine is ARM64EC or ARM64X.
isReservedSectionNumber Return true if SectionNumber is a reserved special section number.
operator| Bitwise disjunction operators

Variables

NameDescription
MaxNumberOfSections16 Maximum number of sections a COFF object can have (inclusive).