LLVM  7.0.0svn
COFF.h
Go to the documentation of this file.
1 //===-- llvm/BinaryFormat/COFF.h --------------------------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file contains an definitions used in Windows COFF Files.
11 //
12 // Structures and enums defined within this file where created using
13 // information from Microsoft's publicly available PE/COFF format document:
14 //
15 // Microsoft Portable Executable and Common Object File Format Specification
16 // Revision 8.1 - February 15, 2008
17 //
18 // As of 5/2/2010, hosted by Microsoft at:
19 // http://www.microsoft.com/whdc/system/platform/firmware/pecoff.mspx
20 //
21 //===----------------------------------------------------------------------===//
22 
23 #ifndef LLVM_BINARYFORMAT_COFF_H
24 #define LLVM_BINARYFORMAT_COFF_H
25 
26 #include "llvm/Support/DataTypes.h"
27 #include <cassert>
28 #include <cstring>
29 
30 namespace llvm {
31 namespace COFF {
32 
33 // The maximum number of sections that a COFF object can have (inclusive).
34 const int32_t MaxNumberOfSections16 = 65279;
35 
36 // The PE signature bytes that follows the DOS stub header.
37 static const char PEMagic[] = {'P', 'E', '\0', '\0'};
38 
39 static const char BigObjMagic[] = {
40  '\xc7', '\xa1', '\xba', '\xd1', '\xee', '\xba', '\xa9', '\x4b',
41  '\xaf', '\x20', '\xfa', '\xf6', '\x6a', '\xa4', '\xdc', '\xb8',
42 };
43 
44 static const char ClGlObjMagic[] = {
45  '\x38', '\xfe', '\xb3', '\x0c', '\xa5', '\xd9', '\xab', '\x4d',
46  '\xac', '\x9b', '\xd6', '\xb6', '\x22', '\x26', '\x53', '\xc2',
47 };
48 
49 // The signature bytes that start a .res file.
50 static const char WinResMagic[] = {
51  '\x00', '\x00', '\x00', '\x00', '\x20', '\x00', '\x00', '\x00',
52  '\xff', '\xff', '\x00', '\x00', '\xff', '\xff', '\x00', '\x00',
53 };
54 
55 // Sizes in bytes of various things in the COFF format.
56 enum {
59  NameSize = 8,
64 };
65 
66 struct header {
67  uint16_t Machine;
73  uint16_t Characteristics;
74 };
75 
76 struct BigObjHeader {
77  enum : uint16_t { MinBigObjectVersion = 2 };
78 
79  uint16_t Sig1; ///< Must be IMAGE_FILE_MACHINE_UNKNOWN (0).
80  uint16_t Sig2; ///< Must be 0xFFFF.
81  uint16_t Version;
82  uint16_t Machine;
84  uint8_t UUID[16];
92 };
93 
94 enum MachineTypes : unsigned {
95  MT_Invalid = 0xffff,
96 
122 };
123 
124 enum Characteristics : unsigned {
126 
127  /// The file does not contain base relocations and must be loaded at its
128  /// preferred base. If this cannot be done, the loader will error.
130  /// The file is valid and can be run.
132  /// COFF line numbers have been stripped. This is deprecated and should be
133  /// 0.
135  /// COFF symbol table entries for local symbols have been removed. This is
136  /// deprecated and should be 0.
138  /// Aggressively trim working set. This is deprecated and must be 0.
140  /// Image can handle > 2GiB addresses.
142  /// Little endian: the LSB precedes the MSB in memory. This is deprecated
143  /// and should be 0.
145  /// Machine is based on a 32bit word architecture.
147  /// Debugging info has been removed.
149  /// If the image is on removable media, fully load it and copy it to swap.
151  /// If the image is on network media, fully load it and copy it to swap.
153  /// The image file is a system file, not a user program.
155  /// The image file is a DLL.
156  IMAGE_FILE_DLL = 0x2000,
157  /// This file should only be run on a uniprocessor machine.
159  /// Big endian: the MSB precedes the LSB in memory. This is deprecated
160  /// and should be 0.
162 };
163 
164 enum ResourceTypeID : unsigned {
167  RID_Icon = 3,
168  RID_Menu = 4,
172  RID_Font = 8,
181  RID_VXD = 20,
184  RID_HTML = 23,
186 };
187 
188 struct symbol {
189  char Name[NameSize];
191  int32_t SectionNumber;
192  uint16_t Type;
193  uint8_t StorageClass;
195 };
196 
197 enum SymbolSectionNumber : int32_t {
201 };
202 
203 /// Storage class tells where and what the symbol represents
205  SSC_Invalid = 0xff,
206 
207  IMAGE_SYM_CLASS_END_OF_FUNCTION = -1, ///< Physical end of function
208  IMAGE_SYM_CLASS_NULL = 0, ///< No symbol
209  IMAGE_SYM_CLASS_AUTOMATIC = 1, ///< Stack variable
210  IMAGE_SYM_CLASS_EXTERNAL = 2, ///< External symbol
211  IMAGE_SYM_CLASS_STATIC = 3, ///< Static
212  IMAGE_SYM_CLASS_REGISTER = 4, ///< Register variable
213  IMAGE_SYM_CLASS_EXTERNAL_DEF = 5, ///< External definition
214  IMAGE_SYM_CLASS_LABEL = 6, ///< Label
215  IMAGE_SYM_CLASS_UNDEFINED_LABEL = 7, ///< Undefined label
216  IMAGE_SYM_CLASS_MEMBER_OF_STRUCT = 8, ///< Member of structure
217  IMAGE_SYM_CLASS_ARGUMENT = 9, ///< Function argument
218  IMAGE_SYM_CLASS_STRUCT_TAG = 10, ///< Structure tag
219  IMAGE_SYM_CLASS_MEMBER_OF_UNION = 11, ///< Member of union
220  IMAGE_SYM_CLASS_UNION_TAG = 12, ///< Union tag
221  IMAGE_SYM_CLASS_TYPE_DEFINITION = 13, ///< Type definition
222  IMAGE_SYM_CLASS_UNDEFINED_STATIC = 14, ///< Undefined static
223  IMAGE_SYM_CLASS_ENUM_TAG = 15, ///< Enumeration tag
224  IMAGE_SYM_CLASS_MEMBER_OF_ENUM = 16, ///< Member of enumeration
225  IMAGE_SYM_CLASS_REGISTER_PARAM = 17, ///< Register parameter
226  IMAGE_SYM_CLASS_BIT_FIELD = 18, ///< Bit field
227  /// ".bb" or ".eb" - beginning or end of block
229  /// ".bf" or ".ef" - beginning or end of function
231  IMAGE_SYM_CLASS_END_OF_STRUCT = 102, ///< End of structure
232  IMAGE_SYM_CLASS_FILE = 103, ///< File name
233  /// Line number, reformatted as symbol
235  IMAGE_SYM_CLASS_WEAK_EXTERNAL = 105, ///< Duplicate tag
236  /// External symbol in dmert public lib
238 };
239 
240 enum SymbolBaseType : unsigned {
241  IMAGE_SYM_TYPE_NULL = 0, ///< No type information or unknown base type.
242  IMAGE_SYM_TYPE_VOID = 1, ///< Used with void pointers and functions.
243  IMAGE_SYM_TYPE_CHAR = 2, ///< A character (signed byte).
244  IMAGE_SYM_TYPE_SHORT = 3, ///< A 2-byte signed integer.
245  IMAGE_SYM_TYPE_INT = 4, ///< A natural integer type on the target.
246  IMAGE_SYM_TYPE_LONG = 5, ///< A 4-byte signed integer.
247  IMAGE_SYM_TYPE_FLOAT = 6, ///< A 4-byte floating-point number.
248  IMAGE_SYM_TYPE_DOUBLE = 7, ///< An 8-byte floating-point number.
249  IMAGE_SYM_TYPE_STRUCT = 8, ///< A structure.
250  IMAGE_SYM_TYPE_UNION = 9, ///< An union.
251  IMAGE_SYM_TYPE_ENUM = 10, ///< An enumerated type.
252  IMAGE_SYM_TYPE_MOE = 11, ///< A member of enumeration (a specific value).
253  IMAGE_SYM_TYPE_BYTE = 12, ///< A byte; unsigned 1-byte integer.
254  IMAGE_SYM_TYPE_WORD = 13, ///< A word; unsigned 2-byte integer.
255  IMAGE_SYM_TYPE_UINT = 14, ///< An unsigned integer of natural size.
256  IMAGE_SYM_TYPE_DWORD = 15 ///< An unsigned 4-byte integer.
257 };
258 
259 enum SymbolComplexType : unsigned {
260  IMAGE_SYM_DTYPE_NULL = 0, ///< No complex type; simple scalar variable.
261  IMAGE_SYM_DTYPE_POINTER = 1, ///< A pointer to base type.
262  IMAGE_SYM_DTYPE_FUNCTION = 2, ///< A function that returns a base type.
263  IMAGE_SYM_DTYPE_ARRAY = 3, ///< An array of base type.
264 
265  /// Type is formed as (base + (derived << SCT_COMPLEX_TYPE_SHIFT))
267 };
268 
270 
271 struct section {
272  char Name[NameSize];
282 };
283 
285  SC_Invalid = 0xffffffff,
286 
287  IMAGE_SCN_TYPE_NOLOAD = 0x00000002,
288  IMAGE_SCN_TYPE_NO_PAD = 0x00000008,
289  IMAGE_SCN_CNT_CODE = 0x00000020,
292  IMAGE_SCN_LNK_OTHER = 0x00000100,
293  IMAGE_SCN_LNK_INFO = 0x00000200,
294  IMAGE_SCN_LNK_REMOVE = 0x00000800,
295  IMAGE_SCN_LNK_COMDAT = 0x00001000,
296  IMAGE_SCN_GPREL = 0x00008000,
298  IMAGE_SCN_MEM_16BIT = 0x00020000,
299  IMAGE_SCN_MEM_LOCKED = 0x00040000,
300  IMAGE_SCN_MEM_PRELOAD = 0x00080000,
319  IMAGE_SCN_MEM_SHARED = 0x10000000,
320  IMAGE_SCN_MEM_EXECUTE = 0x20000000,
321  IMAGE_SCN_MEM_READ = 0x40000000,
322  IMAGE_SCN_MEM_WRITE = 0x80000000
323 };
324 
325 struct relocation {
328  uint16_t Type;
329 };
330 
331 enum RelocationTypeI386 : unsigned {
343 };
344 
345 enum RelocationTypeAMD64 : unsigned {
363 };
364 
365 enum RelocationTypesARM : unsigned {
381 };
382 
383 enum RelocationTypesARM64 : unsigned {
401 };
402 
403 enum COMDATType : unsigned {
411 };
412 
413 // Auxiliary Symbol Formats
419  char unused[2];
420 };
421 
423  uint8_t unused1[4];
424  uint16_t Linenumber;
425  uint8_t unused2[6];
427  uint8_t unused3[2];
428 };
429 
433  uint8_t unused[10];
434 };
435 
440 };
441 
448  uint8_t Selection;
449  char unused;
450 };
451 
453  uint8_t AuxType;
454  uint8_t unused1;
456  char unused2[12];
457 };
458 
459 union Auxiliary {
464 };
465 
466 /// The Import Directory Table.
467 ///
468 /// There is a single array of these and one entry per imported DLL.
475 };
476 
477 /// The PE32 Import Lookup Table.
478 ///
479 /// There is an array of these for each imported DLL. It represents either
480 /// the ordinal to import from the target DLL, or a name to lookup and import
481 /// from the target DLL.
482 ///
483 /// This also happens to be the same format used by the Import Address Table
484 /// when it is initially written out to the image.
487 
488  /// Is this entry specified by ordinal, or name?
489  bool isOrdinal() const { return data & 0x80000000; }
490 
491  /// Get the ordinal value of this entry. isOrdinal must be true.
492  uint16_t getOrdinal() const {
493  assert(isOrdinal() && "ILT entry is not an ordinal!");
494  return data & 0xFFFF;
495  }
496 
497  /// Set the ordinal value and set isOrdinal to true.
498  void setOrdinal(uint16_t o) {
499  data = o;
500  data |= 0x80000000;
501  }
502 
503  /// Get the Hint/Name entry RVA. isOrdinal must be false.
505  assert(!isOrdinal() && "ILT entry is not a Hint/Name RVA!");
506  return data;
507  }
508 
509  /// Set the Hint/Name entry RVA and set isOrdinal to false.
510  void setHintNameRVA(uint32_t rva) { data = rva; }
511 };
512 
513 /// The DOS compatible header at the front of all PEs.
514 struct DOSHeader {
515  uint16_t Magic;
517  uint16_t FileSizeInPages;
523  uint16_t InitialSP;
524  uint16_t Checksum;
525  uint16_t InitialIP;
528  uint16_t OverlayNumber;
529  uint16_t Reserved[4];
530  uint16_t OEMid;
531  uint16_t OEMinfo;
532  uint16_t Reserved2[10];
534 };
535 
536 struct PE32Header {
537  enum { PE32 = 0x10b, PE32_PLUS = 0x20b };
538 
539  uint16_t Magic;
561  uint16_t Subsystem;
562  // FIXME: This should be DllCharacteristics to match the COFF spec.
569  // FIXME: This should be NumberOfRvaAndSizes to match the COFF spec.
571 };
572 
576 };
577 
578 enum DataDirectoryIndex : unsigned {
594 
596 };
597 
598 enum WindowsSubsystem : unsigned {
599  IMAGE_SUBSYSTEM_UNKNOWN = 0, ///< An unknown subsystem.
600  IMAGE_SUBSYSTEM_NATIVE = 1, ///< Device drivers and native Windows processes
601  IMAGE_SUBSYSTEM_WINDOWS_GUI = 2, ///< The Windows GUI subsystem.
602  IMAGE_SUBSYSTEM_WINDOWS_CUI = 3, ///< The Windows character subsystem.
603  IMAGE_SUBSYSTEM_OS2_CUI = 5, ///< The OS/2 character subsytem.
604  IMAGE_SUBSYSTEM_POSIX_CUI = 7, ///< The POSIX character subsystem.
605  IMAGE_SUBSYSTEM_NATIVE_WINDOWS = 8, ///< Native Windows 9x driver.
606  IMAGE_SUBSYSTEM_WINDOWS_CE_GUI = 9, ///< Windows CE.
607  IMAGE_SUBSYSTEM_EFI_APPLICATION = 10, ///< An EFI application.
608  IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER = 11, ///< An EFI driver with boot
609  /// services.
610  IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER = 12, ///< An EFI driver with run-time
611  /// services.
612  IMAGE_SUBSYSTEM_EFI_ROM = 13, ///< An EFI ROM image.
613  IMAGE_SUBSYSTEM_XBOX = 14, ///< XBOX.
614  IMAGE_SUBSYSTEM_WINDOWS_BOOT_APPLICATION = 16 ///< A BCD application.
615 };
616 
617 enum DLLCharacteristics : unsigned {
618  /// ASLR with 64 bit address space.
620  /// DLL can be relocated at load time.
622  /// Code integrity checks are enforced.
624  ///< Image is NX compatible.
626  /// Isolation aware, but do not isolate the image.
628  /// Does not use structured exception handling (SEH). No SEH handler may be
629  /// called in this image.
631  /// Do not bind the image.
633  ///< Image should execute in an AppContainer.
635  ///< A WDM driver.
637  ///< Image supports Control Flow Guard.
639  /// Terminal Server aware.
641 };
642 
643 enum DebugType : unsigned {
661 };
662 
663 enum BaseRelocationType : unsigned {
674 };
675 
676 enum ImportType : unsigned {
680 };
681 
682 enum ImportNameType : unsigned {
683  /// Import is by ordinal. This indicates that the value in the Ordinal/Hint
684  /// field of the import header is the import's ordinal. If this constant is
685  /// not specified, then the Ordinal/Hint field should always be interpreted
686  /// as the import's hint.
688  /// The import name is identical to the public symbol name
690  /// The import name is the public symbol name, but skipping the leading ?,
691  /// @, or optionally _.
693  /// The import name is the public symbol name, but skipping the leading ?,
694  /// @, or optionally _, and truncating at the first @.
696 };
697 
698 struct ImportHeader {
699  uint16_t Sig1; ///< Must be IMAGE_FILE_MACHINE_UNKNOWN (0).
700  uint16_t Sig2; ///< Must be 0xFFFF.
701  uint16_t Version;
702  uint16_t Machine;
705  uint16_t OrdinalHint;
706  uint16_t TypeInfo;
707 
708  ImportType getType() const { return static_cast<ImportType>(TypeInfo & 0x3); }
709 
711  return static_cast<ImportNameType>((TypeInfo & 0x1C) >> 2);
712  }
713 };
714 
718 };
719 
720 inline bool isReservedSectionNumber(int32_t SectionNumber) {
721  return SectionNumber <= 0;
722 }
723 
724 } // End namespace COFF.
725 } // End namespace llvm.
726 
727 #endif
Debugging info has been removed.
Definition: COFF.h:148
uint32_t BaseOfData
Definition: COFF.h:547
uint32_t SizeOfInitializedData
Definition: COFF.h:543
Isolation aware, but do not isolate the image.
Definition: COFF.h:627
The Windows GUI subsystem.
Definition: COFF.h:601
bool isOrdinal() const
Is this entry specified by ordinal, or name?
Definition: COFF.h:489
SymbolBaseType
Definition: COFF.h:240
uint16_t MaximumExtraParagraphs
Definition: COFF.h:521
The POSIX character subsystem.
Definition: COFF.h:604
WeakExternalCharacteristics
Definition: COFF.h:436
uint32_t NumberOfRvaAndSize
Definition: COFF.h:570
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
int32_t SectionNumber
Definition: COFF.h:191
void setOrdinal(uint16_t o)
Set the ordinal value and set isOrdinal to true.
Definition: COFF.h:498
uint32_t Value
Definition: COFF.h:190
uint32_t unused2
Definition: COFF.h:86
uint16_t OrdinalHint
Definition: COFF.h:705
uint32_t SizeOfRawData
Definition: COFF.h:275
uint16_t Type
Definition: COFF.h:192
Physical end of function.
Definition: COFF.h:207
The image file is a DLL.
Definition: COFF.h:156
An EFI ROM image.
Definition: COFF.h:612
uint32_t unused3
Definition: COFF.h:87
uint32_t SectionAlignment
Definition: COFF.h:549
RelocationTypeI386
Definition: COFF.h:331
uint32_t SizeOfHeapReserve
Definition: COFF.h:566
AuxSymbolType
Definition: COFF.h:269
BaseRelocationType
Definition: COFF.h:663
uint32_t NumberOfSymbols
Definition: COFF.h:91
Import is by ordinal.
Definition: COFF.h:687
Used with void pointers and functions.
Definition: COFF.h:242
An EFI driver with boot services.
Definition: COFF.h:608
Code integrity checks are enforced.
Definition: COFF.h:623
ImportNameType
Definition: COFF.h:682
AuxiliarySectionDefinition SectionDefinition
Definition: COFF.h:463
No complex type; simple scalar variable.
Definition: COFF.h:260
A pointer to base type.
Definition: COFF.h:261
uint16_t Machine
Definition: COFF.h:67
static const char BigObjMagic[]
Definition: COFF.h:39
WindowsSubsystem
Definition: COFF.h:598
uint32_t Win32VersionValue
Definition: COFF.h:557
uint32_t ImageBase
Definition: COFF.h:548
uint32_t PointerToSymbolTable
Definition: COFF.h:90
uint16_t MinorSubsystemVersion
Definition: COFF.h:556
An unsigned integer of natural size.
Definition: COFF.h:255
uint16_t Characteristics
Definition: COFF.h:73
MachineTypes
Definition: COFF.h:94
Machine is based on a 32bit word architecture.
Definition: COFF.h:146
uint32_t NumberOfSections
Definition: COFF.h:89
".bf" or ".ef" - beginning or end of function
Definition: COFF.h:230
uint32_t TimeDateStamp
Definition: COFF.h:703
An 8-byte floating-point number.
Definition: COFF.h:248
uint32_t SizeOfStackReserve
Definition: COFF.h:564
Aggressively trim working set. This is deprecated and must be 0.
Definition: COFF.h:139
CodeViewIdentifiers
Definition: COFF.h:715
uint16_t HeaderSizeInParagraphs
Definition: COFF.h:519
DLLCharacteristics
Definition: COFF.h:617
uint32_t PointerToSymbolTable
Definition: COFF.h:70
uint32_t FileAlignment
Definition: COFF.h:550
uint16_t MajorOperatingSystemVersion
Definition: COFF.h:551
RelocationTypesARM64
Definition: COFF.h:383
An unsigned 4-byte integer.
Definition: COFF.h:256
const int32_t MaxNumberOfSections16
Definition: COFF.h:34
External symbol in dmert public lib.
Definition: COFF.h:237
bool isReservedSectionNumber(int32_t SectionNumber)
Definition: COFF.h:720
uint16_t Checksum
Definition: COFF.h:524
uint16_t getOrdinal() const
Get the ordinal value of this entry. isOrdinal must be true.
Definition: COFF.h:492
uint32_t SizeOfImage
Definition: COFF.h:558
Big endian: the MSB precedes the LSB in memory.
Definition: COFF.h:161
ImportType
Definition: COFF.h:676
ASLR with 64 bit address space.
Definition: COFF.h:619
uint16_t AddressOfRelocationTable
Definition: COFF.h:527
uint32_t LoaderFlags
Definition: COFF.h:568
DataDirectoryIndex
Definition: COFF.h:578
AuxiliaryWeakExternal WeakExternal
Definition: COFF.h:462
The file does not contain base relocations and must be loaded at its preferred base.
Definition: COFF.h:129
uint32_t AddressOfEntryPoint
Definition: COFF.h:545
uint16_t UsedBytesInTheLastPage
Definition: COFF.h:516
Does not use structured exception handling (SEH).
Definition: COFF.h:630
uint32_t SizeOfHeapCommit
Definition: COFF.h:567
uint16_t Machine
Definition: COFF.h:82
uint16_t NumberOfRelocationItems
Definition: COFF.h:518
Type is formed as (base + (derived << SCT_COMPLEX_TYPE_SHIFT))
Definition: COFF.h:266
The PE32 Import Lookup Table.
Definition: COFF.h:485
uint8_t NumberOfAuxSymbols
Definition: COFF.h:194
The DOS compatible header at the front of all PEs.
Definition: COFF.h:514
SectionCharacteristics
Definition: COFF.h:284
uint16_t MinimumExtraParagraphs
Definition: COFF.h:520
static const char ClGlObjMagic[]
Definition: COFF.h:44
RelocationTypeAMD64
Definition: COFF.h:345
uint32_t SizeOfHeaders
Definition: COFF.h:559
uint16_t OverlayNumber
Definition: COFF.h:528
uint16_t MinorOperatingSystemVersion
Definition: COFF.h:552
uint16_t SizeOfOptionalHeader
Definition: COFF.h:72
uint32_t SymbolTableIndex
Definition: COFF.h:327
uint16_t Magic
Definition: COFF.h:539
Image can handle > 2GiB addresses.
Definition: COFF.h:141
Line number, reformatted as symbol.
Definition: COFF.h:234
uint16_t OEMinfo
Definition: COFF.h:531
An array of base type.
Definition: COFF.h:263
Member of enumeration.
Definition: COFF.h:224
uint32_t BaseOfCode
Definition: COFF.h:546
void setHintNameRVA(uint32_t rva)
Set the Hint/Name entry RVA and set isOrdinal to false.
Definition: COFF.h:510
Register variable.
Definition: COFF.h:212
No type information or unknown base type.
Definition: COFF.h:241
uint16_t Subsystem
Definition: COFF.h:561
uint16_t DLLCharacteristics
Definition: COFF.h:563
Little endian: the LSB precedes the MSB in memory.
Definition: COFF.h:144
uint32_t getHintNameRVA() const
Get the Hint/Name entry RVA. isOrdinal must be false.
Definition: COFF.h:504
A member of enumeration (a specific value).
Definition: COFF.h:252
Native Windows 9x driver.
Definition: COFF.h:605
uint16_t NumberOfLineNumbers
Definition: COFF.h:280
uint32_t VirtualAddress
Definition: COFF.h:274
uint16_t Sig2
Must be 0xFFFF.
Definition: COFF.h:700
COFF line numbers have been stripped.
Definition: COFF.h:134
Device drivers and native Windows processes.
Definition: COFF.h:600
uint16_t Version
Definition: COFF.h:81
uint16_t MajorSubsystemVersion
Definition: COFF.h:555
uint32_t TimeDateStamp
Definition: COFF.h:69
ImportType getType() const
Definition: COFF.h:708
The image file is a system file, not a user program.
Definition: COFF.h:154
uint32_t PointerToRelocations
Definition: COFF.h:277
ResourceTypeID
Definition: COFF.h:164
A 4-byte signed integer.
Definition: COFF.h:246
uint16_t InitialRelativeCS
Definition: COFF.h:526
Image supports Control Flow Guard.
Definition: COFF.h:636
uint16_t InitialIP
Definition: COFF.h:525
uint32_t unused1
Definition: COFF.h:85
An enumerated type.
Definition: COFF.h:251
An EFI driver with run-time services.
Definition: COFF.h:610
uint32_t PointerToRawData
Definition: COFF.h:276
uint16_t Sig1
Must be IMAGE_FILE_MACHINE_UNKNOWN (0).
Definition: COFF.h:699
uint32_t RelativeVirtualAddress
Definition: COFF.h:574
uint32_t VirtualSize
Definition: COFF.h:273
SymbolStorageClass
Storage class tells where and what the symbol represents.
Definition: COFF.h:204
".bb" or ".eb" - beginning or end of block
Definition: COFF.h:228
A 2-byte signed integer.
Definition: COFF.h:244
The import name is the public symbol name, but skipping the leading ?, @, or optionally _...
Definition: COFF.h:692
A byte; unsigned 1-byte integer.
Definition: COFF.h:253
Function argument.
Definition: COFF.h:217
If the image is on removable media, fully load it and copy it to swap.
Definition: COFF.h:150
uint8_t MinorLinkerVersion
Definition: COFF.h:541
uint16_t Sig2
Must be 0xFFFF.
Definition: COFF.h:80
If the image is on network media, fully load it and copy it to swap.
Definition: COFF.h:152
uint32_t NumberOfSymbols
Definition: COFF.h:71
The file is valid and can be run.
Definition: COFF.h:131
uint32_t AddressOfNewExeHeader
Definition: COFF.h:533
uint16_t OEMid
Definition: COFF.h:530
A natural integer type on the target.
Definition: COFF.h:245
The OS/2 character subsytem.
Definition: COFF.h:603
COFF symbol table entries for local symbols have been removed.
Definition: COFF.h:137
The Import Directory Table.
Definition: COFF.h:469
uint32_t SizeOfCode
Definition: COFF.h:542
DLL can be relocated at load time.
Definition: COFF.h:621
int32_t NumberOfSections
Definition: COFF.h:68
uint32_t TimeDateStamp
Definition: COFF.h:83
uint32_t CheckSum
Definition: COFF.h:560
This file should only be run on a uniprocessor machine.
Definition: COFF.h:158
RelocationTypesARM
Definition: COFF.h:365
A 4-byte floating-point number.
Definition: COFF.h:247
A word; unsigned 2-byte integer.
Definition: COFF.h:254
static const char PEMagic[]
Definition: COFF.h:37
An unknown subsystem.
Definition: COFF.h:599
COMDATType
Definition: COFF.h:403
uint32_t SizeOfStackCommit
Definition: COFF.h:565
The import name is identical to the public symbol name.
Definition: COFF.h:689
The Windows character subsystem.
Definition: COFF.h:602
uint32_t SizeOfUninitializedData
Definition: COFF.h:544
uint8_t StorageClass
Definition: COFF.h:193
uint32_t unused4
Definition: COFF.h:88
static const char WinResMagic[]
Definition: COFF.h:50
DebugType
Definition: COFF.h:643
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
uint16_t NumberOfRelocations
Definition: COFF.h:279
uint16_t MinorImageVersion
Definition: COFF.h:554
The import name is the public symbol name, but skipping the leading ?, @, or optionally _...
Definition: COFF.h:695
AuxiliaryFunctionDefinition FunctionDefinition
Definition: COFF.h:460
uint16_t InitialSP
Definition: COFF.h:523
SymbolSectionNumber
Definition: COFF.h:197
uint16_t Magic
Definition: COFF.h:515
A character (signed byte).
Definition: COFF.h:243
uint16_t MajorImageVersion
Definition: COFF.h:553
uint16_t InitialRelativeSS
Definition: COFF.h:522
uint32_t PointerToLineNumbers
Definition: COFF.h:278
SymbolComplexType
Definition: COFF.h:259
uint16_t Sig1
Must be IMAGE_FILE_MACHINE_UNKNOWN (0).
Definition: COFF.h:79
uint32_t SizeOfData
Definition: COFF.h:704
ImportNameType getNameType() const
Definition: COFF.h:710
uint16_t FileSizeInPages
Definition: COFF.h:517
AuxiliarybfAndefSymbol bfAndefSymbol
Definition: COFF.h:461
uint32_t Characteristics
Definition: COFF.h:281
uint8_t MajorLinkerVersion
Definition: COFF.h:540
uint32_t VirtualAddress
Definition: COFF.h:326
A function that returns a base type.
Definition: COFF.h:262