LLVM  3.7.0
Support/COFF.h
Go to the documentation of this file.
1 //===-- llvm/Support/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_SUPPORT_COFF_H
24 #define LLVM_SUPPORT_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  // Sizes in bytes of various things in the COFF format.
45  enum {
48  NameSize = 8,
53  };
54 
55  struct header {
56  uint16_t Machine;
58  uint32_t TimeDateStamp;
60  uint32_t NumberOfSymbols;
62  uint16_t Characteristics;
63  };
64 
65  struct BigObjHeader {
66  enum : uint16_t { MinBigObjectVersion = 2 };
67 
68  uint16_t Sig1; ///< Must be IMAGE_FILE_MACHINE_UNKNOWN (0).
69  uint16_t Sig2; ///< Must be 0xFFFF.
70  uint16_t Version;
71  uint16_t Machine;
72  uint32_t TimeDateStamp;
73  uint8_t UUID[16];
74  uint32_t unused1;
75  uint32_t unused2;
76  uint32_t unused3;
77  uint32_t unused4;
78  uint32_t NumberOfSections;
80  uint32_t NumberOfSymbols;
81  };
82 
83  enum MachineTypes {
84  MT_Invalid = 0xffff,
85 
107  };
108 
111 
112  /// The file does not contain base relocations and must be loaded at its
113  /// preferred base. If this cannot be done, the loader will error.
115  /// The file is valid and can be run.
117  /// COFF line numbers have been stripped. This is deprecated and should be
118  /// 0.
120  /// COFF symbol table entries for local symbols have been removed. This is
121  /// deprecated and should be 0.
123  /// Aggressively trim working set. This is deprecated and must be 0.
125  /// Image can handle > 2GiB addresses.
127  /// Little endian: the LSB precedes the MSB in memory. This is deprecated
128  /// and should be 0.
130  /// Machine is based on a 32bit word architecture.
132  /// Debugging info has been removed.
134  /// If the image is on removable media, fully load it and copy it to swap.
136  /// If the image is on network media, fully load it and copy it to swap.
138  /// The image file is a system file, not a user program.
140  /// The image file is a DLL.
141  IMAGE_FILE_DLL = 0x2000,
142  /// This file should only be run on a uniprocessor machine.
144  /// Big endian: the MSB precedes the LSB in memory. This is deprecated
145  /// and should be 0.
147  };
148 
149  struct symbol {
150  char Name[NameSize];
151  uint32_t Value;
152  int32_t SectionNumber;
153  uint16_t Type;
154  uint8_t StorageClass;
156  };
157 
158  enum SymbolSectionNumber : int32_t {
162  };
163 
164  /// Storage class tells where and what the symbol represents
166  SSC_Invalid = 0xff,
167 
168  IMAGE_SYM_CLASS_END_OF_FUNCTION = -1, ///< Physical end of function
169  IMAGE_SYM_CLASS_NULL = 0, ///< No symbol
170  IMAGE_SYM_CLASS_AUTOMATIC = 1, ///< Stack variable
171  IMAGE_SYM_CLASS_EXTERNAL = 2, ///< External symbol
172  IMAGE_SYM_CLASS_STATIC = 3, ///< Static
173  IMAGE_SYM_CLASS_REGISTER = 4, ///< Register variable
174  IMAGE_SYM_CLASS_EXTERNAL_DEF = 5, ///< External definition
175  IMAGE_SYM_CLASS_LABEL = 6, ///< Label
176  IMAGE_SYM_CLASS_UNDEFINED_LABEL = 7, ///< Undefined label
177  IMAGE_SYM_CLASS_MEMBER_OF_STRUCT = 8, ///< Member of structure
178  IMAGE_SYM_CLASS_ARGUMENT = 9, ///< Function argument
179  IMAGE_SYM_CLASS_STRUCT_TAG = 10, ///< Structure tag
180  IMAGE_SYM_CLASS_MEMBER_OF_UNION = 11, ///< Member of union
181  IMAGE_SYM_CLASS_UNION_TAG = 12, ///< Union tag
182  IMAGE_SYM_CLASS_TYPE_DEFINITION = 13, ///< Type definition
183  IMAGE_SYM_CLASS_UNDEFINED_STATIC = 14, ///< Undefined static
184  IMAGE_SYM_CLASS_ENUM_TAG = 15, ///< Enumeration tag
185  IMAGE_SYM_CLASS_MEMBER_OF_ENUM = 16, ///< Member of enumeration
186  IMAGE_SYM_CLASS_REGISTER_PARAM = 17, ///< Register parameter
187  IMAGE_SYM_CLASS_BIT_FIELD = 18, ///< Bit field
188  /// ".bb" or ".eb" - beginning or end of block
190  /// ".bf" or ".ef" - beginning or end of function
192  IMAGE_SYM_CLASS_END_OF_STRUCT = 102, ///< End of structure
193  IMAGE_SYM_CLASS_FILE = 103, ///< File name
194  /// Line number, reformatted as symbol
196  IMAGE_SYM_CLASS_WEAK_EXTERNAL = 105, ///< Duplicate tag
197  /// External symbol in dmert public lib
199  };
200 
202  IMAGE_SYM_TYPE_NULL = 0, ///< No type information or unknown base type.
203  IMAGE_SYM_TYPE_VOID = 1, ///< Used with void pointers and functions.
204  IMAGE_SYM_TYPE_CHAR = 2, ///< A character (signed byte).
205  IMAGE_SYM_TYPE_SHORT = 3, ///< A 2-byte signed integer.
206  IMAGE_SYM_TYPE_INT = 4, ///< A natural integer type on the target.
207  IMAGE_SYM_TYPE_LONG = 5, ///< A 4-byte signed integer.
208  IMAGE_SYM_TYPE_FLOAT = 6, ///< A 4-byte floating-point number.
209  IMAGE_SYM_TYPE_DOUBLE = 7, ///< An 8-byte floating-point number.
210  IMAGE_SYM_TYPE_STRUCT = 8, ///< A structure.
211  IMAGE_SYM_TYPE_UNION = 9, ///< An union.
212  IMAGE_SYM_TYPE_ENUM = 10, ///< An enumerated type.
213  IMAGE_SYM_TYPE_MOE = 11, ///< A member of enumeration (a specific value).
214  IMAGE_SYM_TYPE_BYTE = 12, ///< A byte; unsigned 1-byte integer.
215  IMAGE_SYM_TYPE_WORD = 13, ///< A word; unsigned 2-byte integer.
216  IMAGE_SYM_TYPE_UINT = 14, ///< An unsigned integer of natural size.
217  IMAGE_SYM_TYPE_DWORD = 15 ///< An unsigned 4-byte integer.
218  };
219 
221  IMAGE_SYM_DTYPE_NULL = 0, ///< No complex type; simple scalar variable.
222  IMAGE_SYM_DTYPE_POINTER = 1, ///< A pointer to base type.
223  IMAGE_SYM_DTYPE_FUNCTION = 2, ///< A function that returns a base type.
224  IMAGE_SYM_DTYPE_ARRAY = 3, ///< An array of base type.
225 
226  /// Type is formed as (base + (derived << SCT_COMPLEX_TYPE_SHIFT))
228  };
229 
232  };
233 
234  struct section {
235  char Name[NameSize];
236  uint32_t VirtualSize;
237  uint32_t VirtualAddress;
238  uint32_t SizeOfRawData;
244  uint32_t Characteristics;
245  };
246 
247  enum SectionCharacteristics : uint32_t {
248  SC_Invalid = 0xffffffff,
249 
250  IMAGE_SCN_TYPE_NO_PAD = 0x00000008,
251  IMAGE_SCN_CNT_CODE = 0x00000020,
254  IMAGE_SCN_LNK_OTHER = 0x00000100,
255  IMAGE_SCN_LNK_INFO = 0x00000200,
256  IMAGE_SCN_LNK_REMOVE = 0x00000800,
257  IMAGE_SCN_LNK_COMDAT = 0x00001000,
258  IMAGE_SCN_GPREL = 0x00008000,
260  IMAGE_SCN_MEM_16BIT = 0x00020000,
261  IMAGE_SCN_MEM_LOCKED = 0x00040000,
262  IMAGE_SCN_MEM_PRELOAD = 0x00080000,
281  IMAGE_SCN_MEM_SHARED = 0x10000000,
282  IMAGE_SCN_MEM_EXECUTE = 0x20000000,
283  IMAGE_SCN_MEM_READ = 0x40000000,
284  IMAGE_SCN_MEM_WRITE = 0x80000000
285  };
286 
287  struct relocation {
288  uint32_t VirtualAddress;
290  uint16_t Type;
291  };
292 
305  };
306 
325  };
326 
343  };
344 
345  enum COMDATType {
353  };
354 
355  // Auxiliary Symbol Formats
357  uint32_t TagIndex;
358  uint32_t TotalSize;
361  char unused[2];
362  };
363 
365  uint8_t unused1[4];
366  uint16_t Linenumber;
367  uint8_t unused2[6];
369  uint8_t unused3[2];
370  };
371 
373  uint32_t TagIndex;
374  uint32_t Characteristics;
375  uint8_t unused[10];
376  };
377 
378  /// These are not documented in the spec, but are located in WinNT.h.
383  };
384 
386  uint32_t Length;
389  uint32_t CheckSum;
390  uint32_t Number;
391  uint8_t Selection;
392  char unused;
393  };
394 
396  uint8_t AuxType;
397  uint8_t unused1;
399  char unused2[12];
400  };
401 
402  union Auxiliary {
407  };
408 
409  /// @brief The Import Directory Table.
410  ///
411  /// There is a single array of these and one entry per imported DLL.
414  uint32_t TimeDateStamp;
415  uint32_t ForwarderChain;
416  uint32_t NameRVA;
418  };
419 
420  /// @brief The PE32 Import Lookup Table.
421  ///
422  /// There is an array of these for each imported DLL. It represents either
423  /// the ordinal to import from the target DLL, or a name to lookup and import
424  /// from the target DLL.
425  ///
426  /// This also happens to be the same format used by the Import Address Table
427  /// when it is initially written out to the image.
429  uint32_t data;
430 
431  /// @brief Is this entry specified by ordinal, or name?
432  bool isOrdinal() const { return data & 0x80000000; }
433 
434  /// @brief Get the ordinal value of this entry. isOrdinal must be true.
435  uint16_t getOrdinal() const {
436  assert(isOrdinal() && "ILT entry is not an ordinal!");
437  return data & 0xFFFF;
438  }
439 
440  /// @brief Set the ordinal value and set isOrdinal to true.
441  void setOrdinal(uint16_t o) {
442  data = o;
443  data |= 0x80000000;
444  }
445 
446  /// @brief Get the Hint/Name entry RVA. isOrdinal must be false.
447  uint32_t getHintNameRVA() const {
448  assert(!isOrdinal() && "ILT entry is not a Hint/Name RVA!");
449  return data;
450  }
451 
452  /// @brief Set the Hint/Name entry RVA and set isOrdinal to false.
453  void setHintNameRVA(uint32_t rva) { data = rva; }
454  };
455 
456  /// @brief The DOS compatible header at the front of all PEs.
457  struct DOSHeader {
458  uint16_t Magic;
460  uint16_t FileSizeInPages;
466  uint16_t InitialSP;
467  uint16_t Checksum;
468  uint16_t InitialIP;
471  uint16_t OverlayNumber;
472  uint16_t Reserved[4];
473  uint16_t OEMid;
474  uint16_t OEMinfo;
475  uint16_t Reserved2[10];
477  };
478 
479  struct PE32Header {
480  enum {
481  PE32 = 0x10b,
482  PE32_PLUS = 0x20b
483  };
484 
485  uint16_t Magic;
488  uint32_t SizeOfCode;
491  uint32_t AddressOfEntryPoint; // RVA
492  uint32_t BaseOfCode; // RVA
493  uint32_t BaseOfData; // RVA
494  uint32_t ImageBase;
496  uint32_t FileAlignment;
504  uint32_t SizeOfImage;
505  uint32_t SizeOfHeaders;
506  uint32_t CheckSum;
507  uint16_t Subsystem;
508  // FIXME: This should be DllCharacteristics to match the COFF spec.
514  uint32_t LoaderFlags;
515  // FIXME: This should be NumberOfRvaAndSizes to match the COFF spec.
517  };
518 
519  struct DataDirectory {
521  uint32_t Size;
522  };
523 
540 
542  };
543 
545  IMAGE_SUBSYSTEM_UNKNOWN = 0, ///< An unknown subsystem.
546  IMAGE_SUBSYSTEM_NATIVE = 1, ///< Device drivers and native Windows processes
547  IMAGE_SUBSYSTEM_WINDOWS_GUI = 2, ///< The Windows GUI subsystem.
548  IMAGE_SUBSYSTEM_WINDOWS_CUI = 3, ///< The Windows character subsystem.
549  IMAGE_SUBSYSTEM_OS2_CUI = 5, ///< The OS/2 character subsytem.
550  IMAGE_SUBSYSTEM_POSIX_CUI = 7, ///< The POSIX character subsystem.
551  IMAGE_SUBSYSTEM_NATIVE_WINDOWS = 8, ///< Native Windows 9x driver.
552  IMAGE_SUBSYSTEM_WINDOWS_CE_GUI = 9, ///< Windows CE.
553  IMAGE_SUBSYSTEM_EFI_APPLICATION = 10, ///< An EFI application.
554  IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER = 11, ///< An EFI driver with boot
555  /// services.
556  IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER = 12, ///< An EFI driver with run-time
557  /// services.
558  IMAGE_SUBSYSTEM_EFI_ROM = 13, ///< An EFI ROM image.
559  IMAGE_SUBSYSTEM_XBOX = 14, ///< XBOX.
560  IMAGE_SUBSYSTEM_WINDOWS_BOOT_APPLICATION = 16 ///< A BCD application.
561  };
562 
564  /// ASLR with 64 bit address space.
566  /// DLL can be relocated at load time.
568  /// Code integrity checks are enforced.
570  ///< Image is NX compatible.
572  /// Isolation aware, but do not isolate the image.
574  /// Does not use structured exception handling (SEH). No SEH handler may be
575  /// called in this image.
577  /// Do not bind the image.
579  ///< Image should execute in an AppContainer.
581  ///< A WDM driver.
583  ///< Image supports Control Flow Guard.
585  /// Terminal Server aware.
587  };
588 
589  enum DebugType {
601  };
602 
614  };
615 
616  enum ImportType {
620  };
621 
623  /// Import is by ordinal. This indicates that the value in the Ordinal/Hint
624  /// field of the import header is the import's ordinal. If this constant is
625  /// not specified, then the Ordinal/Hint field should always be interpreted
626  /// as the import's hint.
628  /// The import name is identical to the public symbol name
630  /// The import name is the public symbol name, but skipping the leading ?,
631  /// @, or optionally _.
633  /// The import name is the public symbol name, but skipping the leading ?,
634  /// @, or optionally _, and truncating at the first @.
636  };
637 
638  struct ImportHeader {
639  uint16_t Sig1; ///< Must be IMAGE_FILE_MACHINE_UNKNOWN (0).
640  uint16_t Sig2; ///< Must be 0xFFFF.
641  uint16_t Version;
642  uint16_t Machine;
643  uint32_t TimeDateStamp;
644  uint32_t SizeOfData;
645  uint16_t OrdinalHint;
646  uint16_t TypeInfo;
647 
648  ImportType getType() const {
649  return static_cast<ImportType>(TypeInfo & 0x3);
650  }
651 
653  return static_cast<ImportNameType>((TypeInfo & 0x1C) >> 3);
654  }
655  };
656 
664 
665  // Symbol subsections are split into records of different types.
668  };
669 
670  inline bool isReservedSectionNumber(int32_t SectionNumber) {
671  return SectionNumber <= 0;
672  }
673 
674 } // End namespace COFF.
675 } // End namespace llvm.
676 
677 #endif
A byte; unsigned 1-byte integer.
Definition: Support/COFF.h:214
uint32_t SizeOfInitializedData
Definition: Support/COFF.h:489
uint16_t MaximumExtraParagraphs
Definition: Support/COFF.h:464
The Windows character subsystem.
Definition: Support/COFF.h:548
Image can handle > 2GiB addresses.
Definition: Support/COFF.h:126
A pointer to base type.
Definition: Support/COFF.h:222
void setOrdinal(uint16_t o)
Set the ordinal value and set isOrdinal to true.
Definition: Support/COFF.h:441
ImportType getType() const
Definition: Support/COFF.h:648
Device drivers and native Windows processes.
Definition: Support/COFF.h:546
A 4-byte signed integer.
Definition: Support/COFF.h:207
Import is by ordinal.
Definition: Support/COFF.h:627
char Name[NameSize]
Definition: Support/COFF.h:235
uint16_t getOrdinal() const
Get the ordinal value of this entry. isOrdinal must be true.
Definition: Support/COFF.h:435
Aggressively trim working set. This is deprecated and must be 0.
Definition: Support/COFF.h:124
Image supports Control Flow Guard.
Definition: Support/COFF.h:582
Isolation aware, but do not isolate the image.
Definition: Support/COFF.h:573
AuxiliarySectionDefinition SectionDefinition
Definition: Support/COFF.h:406
uint16_t Reserved2[10]
Definition: Support/COFF.h:475
The Windows GUI subsystem.
Definition: Support/COFF.h:547
static const char BigObjMagic[]
Definition: Support/COFF.h:39
uint16_t MinorSubsystemVersion
Definition: Support/COFF.h:502
The import name is the public symbol name, but skipping the leading ?, @, or optionally _...
Definition: Support/COFF.h:635
COFF symbol table entries for local symbols have been removed.
Definition: Support/COFF.h:122
uint16_t Characteristics
Definition: Support/COFF.h:62
".bf" or ".ef" - beginning or end of function
Definition: Support/COFF.h:191
No complex type; simple scalar variable.
Definition: Support/COFF.h:221
The import name is identical to the public symbol name.
Definition: Support/COFF.h:629
A 2-byte signed integer.
Definition: Support/COFF.h:205
uint16_t HeaderSizeInParagraphs
Definition: Support/COFF.h:462
uint32_t PointerToSymbolTable
Definition: Support/COFF.h:59
uint16_t MajorOperatingSystemVersion
Definition: Support/COFF.h:497
bool isOrdinal() const
Is this entry specified by ordinal, or name?
Definition: Support/COFF.h:432
const int32_t MaxNumberOfSections16
Definition: Support/COFF.h:34
External symbol in dmert public lib.
Definition: Support/COFF.h:198
An unsigned integer of natural size.
Definition: Support/COFF.h:216
bool isReservedSectionNumber(int32_t SectionNumber)
Definition: Support/COFF.h:670
A 4-byte floating-point number.
Definition: Support/COFF.h:208
uint16_t AddressOfRelocationTable
Definition: Support/COFF.h:470
An array of base type.
Definition: Support/COFF.h:224
AuxiliaryWeakExternal WeakExternal
Definition: Support/COFF.h:405
uint16_t UsedBytesInTheLastPage
Definition: Support/COFF.h:459
The OS/2 character subsytem.
Definition: Support/COFF.h:549
uint16_t NumberOfRelocationItems
Definition: Support/COFF.h:461
The PE32 Import Lookup Table.
Definition: Support/COFF.h:428
uint8_t NumberOfAuxSymbols
Definition: Support/COFF.h:155
Used with void pointers and functions.
Definition: Support/COFF.h:203
The DOS compatible header at the front of all PEs.
Definition: Support/COFF.h:457
uint16_t MinimumExtraParagraphs
Definition: Support/COFF.h:463
Machine is based on a 32bit word architecture.
Definition: Support/COFF.h:131
An EFI driver with run-time services.
Definition: Support/COFF.h:556
An EFI driver with boot services.
Definition: Support/COFF.h:554
No type information or unknown base type.
Definition: Support/COFF.h:202
uint16_t MinorOperatingSystemVersion
Definition: Support/COFF.h:498
uint16_t SizeOfOptionalHeader
Definition: Support/COFF.h:61
ImportNameType getNameType() const
Definition: Support/COFF.h:652
Line number, reformatted as symbol.
Definition: Support/COFF.h:195
An 8-byte floating-point number.
Definition: Support/COFF.h:209
The image file is a DLL.
Definition: Support/COFF.h:141
Type is formed as (base + (derived << SCT_COMPLEX_TYPE_SHIFT))
Definition: Support/COFF.h:227
void setHintNameRVA(uint32_t rva)
Set the Hint/Name entry RVA and set isOrdinal to false.
Definition: Support/COFF.h:453
A function that returns a base type.
Definition: Support/COFF.h:223
If the image is on removable media, fully load it and copy it to swap.
Definition: Support/COFF.h:135
uint16_t NumberOfLineNumbers
Definition: Support/COFF.h:243
uint16_t Sig2
Must be 0xFFFF.
Definition: Support/COFF.h:640
A word; unsigned 2-byte integer.
Definition: Support/COFF.h:215
uint16_t MajorSubsystemVersion
Definition: Support/COFF.h:501
uint32_t TimeDateStamp
Definition: Support/COFF.h:58
Little endian: the LSB precedes the MSB in memory.
Definition: Support/COFF.h:129
An unsigned 4-byte integer.
Definition: Support/COFF.h:217
This file should only be run on a uniprocessor machine.
Definition: Support/COFF.h:143
uint32_t PointerToRelocations
Definition: Support/COFF.h:240
DLL can be relocated at load time.
Definition: Support/COFF.h:567
If the image is on network media, fully load it and copy it to swap.
Definition: Support/COFF.h:137
Debugging info has been removed.
Definition: Support/COFF.h:133
uint32_t PointerToRawData
Definition: Support/COFF.h:239
uint16_t Sig1
Must be IMAGE_FILE_MACHINE_UNKNOWN (0).
Definition: Support/COFF.h:639
SymbolStorageClass
Storage class tells where and what the symbol represents.
Definition: Support/COFF.h:165
".bb" or ".eb" - beginning or end of block
Definition: Support/COFF.h:189
COFF line numbers have been stripped.
Definition: Support/COFF.h:119
uint16_t Sig2
Must be 0xFFFF.
Definition: Support/COFF.h:69
uint32_t NumberOfSymbols
Definition: Support/COFF.h:60
Big endian: the MSB precedes the LSB in memory.
Definition: Support/COFF.h:146
A character (signed byte).
Definition: Support/COFF.h:204
uint32_t AddressOfNewExeHeader
Definition: Support/COFF.h:476
The POSIX character subsystem.
Definition: Support/COFF.h:550
The Import Directory Table.
Definition: Support/COFF.h:412
Code integrity checks are enforced.
Definition: Support/COFF.h:569
int32_t NumberOfSections
Definition: Support/COFF.h:57
static const char PEMagic[]
Definition: Support/COFF.h:37
Does not use structured exception handling (SEH).
Definition: Support/COFF.h:576
The image file is a system file, not a user program.
Definition: Support/COFF.h:139
char Name[NameSize]
Definition: Support/COFF.h:150
uint32_t SizeOfUninitializedData
Definition: Support/COFF.h:490
uint16_t NumberOfRelocations
Definition: Support/COFF.h:242
AuxiliaryFunctionDefinition FunctionDefinition
Definition: Support/COFF.h:403
A member of enumeration (a specific value).
Definition: Support/COFF.h:213
uint32_t PointerToLineNumbers
Definition: Support/COFF.h:241
The file does not contain base relocations and must be loaded at its preferred base.
Definition: Support/COFF.h:114
uint16_t Sig1
Must be IMAGE_FILE_MACHINE_UNKNOWN (0).
Definition: Support/COFF.h:68
uint32_t getHintNameRVA() const
Get the Hint/Name entry RVA. isOrdinal must be false.
Definition: Support/COFF.h:447
The import name is the public symbol name, but skipping the leading ?, @, or optionally _...
Definition: Support/COFF.h:632
WeakExternalCharacteristics
These are not documented in the spec, but are located in WinNT.h.
Definition: Support/COFF.h:379
AuxiliarybfAndefSymbol bfAndefSymbol
Definition: Support/COFF.h:404
uint32_t Characteristics
Definition: Support/COFF.h:244
The file is valid and can be run.
Definition: Support/COFF.h:116
A natural integer type on the target.
Definition: Support/COFF.h:206