LLVM 20.0.0git
COFF.h
Go to the documentation of this file.
1//===- COFF.h - COFF object file implementation -----------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file declares the COFFObjectFile class.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_OBJECT_COFF_H
14#define LLVM_OBJECT_COFF_H
15
18#include "llvm/Object/Binary.h"
20#include "llvm/Object/Error.h"
24#include "llvm/Support/Endian.h"
27#include <cassert>
28#include <cstddef>
29#include <cstdint>
30#include <system_error>
31
32namespace llvm {
33
34template <typename T> class ArrayRef;
35
36namespace object {
37
38class Arm64XRelocRef;
39class BaseRelocRef;
40class DelayImportDirectoryEntryRef;
41class DynamicRelocRef;
42class ExportDirectoryEntryRef;
43class ImportDirectoryEntryRef;
44class ImportedSymbolRef;
45class ResourceSectionRef;
46
55
56/// The DOS compatible header at the front of all PE/COFF executables.
57struct dos_header {
58 char Magic[2];
77};
78
87
88 bool isImportLibrary() const { return NumberOfSections == 0xffff; }
89};
90
97 uint8_t UUID[16];
105};
106
107/// The 32-bit PE header that follows the COFF header.
132 // FIXME: This should be DllCharacteristics.
139 // FIXME: This should be NumberOfRvaAndSizes.
141};
142
143/// The 64-bit PE header that follows the COFF header.
174};
175
179};
180
190};
191
192template <typename IntTy>
194 IntTy Data;
195
196 bool isOrdinal() const { return Data < 0; }
197
199 assert(isOrdinal() && "ILT entry is not an ordinal!");
200 return Data & 0xFFFF;
201 }
202
204 assert(!isOrdinal() && "ILT entry is not a Hint/Name RVA!");
205 return Data & 0xFFFFFFFF;
206 }
207};
208
213
215 // dumpbin reports this field as "Characteristics" instead of "Attributes".
224};
225
238};
239
243};
244
247
251};
252
253template <typename SectionNumberType>
255 union {
259
261 SectionNumberType SectionNumber;
262
264
267};
268
271
272// Contains only common parts of coff_symbol16 and coff_symbol32.
274 union {
279};
280
283
285public:
286 COFFSymbolRef() = default;
287 COFFSymbolRef(const coff_symbol16 *CS) : CS16(CS) {}
288 COFFSymbolRef(const coff_symbol32 *CS) : CS32(CS) {}
289
290 const void *getRawPtr() const {
291 return CS16 ? static_cast<const void *>(CS16) : CS32;
292 }
293
295 if (CS16)
296 return reinterpret_cast<const coff_symbol_generic *>(CS16);
297 return reinterpret_cast<const coff_symbol_generic *>(CS32);
298 }
299
301 return A.getRawPtr() < B.getRawPtr();
302 }
303
304 bool isBigObj() const {
305 if (CS16)
306 return false;
307 if (CS32)
308 return true;
309 llvm_unreachable("COFFSymbolRef points to nothing!");
310 }
311
312 const char *getShortName() const {
313 return CS16 ? CS16->Name.ShortName : CS32->Name.ShortName;
314 }
315
317 assert(isSet() && "COFFSymbolRef points to nothing!");
318 return CS16 ? CS16->Name.Offset : CS32->Name.Offset;
319 }
320
322 assert(isSet() && "COFFSymbolRef points to nothing!");
323 return CS16 ? CS16->Value : CS32->Value;
324 }
325
326 int32_t getSectionNumber() const {
327 assert(isSet() && "COFFSymbolRef points to nothing!");
328 if (CS16) {
329 // Reserved sections are returned as negative numbers.
331 return CS16->SectionNumber;
332 return static_cast<int16_t>(CS16->SectionNumber);
333 }
334 return static_cast<int32_t>(CS32->SectionNumber);
335 }
336
338 assert(isSet() && "COFFSymbolRef points to nothing!");
339 return CS16 ? CS16->Type : CS32->Type;
340 }
341
342 uint8_t getStorageClass() const {
343 assert(isSet() && "COFFSymbolRef points to nothing!");
344 return CS16 ? CS16->StorageClass : CS32->StorageClass;
345 }
346
347 uint8_t getNumberOfAuxSymbols() const {
348 assert(isSet() && "COFFSymbolRef points to nothing!");
349 return CS16 ? CS16->NumberOfAuxSymbols : CS32->NumberOfAuxSymbols;
350 }
351
352 uint8_t getBaseType() const { return getType() & 0x0F; }
353
354 uint8_t getComplexType() const {
355 return (getType() & 0xF0) >> COFF::SCT_COMPLEX_TYPE_SHIFT;
356 }
357
358 template <typename T> const T *getAux() const {
359 return CS16 ? reinterpret_cast<const T *>(CS16 + 1)
360 : reinterpret_cast<const T *>(CS32 + 1);
361 }
362
364 if (!getNumberOfAuxSymbols() ||
366 return nullptr;
367 return getAux<coff_aux_section_definition>();
368 }
369
371 if (!getNumberOfAuxSymbols() ||
373 return nullptr;
374 return getAux<coff_aux_weak_external>();
375 }
376
377 bool isAbsolute() const {
378 return getSectionNumber() == -1;
379 }
380
381 bool isExternal() const {
383 }
384
385 bool isCommon() const {
386 return (isExternal() || isSection()) &&
388 }
389
390 bool isUndefined() const {
392 getValue() == 0;
393 }
394
395 bool isWeakExternal() const {
397 }
398
399 bool isFunctionDefinition() const {
403 }
404
405 bool isFunctionLineInfo() const {
407 }
408
409 bool isAnyUndefined() const {
410 return isUndefined() || isWeakExternal();
411 }
412
413 bool isFileRecord() const {
415 }
416
417 bool isSection() const {
419 }
420
421 bool isSectionDefinition() const {
422 // C++/CLI creates external ABS symbols for non-const appdomain globals.
423 // These are also followed by an auxiliary section definition.
424 bool isAppdomainGlobal =
427 bool isOrdinarySection = getStorageClass() == COFF::IMAGE_SYM_CLASS_STATIC;
429 return false;
430 return isAppdomainGlobal || isOrdinarySection;
431 }
432
433 bool isCLRToken() const {
435 }
436
437private:
438 bool isSet() const { return CS16 || CS32; }
439
440 const coff_symbol16 *CS16 = nullptr;
441 const coff_symbol32 *CS32 = nullptr;
442};
443
455
456 // Returns true if the actual number of relocations is stored in
457 // VirtualAddress field of the first relocation table entry.
460 NumberOfRelocations == UINT16_MAX;
461 }
462
464 // The IMAGE_SCN_TYPE_NO_PAD bit is a legacy way of getting to
465 // IMAGE_SCN_ALIGN_1BYTES.
467 return 1;
468
469 // Bit [20:24] contains section alignment. 0 means use a default alignment
470 // of 16.
471 uint32_t Shift = (Characteristics >> 20) & 0xF;
472 if (Shift > 0)
473 return 1U << (Shift - 1);
474 return 16;
475 }
476};
477
482};
483
489 char Unused1[2];
490};
491
492static_assert(sizeof(coff_aux_function_definition) == 18,
493 "auxiliary entry must be 18 bytes");
494
496 char Unused1[4];
498 char Unused2[6];
500 char Unused3[2];
501};
502
503static_assert(sizeof(coff_aux_bf_and_ef_symbol) == 18,
504 "auxiliary entry must be 18 bytes");
505
509 char Unused1[10];
510};
511
512static_assert(sizeof(coff_aux_weak_external) == 18,
513 "auxiliary entry must be 18 bytes");
514
521 uint8_t Selection;
522 uint8_t Unused;
524 int32_t getNumber(bool IsBigObj) const {
525 uint32_t Number = static_cast<uint32_t>(NumberLowPart);
526 if (IsBigObj)
527 Number |= static_cast<uint32_t>(NumberHighPart) << 16;
528 return static_cast<int32_t>(Number);
529 }
530};
531
532static_assert(sizeof(coff_aux_section_definition) == 18,
533 "auxiliary entry must be 18 bytes");
534
536 uint8_t AuxType;
537 uint8_t Reserved;
539 char MBZ[12];
540};
541
542static_assert(sizeof(coff_aux_clr_token) == 18,
543 "auxiliary entry must be 18 bytes");
544
554
555 int getType() const { return TypeInfo & 0x3; }
556 int getNameType() const { return (TypeInfo >> 2) & 0x7; }
557};
558
565
566 bool isNull() const {
567 return ImportLookupTableRVA == 0 && TimeDateStamp == 0 &&
568 ForwarderChain == 0 && NameRVA == 0 && ImportAddressTableRVA == 0;
569 }
570};
571
572template <typename IntTy>
580
582 // Bit [20:24] contains section alignment.
584 if (Shift > 0)
585 return 1U << (Shift - 1);
586 return 0;
587 }
588
590 uint32_t AlignBits = 0;
591 if (Align) {
592 assert(llvm::isPowerOf2_32(Align) && "alignment is not a power of 2");
593 assert(llvm::Log2_32(Align) <= 13 && "alignment requested is too large");
594 AlignBits = (llvm::Log2_32(Align) + 1) << 20;
595 }
597 (Characteristics & ~COFF::IMAGE_SCN_ALIGN_MASK) | AlignBits;
598 }
599};
600
603
604enum class frame_type : uint16_t { Fpo = 0, Trap = 1, Tss = 2, NonFpo = 3 };
605
611};
612
613/// 32-bit load config (IMAGE_LOAD_CONFIG_DIRECTORY32)
635
636 // Added in MSVC 2015 for /guard:cf.
641 support::ulittle32_t GuardFlags; // coff_guard_flags
642
643 // Added in MSVC 2017
658
659 // Added in MSVC 2019
669};
670
671/// 64-bit load config (IMAGE_LOAD_CONFIG_DIRECTORY64)
693
694 // Added in MSVC 2015 for /guard:cf.
700
701 // Added in MSVC 2017
716
717 // Added in MSVC 2019
727};
728
750};
751
752enum chpe_range_type { Arm64 = 0, Arm64EC = 1, Amd64 = 2 };
753
757
758 // The two low bits of StartOffset contain a range type.
759 static constexpr uint32_t TypeMask = 3;
760
761 uint32_t getStart() const { return StartOffset & ~TypeMask; }
762 uint16_t getType() const { return StartOffset & TypeMask; }
763};
764
769};
770
774};
775
780};
781
785};
786
789
790 int getType() const { return Data >> 12; }
791 int getOffset() const { return Data & ((1 << 12) - 1); }
792};
793
795 union {
798 uint32_t getNameOffset() const {
799 return maskTrailingOnes<uint32_t>(31) & NameOffset;
800 }
801 // Even though the PE/COFF spec doesn't mention this, the high bit of a name
802 // offset is set.
803 void setNameOffset(uint32_t Offset) { NameOffset = Offset | (1 << 31); }
805 union {
808
809 bool isSubDir() const { return SubdirOffset >> 31; }
810 uint32_t value() const {
811 return maskTrailingOnes<uint32_t>(31) & SubdirOffset;
812 }
813
815};
816
822};
823
831};
832
837};
838
842};
843
847};
848
852};
853
860};
861
868};
869
871private:
873
876 const coff_file_header *COFFHeader;
877 const coff_bigobj_file_header *COFFBigObjHeader;
878 const pe32_header *PE32Header;
879 const pe32plus_header *PE32PlusHeader;
880 const data_directory *DataDirectory;
881 const coff_section *SectionTable;
882 const coff_symbol16 *SymbolTable16;
883 const coff_symbol32 *SymbolTable32;
884 const char *StringTable;
885 uint32_t StringTableSize;
886 const coff_import_directory_table_entry *ImportDirectory;
887 const delay_import_directory_table_entry *DelayImportDirectory;
888 uint32_t NumberOfDelayImportDirectory;
889 const export_directory_table_entry *ExportDirectory;
890 const coff_base_reloc_block_header *BaseRelocHeader;
891 const coff_base_reloc_block_header *BaseRelocEnd;
892 const debug_directory *DebugDirectoryBegin;
893 const debug_directory *DebugDirectoryEnd;
894 const coff_tls_directory32 *TLSDirectory32;
895 const coff_tls_directory64 *TLSDirectory64;
896 // Either coff_load_configuration32 or coff_load_configuration64.
897 const void *LoadConfig = nullptr;
898 const chpe_metadata *CHPEMetadata = nullptr;
899 const coff_dynamic_reloc_table *DynamicRelocTable = nullptr;
900
901 Expected<StringRef> getString(uint32_t offset) const;
902
903 template <typename coff_symbol_type>
904 const coff_symbol_type *toSymb(DataRefImpl Symb) const;
905 const coff_section *toSec(DataRefImpl Sec) const;
906 const coff_relocation *toRel(DataRefImpl Rel) const;
907
908 // Finish initializing the object and return success or an error.
910
911 Error initSymbolTablePtr();
912 Error initImportTablePtr();
913 Error initDelayImportTablePtr();
914 Error initExportTablePtr();
915 Error initBaseRelocPtr();
916 Error initDebugDirectoryPtr();
917 Error initTLSDirectoryPtr();
918 Error initLoadConfigPtr();
919 Error initDynamicRelocPtr(uint32_t SectionIndex, uint32_t SectionOffset);
920
921public:
923 create(MemoryBufferRef Object);
924
925 uintptr_t getSymbolTable() const {
926 if (SymbolTable16)
927 return reinterpret_cast<uintptr_t>(SymbolTable16);
928 if (SymbolTable32)
929 return reinterpret_cast<uintptr_t>(SymbolTable32);
930 return uintptr_t(0);
931 }
932
934 if (COFFHeader) {
935 if (CHPEMetadata) {
936 switch (COFFHeader->Machine) {
941 }
942 }
943 return COFFHeader->Machine;
944 }
945 if (COFFBigObjHeader)
946 return COFFBigObjHeader->Machine;
947 llvm_unreachable("no COFF header!");
948 }
949
951 if (COFFHeader)
952 return COFFHeader->isImportLibrary() ? 0
953 : COFFHeader->SizeOfOptionalHeader;
954 // bigobj doesn't have this field.
955 if (COFFBigObjHeader)
956 return 0;
957 llvm_unreachable("no COFF header!");
958 }
959
961 if (COFFHeader)
962 return COFFHeader->isImportLibrary() ? 0 : COFFHeader->Characteristics;
963 // bigobj doesn't have characteristics to speak of,
964 // editbin will silently lie to you if you attempt to set any.
965 if (COFFBigObjHeader)
966 return 0;
967 llvm_unreachable("no COFF header!");
968 }
969
971 if (COFFHeader)
972 return COFFHeader->TimeDateStamp;
973 if (COFFBigObjHeader)
974 return COFFBigObjHeader->TimeDateStamp;
975 llvm_unreachable("no COFF header!");
976 }
977
979 if (COFFHeader)
980 return COFFHeader->isImportLibrary() ? 0 : COFFHeader->NumberOfSections;
981 if (COFFBigObjHeader)
982 return COFFBigObjHeader->NumberOfSections;
983 llvm_unreachable("no COFF header!");
984 }
985
987 if (COFFHeader)
988 return COFFHeader->isImportLibrary() ? 0
989 : COFFHeader->PointerToSymbolTable;
990 if (COFFBigObjHeader)
991 return COFFBigObjHeader->PointerToSymbolTable;
992 llvm_unreachable("no COFF header!");
993 }
994
996 if (COFFHeader)
997 return COFFHeader->isImportLibrary() ? 0 : COFFHeader->NumberOfSymbols;
998 if (COFFBigObjHeader)
999 return COFFBigObjHeader->NumberOfSymbols;
1000 llvm_unreachable("no COFF header!");
1001 }
1002
1004 if (!SymbolTable16 && !SymbolTable32)
1005 return 0;
1006 return getRawNumberOfSymbols();
1007 }
1008
1009 uint32_t getStringTableSize() const { return StringTableSize; }
1010
1012 return ExportDirectory;
1013 }
1014
1016 assert(!is64());
1017 return reinterpret_cast<const coff_load_configuration32 *>(LoadConfig);
1018 }
1019
1021 assert(is64());
1022 return reinterpret_cast<const coff_load_configuration64 *>(LoadConfig);
1023 }
1024
1025 const chpe_metadata *getCHPEMetadata() const { return CHPEMetadata; }
1027 return DynamicRelocTable;
1028 }
1029
1031
1032protected:
1033 void moveSymbolNext(DataRefImpl &Symb) const override;
1034 Expected<StringRef> getSymbolName(DataRefImpl Symb) const override;
1035 Expected<uint64_t> getSymbolAddress(DataRefImpl Symb) const override;
1036 uint32_t getSymbolAlignment(DataRefImpl Symb) const override;
1037 uint64_t getSymbolValueImpl(DataRefImpl Symb) const override;
1038 uint64_t getCommonSymbolSizeImpl(DataRefImpl Symb) const override;
1039 Expected<uint32_t> getSymbolFlags(DataRefImpl Symb) const override;
1042 void moveSectionNext(DataRefImpl &Sec) const override;
1044 uint64_t getSectionAddress(DataRefImpl Sec) const override;
1045 uint64_t getSectionIndex(DataRefImpl Sec) const override;
1046 uint64_t getSectionSize(DataRefImpl Sec) const override;
1048 getSectionContents(DataRefImpl Sec) const override;
1049 uint64_t getSectionAlignment(DataRefImpl Sec) const override;
1050 bool isSectionCompressed(DataRefImpl Sec) const override;
1051 bool isSectionText(DataRefImpl Sec) const override;
1052 bool isSectionData(DataRefImpl Sec) const override;
1053 bool isSectionBSS(DataRefImpl Sec) const override;
1054 bool isSectionVirtual(DataRefImpl Sec) const override;
1055 bool isDebugSection(DataRefImpl Sec) const override;
1058
1059 void moveRelocationNext(DataRefImpl &Rel) const override;
1060 uint64_t getRelocationOffset(DataRefImpl Rel) const override;
1062 uint64_t getRelocationType(DataRefImpl Rel) const override;
1064 SmallVectorImpl<char> &Result) const override;
1065
1066public:
1067 basic_symbol_iterator symbol_begin() const override;
1068 basic_symbol_iterator symbol_end() const override;
1069 section_iterator section_begin() const override;
1070 section_iterator section_end() const override;
1071
1072 bool is64Bit() const override { return false; }
1073
1074 const coff_section *getCOFFSection(const SectionRef &Section) const;
1076 COFFSymbolRef getCOFFSymbol(const SymbolRef &Symbol) const;
1077 const coff_relocation *getCOFFRelocation(const RelocationRef &Reloc) const;
1078 unsigned getSectionID(SectionRef Sec) const;
1079 unsigned getSymbolSectionID(SymbolRef Sym) const;
1080
1081 uint8_t getBytesInAddress() const override;
1082 StringRef getFileFormatName() const override;
1083 Triple::ArchType getArch() const override;
1084 Expected<uint64_t> getStartAddress() const override;
1086 return SubtargetFeatures();
1087 }
1088 std::unique_ptr<MemoryBuffer> getHybridObjectView() const;
1089
1101 return DebugDirectoryBegin;
1102 }
1104 return DebugDirectoryEnd;
1105 }
1106
1115 }
1116
1118 return TLSDirectory32;
1119 }
1121 return TLSDirectory64;
1122 }
1123
1124 const dos_header *getDOSHeader() const {
1125 if (!PE32Header && !PE32PlusHeader)
1126 return nullptr;
1127 return reinterpret_cast<const dos_header *>(base());
1128 }
1129
1130 const coff_file_header *getCOFFHeader() const { return COFFHeader; }
1132 return COFFBigObjHeader;
1133 }
1134 const pe32_header *getPE32Header() const { return PE32Header; }
1135 const pe32plus_header *getPE32PlusHeader() const { return PE32PlusHeader; }
1136
1137 const data_directory *getDataDirectory(uint32_t index) const;
1138 Expected<const coff_section *> getSection(int32_t index) const;
1139
1141 if (index >= getNumberOfSymbols())
1143 if (SymbolTable16)
1144 return COFFSymbolRef(SymbolTable16 + index);
1145 if (SymbolTable32)
1146 return COFFSymbolRef(SymbolTable32 + index);
1148 }
1149
1150 template <typename T>
1151 Error getAuxSymbol(uint32_t index, const T *&Res) const {
1153 if (Error E = S.takeError())
1154 return E;
1155 Res = reinterpret_cast<const T *>(S->getRawPtr());
1156 return Error::success();
1157 }
1158
1161
1163
1165
1167 if (COFFHeader)
1168 return sizeof(coff_symbol16);
1169 if (COFFBigObjHeader)
1170 return sizeof(coff_symbol32);
1171 llvm_unreachable("null symbol table pointer!");
1172 }
1173
1175
1177 uint64_t getSectionSize(const coff_section *Sec) const;
1179 ArrayRef<uint8_t> &Res) const;
1180
1181 uint64_t getImageBase() const;
1182 Error getVaPtr(uint64_t VA, uintptr_t &Res) const;
1183 Error getRvaPtr(uint32_t Rva, uintptr_t &Res,
1184 const char *ErrorContext = nullptr) const;
1185
1186 /// Given an RVA base and size, returns a valid array of bytes or an error
1187 /// code if the RVA and size is not contained completely within a valid
1188 /// section.
1190 ArrayRef<uint8_t> &Contents,
1191 const char *ErrorContext = nullptr) const;
1192
1194 StringRef &Name) const;
1195
1196 /// Get PDB information out of a codeview debug directory entry.
1197 Error getDebugPDBInfo(const debug_directory *DebugDir,
1198 const codeview::DebugInfo *&Info,
1199 StringRef &PDBFileName) const;
1200
1201 /// Get PDB information from an executable. If the information is not present,
1202 /// Info will be set to nullptr and PDBFileName will be empty. An error is
1203 /// returned only on corrupt object files. Convenience accessor that can be
1204 /// used if the debug directory is not already handy.
1206 StringRef &PDBFileName) const;
1207
1208 bool isRelocatableObject() const override;
1209 bool is64() const { return PE32PlusHeader; }
1210
1212
1213 static bool classof(const Binary *v) { return v->isCOFF(); }
1214};
1215
1216// The iterator for the import directory table.
1218public:
1221 uint32_t I, const COFFObjectFile *Owner)
1222 : ImportTable(Table), Index(I), OwningObject(Owner) {}
1223
1224 bool operator==(const ImportDirectoryEntryRef &Other) const;
1225 void moveNext();
1226
1230
1234
1235 Error getName(StringRef &Result) const;
1236 Error getImportLookupTableRVA(uint32_t &Result) const;
1238
1239 Error
1241
1242private:
1243 const coff_import_directory_table_entry *ImportTable;
1245 const COFFObjectFile *OwningObject = nullptr;
1246};
1247
1249public:
1252 uint32_t I, const COFFObjectFile *Owner)
1253 : Table(T), Index(I), OwningObject(Owner) {}
1254
1255 bool operator==(const DelayImportDirectoryEntryRef &Other) const;
1256 void moveNext();
1257
1261
1262 Error getName(StringRef &Result) const;
1264 const delay_import_directory_table_entry *&Result) const;
1265 Error getImportAddress(int AddrIndex, uint64_t &Result) const;
1266
1267private:
1270 const COFFObjectFile *OwningObject = nullptr;
1271};
1272
1273// The iterator for the export directory table entry.
1275public:
1278 const COFFObjectFile *Owner)
1279 : ExportTable(Table), Index(I), OwningObject(Owner) {}
1280
1281 bool operator==(const ExportDirectoryEntryRef &Other) const;
1282 void moveNext();
1283
1284 Error getDllName(StringRef &Result) const;
1285 Error getOrdinalBase(uint32_t &Result) const;
1286 Error getOrdinal(uint32_t &Result) const;
1287 Error getExportRVA(uint32_t &Result) const;
1288 Error getSymbolName(StringRef &Result) const;
1289
1290 Error isForwarder(bool &Result) const;
1291 Error getForwardTo(StringRef &Result) const;
1292
1293private:
1294 const export_directory_table_entry *ExportTable;
1296 const COFFObjectFile *OwningObject = nullptr;
1297};
1298
1300public:
1303 const COFFObjectFile *Owner)
1304 : Entry32(Entry), Entry64(nullptr), Index(I), OwningObject(Owner) {}
1306 const COFFObjectFile *Owner)
1307 : Entry32(nullptr), Entry64(Entry), Index(I), OwningObject(Owner) {}
1308
1309 bool operator==(const ImportedSymbolRef &Other) const;
1310 void moveNext();
1311
1312 Error getSymbolName(StringRef &Result) const;
1313 Error isOrdinal(bool &Result) const;
1314 Error getOrdinal(uint16_t &Result) const;
1315 Error getHintNameRVA(uint32_t &Result) const;
1316
1317private:
1318 const import_lookup_table_entry32 *Entry32;
1319 const import_lookup_table_entry64 *Entry64;
1321 const COFFObjectFile *OwningObject = nullptr;
1322};
1323
1325public:
1326 BaseRelocRef() = default;
1328 const COFFObjectFile *Owner)
1329 : Header(Header), Index(0) {}
1330
1331 bool operator==(const BaseRelocRef &Other) const;
1332 void moveNext();
1333
1334 Error getType(uint8_t &Type) const;
1335 Error getRVA(uint32_t &Result) const;
1336
1337private:
1338 const coff_base_reloc_block_header *Header;
1340};
1341
1343public:
1344 DynamicRelocRef() = default;
1345 DynamicRelocRef(const void *Header, const COFFObjectFile *Owner)
1346 : Obj(Owner), Header(reinterpret_cast<const uint8_t *>(Header)) {}
1347
1348 bool operator==(const DynamicRelocRef &Other) const;
1349 void moveNext();
1350 uint32_t getType() const;
1351 void getContents(ArrayRef<uint8_t> &Ref) const;
1352
1356
1357private:
1358 Error validate() const;
1359
1360 const COFFObjectFile *Obj;
1361 const uint8_t *Header;
1362
1363 friend class COFFObjectFile;
1364};
1365
1367public:
1368 Arm64XRelocRef() = default;
1370 : Header(Header), Index(Index) {}
1371
1372 bool operator==(const Arm64XRelocRef &Other) const;
1373 void moveNext();
1374
1376 return COFF::Arm64XFixupType((getReloc() >> 12) & 3);
1377 }
1378 uint32_t getRVA() const { return Header->PageRVA + (getReloc() & 0xfff); }
1379 uint8_t getSize() const;
1380 uint64_t getValue() const;
1381
1382private:
1383 const support::ulittle16_t &getReloc(uint32_t Offset = 0) const {
1384 return reinterpret_cast<const support::ulittle16_t *>(Header +
1385 1)[Index + Offset];
1386 }
1387
1388 uint16_t getArg() const { return getReloc() >> 14; }
1389 uint8_t getEntrySize() const;
1390 Error validate(const COFFObjectFile *Obj) const;
1391
1392 const coff_base_reloc_block_header *Header;
1393 uint32_t Index;
1394
1395 friend class DynamicRelocRef;
1396};
1397
1399public:
1402 : BBS(Ref, llvm::endianness::little) {}
1403
1404 Error load(const COFFObjectFile *O);
1405 Error load(const COFFObjectFile *O, const SectionRef &S);
1406
1416
1418
1419private:
1420 BinaryByteStream BBS;
1421
1422 SectionRef Section;
1423 const COFFObjectFile *Obj = nullptr;
1424
1425 std::vector<const coff_relocation *> Relocs;
1426
1429 getTableEntryAtOffset(uint32_t Offset);
1431 getDataEntryAtOffset(uint32_t Offset);
1432 Expected<ArrayRef<UTF16>> getDirStringAtOffset(uint32_t Offset);
1433};
1434
1435// Corresponds to `_FPO_DATA` structure in the PE/COFF spec.
1436struct FpoData {
1437 support::ulittle32_t Offset; // ulOffStart: Offset 1st byte of function code
1438 support::ulittle32_t Size; // cbProcSize: # bytes in function
1439 support::ulittle32_t NumLocals; // cdwLocals: # bytes in locals/4
1440 support::ulittle16_t NumParams; // cdwParams: # bytes in params/4
1442
1443 // cbProlog: # bytes in prolog
1444 int getPrologSize() const { return Attributes & 0xF; }
1445
1446 // cbRegs: # regs saved
1447 int getNumSavedRegs() const { return (Attributes >> 8) & 0x7; }
1448
1449 // fHasSEH: true if seh is func
1450 bool hasSEH() const { return (Attributes >> 9) & 1; }
1451
1452 // fUseBP: true if EBP has been allocated
1453 bool useBP() const { return (Attributes >> 10) & 1; }
1454
1455 // cbFrame: frame pointer
1456 frame_type getFP() const { return static_cast<frame_type>(Attributes >> 14); }
1457};
1458
1460 : public ErrorInfo<SectionStrippedError, BinaryError> {
1461public:
1463};
1464
1465} // end namespace object
1466
1467} // end namespace llvm
1468
1469#endif // LLVM_OBJECT_COFF_H
aarch64 promote const
AMDGPU Mark last scratch load
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
Analysis containing CSE Info
Definition: CSEInfo.cpp:27
Given that RA is a live value
std::string Name
uint64_t Size
Symbol * Sym
Definition: ELF_riscv.cpp:479
#define I(x, y, z)
Definition: MD5.cpp:58
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, ArrayRef< StringLiteral > StandardNames)
Initialize the set of available library functions based on the specified target triple.
std::pair< llvm::MachO::Target, std::string > UUID
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: ArrayRef.h:41
An implementation of BinaryStream which holds its entire data set in a single contiguous buffer.
Base class for user error types.
Definition: Error.h:355
Lightweight error class with error context and mandatory checking.
Definition: Error.h:160
static ErrorSuccess success()
Create a success value.
Definition: Error.h:337
Tagged union holding either a T or a Error.
Definition: Error.h:481
Error takeError()
Take ownership of the stored error.
Definition: Error.h:608
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Definition: SmallVector.h:587
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
Manages the enabling and disabling of subtarget specific features.
The instances of the Type class are immutable: once they are created, they are never changed.
Definition: Type.h:45
A range adaptor for a pair of iterators.
uint32_t getRVA() const
Definition: COFF.h:1378
Arm64XRelocRef(const coff_base_reloc_block_header *Header, uint32_t Index=0)
Definition: COFF.h:1369
COFF::Arm64XFixupType getType() const
Definition: COFF.h:1375
BaseRelocRef(const coff_base_reloc_block_header *Header, const COFFObjectFile *Owner)
Definition: COFF.h:1327
Error getType(uint8_t &Type) const
Error getRVA(uint32_t &Result) const
const dos_header * getDOSHeader() const
Definition: COFF.h:1124
uint64_t getSectionSize(DataRefImpl Sec) const override
Expected< StringRef > getSectionName(DataRefImpl Sec) const override
static bool classof(const Binary *v)
Definition: COFF.h:1213
uint64_t getSectionIndex(DataRefImpl Sec) const override
uint32_t getRawNumberOfSymbols() const
Definition: COFF.h:995
dynamic_reloc_iterator dynamic_reloc_begin() const
std::unique_ptr< MemoryBuffer > getHybridObjectView() const
uint32_t getSymbolAlignment(DataRefImpl Symb) const override
bool isSectionCompressed(DataRefImpl Sec) const override
const coff_tls_directory64 * getTLSDirectory64() const
Definition: COFF.h:1120
void moveRelocationNext(DataRefImpl &Rel) const override
Expected< section_iterator > getSymbolSection(DataRefImpl Symb) const override
uint8_t getBytesInAddress() const override
The number of bytes used to represent an address in this object file format.
export_directory_iterator export_directory_begin() const
delay_import_directory_iterator delay_import_directory_end() const
base_reloc_iterator base_reloc_begin() const
section_iterator section_end() const override
const pe32_header * getPE32Header() const
Definition: COFF.h:1134
Expected< COFFSymbolRef > getSymbol(uint32_t index) const
Definition: COFF.h:1140
Error getVaPtr(uint64_t VA, uintptr_t &Res) const
uint64_t getRelocationType(DataRefImpl Rel) const override
void moveSymbolNext(DataRefImpl &Symb) const override
uint64_t getCommonSymbolSizeImpl(DataRefImpl Symb) const override
iterator_range< delay_import_directory_iterator > delay_import_directories() const
const debug_directory * debug_directory_end() const
Definition: COFF.h:1103
import_directory_iterator import_directory_end() const
const coff_tls_directory32 * getTLSDirectory32() const
Definition: COFF.h:1117
Expected< SubtargetFeatures > getFeatures() const override
Definition: COFF.h:1085
uint32_t getPointerToSymbolTable() const
Definition: COFF.h:986
const coff_relocation * getCOFFRelocation(const RelocationRef &Reloc) const
Expected< StringRef > getSymbolName(DataRefImpl Symb) const override
bool isDebugSection(DataRefImpl Sec) const override
iterator_range< const debug_directory * > debug_directories() const
Definition: COFF.h:1113
const coff_dynamic_reloc_table * getDynamicRelocTable() const
Definition: COFF.h:1026
StringRef getRelocationTypeName(uint16_t Type) const
bool isSectionBSS(DataRefImpl Sec) const override
base_reloc_iterator base_reloc_end() const
uint64_t getSectionAddress(DataRefImpl Sec) const override
Expected< uint64_t > getSymbolAddress(DataRefImpl Symb) const override
uint32_t getNumberOfSymbols() const
Definition: COFF.h:1003
section_iterator section_begin() const override
Expected< SymbolRef::Type > getSymbolType(DataRefImpl Symb) const override
const coff_file_header * getCOFFHeader() const
Definition: COFF.h:1130
size_t getSymbolTableEntrySize() const
Definition: COFF.h:1166
export_directory_iterator export_directory_end() const
Error getHintName(uint32_t Rva, uint16_t &Hint, StringRef &Name) const
Error getAuxSymbol(uint32_t index, const T *&Res) const
Definition: COFF.h:1151
uintptr_t getSymbolTable() const
Definition: COFF.h:925
static Expected< std::unique_ptr< COFFObjectFile > > create(MemoryBufferRef Object)
bool isSectionVirtual(DataRefImpl Sec) const override
unsigned getSectionID(SectionRef Sec) const
const coff_bigobj_file_header * getCOFFBigObjHeader() const
Definition: COFF.h:1131
relocation_iterator section_rel_begin(DataRefImpl Sec) const override
iterator_range< import_directory_iterator > import_directories() const
delay_import_directory_iterator delay_import_directory_begin() const
basic_symbol_iterator symbol_end() const override
Error getRvaAndSizeAsBytes(uint32_t RVA, uint32_t Size, ArrayRef< uint8_t > &Contents, const char *ErrorContext=nullptr) const
Given an RVA base and size, returns a valid array of bytes or an error code if the RVA and size is no...
const coff_load_configuration64 * getLoadConfig64() const
Definition: COFF.h:1020
iterator_range< export_directory_iterator > export_directories() const
uint32_t getNumberOfSections() const
Definition: COFF.h:978
uint64_t getRelocationOffset(DataRefImpl Rel) const override
basic_symbol_iterator symbol_begin() const override
uint32_t getTimeDateStamp() const
Definition: COFF.h:970
Triple::ArchType getArch() const override
uint32_t getStringTableSize() const
Definition: COFF.h:1009
bool isRelocatableObject() const override
True if this is a relocatable object (.o/.obj).
Expected< uint32_t > getSymbolFlags(DataRefImpl Symb) const override
const chpe_metadata * getCHPEMetadata() const
Definition: COFF.h:1025
const debug_directory * debug_directory_begin() const
Definition: COFF.h:1100
Expected< const coff_section * > getSection(int32_t index) const
bool isSectionText(DataRefImpl Sec) const override
Expected< ArrayRef< uint8_t > > getSectionContents(DataRefImpl Sec) const override
const data_directory * getDataDirectory(uint32_t index) const
StringRef mapDebugSectionName(StringRef Name) const override
Maps a debug section name to a standard DWARF section name.
ArrayRef< uint8_t > getSymbolAuxData(COFFSymbolRef Symbol) const
const coff_load_configuration32 * getLoadConfig32() const
Definition: COFF.h:1015
const coff_section * getCOFFSection(const SectionRef &Section) const
import_directory_iterator import_directory_begin() const
void moveSectionNext(DataRefImpl &Sec) const override
relocation_iterator section_rel_end(DataRefImpl Sec) const override
dynamic_reloc_iterator dynamic_reloc_end() const
ArrayRef< coff_relocation > getRelocations(const coff_section *Sec) const
uint64_t getSymbolValueImpl(DataRefImpl Symb) const override
uint16_t getSizeOfOptionalHeader() const
Definition: COFF.h:950
Error getRvaPtr(uint32_t Rva, uintptr_t &Res, const char *ErrorContext=nullptr) const
uint16_t getCharacteristics() const
Definition: COFF.h:960
iterator_range< dynamic_reloc_iterator > dynamic_relocs() const
unsigned getSymbolSectionID(SymbolRef Sym) const
Error getDebugPDBInfo(const debug_directory *DebugDir, const codeview::DebugInfo *&Info, StringRef &PDBFileName) const
Get PDB information out of a codeview debug directory entry.
const pe32plus_header * getPE32PlusHeader() const
Definition: COFF.h:1135
symbol_iterator getRelocationSymbol(DataRefImpl Rel) const override
uint64_t getSectionAlignment(DataRefImpl Sec) const override
uint32_t getSymbolIndex(COFFSymbolRef Symbol) const
uint16_t getMachine() const
Definition: COFF.h:933
COFFSymbolRef getCOFFSymbol(const DataRefImpl &Ref) const
const export_directory_table_entry * getExportTable() const
Definition: COFF.h:1011
Expected< uint64_t > getStartAddress() const override
iterator_range< base_reloc_iterator > base_relocs() const
bool isSectionData(DataRefImpl Sec) const override
bool is64Bit() const override
Definition: COFF.h:1072
StringRef getFileFormatName() const override
const void * getRawPtr() const
Definition: COFF.h:290
bool isCommon() const
Definition: COFF.h:385
const StringTableOffset & getStringTableOffset() const
Definition: COFF.h:316
uint8_t getStorageClass() const
Definition: COFF.h:342
uint16_t getType() const
Definition: COFF.h:337
const T * getAux() const
Definition: COFF.h:358
bool isAnyUndefined() const
Definition: COFF.h:409
bool isFileRecord() const
Definition: COFF.h:413
const coff_symbol_generic * getGeneric() const
Definition: COFF.h:294
const coff_aux_weak_external * getWeakExternal() const
Definition: COFF.h:370
bool isAbsolute() const
Definition: COFF.h:377
bool isSectionDefinition() const
Definition: COFF.h:421
uint8_t getComplexType() const
Definition: COFF.h:354
uint8_t getNumberOfAuxSymbols() const
Definition: COFF.h:347
bool isExternal() const
Definition: COFF.h:381
bool isFunctionLineInfo() const
Definition: COFF.h:405
uint8_t getBaseType() const
Definition: COFF.h:352
COFFSymbolRef(const coff_symbol32 *CS)
Definition: COFF.h:288
COFFSymbolRef(const coff_symbol16 *CS)
Definition: COFF.h:287
uint32_t getValue() const
Definition: COFF.h:321
const coff_aux_section_definition * getSectionDefinition() const
Definition: COFF.h:363
bool isWeakExternal() const
Definition: COFF.h:395
friend bool operator<(COFFSymbolRef A, COFFSymbolRef B)
Definition: COFF.h:300
const char * getShortName() const
Definition: COFF.h:312
bool isSection() const
Definition: COFF.h:417
int32_t getSectionNumber() const
Definition: COFF.h:326
bool isCLRToken() const
Definition: COFF.h:433
bool isBigObj() const
Definition: COFF.h:304
bool isUndefined() const
Definition: COFF.h:390
bool isFunctionDefinition() const
Definition: COFF.h:399
imported_symbol_iterator imported_symbol_begin() const
Error getImportAddress(int AddrIndex, uint64_t &Result) const
iterator_range< imported_symbol_iterator > imported_symbols() const
imported_symbol_iterator imported_symbol_end() const
Error getDelayImportTable(const delay_import_directory_table_entry *&Result) const
DelayImportDirectoryEntryRef(const delay_import_directory_table_entry *T, uint32_t I, const COFFObjectFile *Owner)
Definition: COFF.h:1251
Error getName(StringRef &Result) const
arm64x_reloc_iterator arm64x_reloc_begin() const
void getContents(ArrayRef< uint8_t > &Ref) const
arm64x_reloc_iterator arm64x_reloc_end() const
iterator_range< arm64x_reloc_iterator > arm64x_relocs() const
DynamicRelocRef(const void *Header, const COFFObjectFile *Owner)
Definition: COFF.h:1345
Error getDllName(StringRef &Result) const
ExportDirectoryEntryRef(const export_directory_table_entry *Table, uint32_t I, const COFFObjectFile *Owner)
Definition: COFF.h:1277
Error getExportRVA(uint32_t &Result) const
Error getOrdinalBase(uint32_t &Result) const
Error getOrdinal(uint32_t &Result) const
Error isForwarder(bool &Result) const
Error getForwardTo(StringRef &Result) const
Error getSymbolName(StringRef &Result) const
imported_symbol_iterator imported_symbol_end() const
imported_symbol_iterator imported_symbol_begin() const
Error getImportLookupTableRVA(uint32_t &Result) const
Error getImportTableEntry(const coff_import_directory_table_entry *&Result) const
imported_symbol_iterator lookup_table_end() const
ImportDirectoryEntryRef(const coff_import_directory_table_entry *Table, uint32_t I, const COFFObjectFile *Owner)
Definition: COFF.h:1220
iterator_range< imported_symbol_iterator > lookup_table_symbols() const
iterator_range< imported_symbol_iterator > imported_symbols() const
imported_symbol_iterator lookup_table_begin() const
Error getImportAddressTableRVA(uint32_t &Result) const
Error getName(StringRef &Result) const
Error getHintNameRVA(uint32_t &Result) const
ImportedSymbolRef(const import_lookup_table_entry32 *Entry, uint32_t I, const COFFObjectFile *Owner)
Definition: COFF.h:1302
Error getOrdinal(uint16_t &Result) const
Error getSymbolName(StringRef &Result) const
ImportedSymbolRef(const import_lookup_table_entry64 *Entry, uint32_t I, const COFFObjectFile *Owner)
Definition: COFF.h:1305
Error isOrdinal(bool &Result) const
This class is the base class for all object file types.
Definition: ObjectFile.h:229
const uint8_t * base() const
Definition: ObjectFile.h:235
This is a value type class that represents a single relocation in the list of relocations in the obje...
Definition: ObjectFile.h:52
Expected< const coff_resource_dir_table & > getBaseTable()
Expected< const coff_resource_dir_table & > getEntrySubDir(const coff_resource_dir_entry &Entry)
Expected< const coff_resource_data_entry & > getEntryData(const coff_resource_dir_entry &Entry)
ResourceSectionRef(StringRef Ref)
Definition: COFF.h:1401
Expected< ArrayRef< UTF16 > > getEntryNameString(const coff_resource_dir_entry &Entry)
Expected< StringRef > getContents(const coff_resource_data_entry &Entry)
Expected< const coff_resource_dir_entry & > getTableEntry(const coff_resource_dir_table &Table, uint32_t Index)
This is a value type class that represents a single section in the list of sections in the object fil...
Definition: ObjectFile.h:81
This is a value type class that represents a single symbol in the list of symbols in the object file.
Definition: ObjectFile.h:168
This provides a very simple, boring adaptor for a begin and end iterator into a range type.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
@ IMAGE_FILE_MACHINE_ARM64
Definition: COFF.h:100
@ IMAGE_FILE_MACHINE_AMD64
Definition: COFF.h:97
@ IMAGE_FILE_MACHINE_ARM64EC
Definition: COFF.h:101
@ IMAGE_FILE_MACHINE_ARM64X
Definition: COFF.h:102
@ IMAGE_SCN_ALIGN_MASK
Definition: COFF.h:328
@ IMAGE_SCN_LNK_NRELOC_OVFL
Definition: COFF.h:329
@ IMAGE_SCN_TYPE_NO_PAD
Definition: COFF.h:301
@ NameSize
Definition: COFF.h:57
@ IMAGE_SYM_CLASS_SECTION
Line number, reformatted as symbol.
Definition: COFF.h:247
@ IMAGE_SYM_CLASS_FUNCTION
".bf" or ".ef" - beginning or end of function
Definition: COFF.h:243
@ IMAGE_SYM_CLASS_EXTERNAL
External symbol.
Definition: COFF.h:223
@ IMAGE_SYM_CLASS_FILE
File name.
Definition: COFF.h:245
@ IMAGE_SYM_CLASS_CLR_TOKEN
External symbol in dmert public lib.
Definition: COFF.h:250
@ IMAGE_SYM_CLASS_WEAK_EXTERNAL
Duplicate tag.
Definition: COFF.h:248
@ IMAGE_SYM_CLASS_STATIC
Static.
Definition: COFF.h:224
Arm64XFixupType
Definition: COFF.h:429
const int32_t MaxNumberOfSections16
Definition: COFF.h:32
bool isReservedSectionNumber(int32_t SectionNumber)
Definition: COFF.h:830
@ IMAGE_SYM_TYPE_NULL
No type information or unknown base type.
Definition: COFF.h:254
@ IMAGE_SYM_UNDEFINED
Definition: COFF.h:213
@ IMAGE_SYM_ABSOLUTE
Definition: COFF.h:212
@ IMAGE_SYM_DTYPE_FUNCTION
A function that returns a base type.
Definition: COFF.h:275
@ SCT_COMPLEX_TYPE_SHIFT
Type is formed as (base + (derived << SCT_COMPLEX_TYPE_SHIFT))
Definition: COFF.h:279
coff_symbol< support::ulittle32_t > coff_symbol32
Definition: COFF.h:270
coff_symbol< support::ulittle16_t > coff_symbol16
Definition: COFF.h:269
chpe_range_type
Definition: COFF.h:752
@ Arm64EC
Definition: COFF.h:752
detail::packed_endian_specific_integral< uint16_t, llvm::endianness::little, unaligned > ulittle16_t
Definition: Endian.h:282
detail::packed_endian_specific_integral< uint32_t, llvm::endianness::little, unaligned > ulittle32_t
Definition: Endian.h:285
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
@ Offset
Definition: DWP.cpp:480
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
unsigned Log2_32(uint32_t Value)
Return the floor log base 2 of the specified value, -1 if the value is zero.
Definition: MathExtras.h:340
constexpr bool isPowerOf2_32(uint32_t Value)
Return true if the argument is a power of two > 0.
Definition: MathExtras.h:291
@ Ref
The access may reference the value stored in memory.
@ Other
Any other memory.
ArrayRef(const T &OneElt) -> ArrayRef< T >
Error errorCodeToError(std::error_code EC)
Helper for converting an std::error_code to a Error.
Definition: Error.cpp:111
endianness
Definition: bit.h:70
This struct is a compact representation of a valid (non-zero power of two) alignment.
Definition: Alignment.h:39
support::ulittle32_t NumLocals
Definition: COFF.h:1439
bool hasSEH() const
Definition: COFF.h:1450
bool useBP() const
Definition: COFF.h:1453
int getNumSavedRegs() const
Definition: COFF.h:1447
support::ulittle32_t Size
Definition: COFF.h:1438
int getPrologSize() const
Definition: COFF.h:1444
frame_type getFP() const
Definition: COFF.h:1456
support::ulittle16_t NumParams
Definition: COFF.h:1440
support::ulittle16_t Attributes
Definition: COFF.h:1441
support::ulittle32_t Offset
Definition: COFF.h:1437
support::ulittle32_t Offset
Definition: COFF.h:250
support::ulittle32_t Zeroes
Definition: COFF.h:249
Definition: COFF.h:765
support::ulittle32_t EntryPoint
Definition: COFF.h:768
support::ulittle32_t StartRva
Definition: COFF.h:766
support::ulittle32_t EndRva
Definition: COFF.h:767
support::ulittle32_t AlternateEntryPoint
Definition: COFF.h:740
support::ulittle32_t SetX64InformationFunctionPointer
Definition: COFF.h:745
support::ulittle32_t ExtraRFETableSize
Definition: COFF.h:747
support::ulittle32_t __os_arm64x_dispatch_ret
Definition: COFF.h:736
support::ulittle32_t __os_arm64x_dispatch_call_no_redirect
Definition: COFF.h:735
support::ulittle32_t RedirectionMetadataCount
Definition: COFF.h:743
support::ulittle32_t __os_arm64x_dispatch_icall_cfg
Definition: COFF.h:739
support::ulittle32_t CodeMap
Definition: COFF.h:731
support::ulittle32_t AuxiliaryIATCopy
Definition: COFF.h:749
support::ulittle32_t __os_arm64x_dispatch_icall
Definition: COFF.h:738
support::ulittle32_t CodeRangesToEntryPointsCount
Definition: COFF.h:742
support::ulittle32_t AuxiliaryIAT
Definition: COFF.h:741
support::ulittle32_t GetX64InformationFunctionPointer
Definition: COFF.h:744
support::ulittle32_t ExtraRFETable
Definition: COFF.h:746
support::ulittle32_t Version
Definition: COFF.h:730
support::ulittle32_t CodeMapCount
Definition: COFF.h:732
support::ulittle32_t __os_arm64x_dispatch_fptr
Definition: COFF.h:748
support::ulittle32_t RedirectionMetadata
Definition: COFF.h:734
support::ulittle32_t CodeRangesToEntryPoints
Definition: COFF.h:733
support::ulittle32_t __os_arm64x_dispatch_call
Definition: COFF.h:737
Definition: COFF.h:754
support::ulittle32_t Length
Definition: COFF.h:756
static constexpr uint32_t TypeMask
Definition: COFF.h:759
support::ulittle32_t StartOffset
Definition: COFF.h:755
uint32_t getStart() const
Definition: COFF.h:761
uint16_t getType() const
Definition: COFF.h:762
Definition: COFF.h:771
support::ulittle32_t Source
Definition: COFF.h:772
support::ulittle32_t Destination
Definition: COFF.h:773
support::ulittle32_t PointerToNextFunction
Definition: COFF.h:499
support::ulittle16_t Linenumber
Definition: COFF.h:497
support::ulittle32_t SymbolTableIndex
Definition: COFF.h:538
support::ulittle32_t PointerToLinenumber
Definition: COFF.h:487
support::ulittle32_t TotalSize
Definition: COFF.h:486
support::ulittle32_t PointerToNextFunction
Definition: COFF.h:488
support::ulittle16_t NumberOfLinenumbers
Definition: COFF.h:518
support::ulittle32_t CheckSum
Definition: COFF.h:519
int32_t getNumber(bool IsBigObj) const
Definition: COFF.h:524
support::ulittle16_t NumberHighPart
Definition: COFF.h:523
support::ulittle16_t NumberLowPart
Definition: COFF.h:520
support::ulittle16_t NumberOfRelocations
Definition: COFF.h:517
support::ulittle32_t Characteristics
Definition: COFF.h:508
support::ulittle32_t TagIndex
Definition: COFF.h:507
Definition: COFF.h:787
support::ulittle16_t Data
Definition: COFF.h:788
int getOffset() const
Definition: COFF.h:791
int getType() const
Definition: COFF.h:790
support::ulittle32_t BlockSize
Definition: COFF.h:784
support::ulittle32_t unused2
Definition: COFF.h:99
support::ulittle16_t Version
Definition: COFF.h:94
support::ulittle32_t PointerToSymbolTable
Definition: COFF.h:103
support::ulittle32_t unused1
Definition: COFF.h:98
support::ulittle16_t Sig1
Definition: COFF.h:92
support::ulittle32_t NumberOfSections
Definition: COFF.h:102
support::ulittle16_t Machine
Definition: COFF.h:95
support::ulittle32_t unused4
Definition: COFF.h:101
support::ulittle32_t unused3
Definition: COFF.h:100
support::ulittle32_t TimeDateStamp
Definition: COFF.h:96
support::ulittle16_t Sig2
Definition: COFF.h:93
support::ulittle32_t NumberOfSymbols
Definition: COFF.h:104
support::ulittle32_t Version
Definition: COFF.h:840
support::ulittle32_t Size
Definition: COFF.h:841
support::ulittle32_t HeaderSize
Definition: COFF.h:855
support::ulittle32_t FixupInfoSize
Definition: COFF.h:856
support::ulittle32_t SymbolGroup
Definition: COFF.h:858
support::ulittle32_t BaseRelocSize
Definition: COFF.h:846
support::ulittle32_t Symbol
Definition: COFF.h:845
support::ulittle32_t HeaderSize
Definition: COFF.h:863
support::ulittle32_t SymbolGroup
Definition: COFF.h:866
support::ulittle32_t FixupInfoSize
Definition: COFF.h:864
support::ulittle32_t BaseRelocSize
Definition: COFF.h:851
support::ulittle64_t Symbol
Definition: COFF.h:850
support::ulittle16_t Machine
Definition: COFF.h:80
support::ulittle32_t NumberOfSymbols
Definition: COFF.h:84
support::ulittle16_t Characteristics
Definition: COFF.h:86
support::ulittle32_t PointerToSymbolTable
Definition: COFF.h:83
support::ulittle16_t NumberOfSections
Definition: COFF.h:81
bool isImportLibrary() const
Definition: COFF.h:88
support::ulittle16_t SizeOfOptionalHeader
Definition: COFF.h:85
support::ulittle32_t TimeDateStamp
Definition: COFF.h:82
Definition: COFF.h:559
support::ulittle32_t TimeDateStamp
Definition: COFF.h:561
support::ulittle32_t ImportAddressTableRVA
Definition: COFF.h:564
support::ulittle32_t ForwarderChain
Definition: COFF.h:562
bool isNull() const
Definition: COFF.h:566
support::ulittle32_t NameRVA
Definition: COFF.h:563
support::ulittle32_t ImportLookupTableRVA
Definition: COFF.h:560
support::ulittle16_t TypeInfo
Definition: COFF.h:553
support::ulittle16_t Machine
Definition: COFF.h:549
support::ulittle32_t SizeOfData
Definition: COFF.h:551
support::ulittle16_t Sig2
Definition: COFF.h:547
support::ulittle16_t OrdinalHint
Definition: COFF.h:552
support::ulittle32_t TimeDateStamp
Definition: COFF.h:550
support::ulittle16_t Version
Definition: COFF.h:548
support::ulittle16_t Sig1
Definition: COFF.h:546
32-bit load config (IMAGE_LOAD_CONFIG_DIRECTORY32)
Definition: COFF.h:614
support::ulittle16_t MinorVersion
Definition: COFF.h:618
support::ulittle32_t SEHandlerCount
Definition: COFF.h:634
support::ulittle32_t GuardAddressTakenIatEntryCount
Definition: COFF.h:646
support::ulittle32_t GuardRFFailureRoutineFunctionPointer
Definition: COFF.h:652
support::ulittle32_t DynamicValueRelocTable
Definition: COFF.h:649
support::ulittle32_t GuardCFCheckFunction
Definition: COFF.h:637
support::ulittle32_t GuardRFVerifyStackPointerFunctionPointer
Definition: COFF.h:656
support::ulittle32_t GuardEHContinuationTable
Definition: COFF.h:663
support::ulittle32_t Size
Definition: COFF.h:615
support::ulittle32_t SEHandlerTable
Definition: COFF.h:633
support::ulittle32_t LockPrefixTable
Definition: COFF.h:624
support::ulittle16_t CSDVersion
Definition: COFF.h:629
support::ulittle16_t Reserved2
Definition: COFF.h:655
support::ulittle32_t CHPEMetadataPointer
Definition: COFF.h:650
support::ulittle32_t VirtualMemoryThreshold
Definition: COFF.h:626
support::ulittle32_t GuardCFFunctionCount
Definition: COFF.h:640
support::ulittle32_t DeCommitFreeBlockThreshold
Definition: COFF.h:622
support::ulittle32_t ProcessAffinityMask
Definition: COFF.h:627
support::ulittle32_t MaximumAllocationSize
Definition: COFF.h:625
support::ulittle32_t EnclaveConfigurationPointer
Definition: COFF.h:661
support::ulittle16_t DependentLoadFlags
Definition: COFF.h:630
support::ulittle32_t TimeDateStamp
Definition: COFF.h:616
support::ulittle32_t GuardXFGCheckFunctionPointer
Definition: COFF.h:665
support::ulittle32_t GuardCFCheckDispatch
Definition: COFF.h:638
support::ulittle32_t GuardLongJumpTargetCount
Definition: COFF.h:648
support::ulittle32_t GuardLongJumpTargetTable
Definition: COFF.h:647
support::ulittle32_t Reserved3
Definition: COFF.h:660
support::ulittle32_t GuardAddressTakenIatEntryTable
Definition: COFF.h:645
support::ulittle32_t CriticalSectionDefaultTimeout
Definition: COFF.h:621
support::ulittle32_t GuardEHContinuationCount
Definition: COFF.h:664
support::ulittle16_t DynamicValueRelocTableSection
Definition: COFF.h:654
support::ulittle32_t GuardXFGTableDispatchFunctionPointer
Definition: COFF.h:667
support::ulittle32_t GuardCFFunctionTable
Definition: COFF.h:639
support::ulittle32_t GuardFlags
Definition: COFF.h:641
support::ulittle32_t SecurityCookie
Definition: COFF.h:632
support::ulittle32_t HotPatchTableOffset
Definition: COFF.h:657
coff_load_config_code_integrity CodeIntegrity
Definition: COFF.h:644
support::ulittle16_t MajorVersion
Definition: COFF.h:617
support::ulittle32_t ProcessHeapFlags
Definition: COFF.h:628
support::ulittle32_t GuardXFGDispatchFunctionPointer
Definition: COFF.h:666
support::ulittle32_t GuardRFFailureRoutine
Definition: COFF.h:651
support::ulittle32_t DynamicValueRelocTableOffset
Definition: COFF.h:653
support::ulittle32_t DeCommitTotalFreeThreshold
Definition: COFF.h:623
support::ulittle32_t GlobalFlagsSet
Definition: COFF.h:620
support::ulittle32_t EditList
Definition: COFF.h:631
support::ulittle32_t GlobalFlagsClear
Definition: COFF.h:619
support::ulittle32_t CastGuardOsDeterminedFailureMode
Definition: COFF.h:668
support::ulittle32_t VolatileMetadataPointer
Definition: COFF.h:662
64-bit load config (IMAGE_LOAD_CONFIG_DIRECTORY64)
Definition: COFF.h:672
support::ulittle64_t VirtualMemoryThreshold
Definition: COFF.h:684
support::ulittle32_t TimeDateStamp
Definition: COFF.h:674
support::ulittle64_t GuardCFFunctionCount
Definition: COFF.h:698
support::ulittle32_t GuardFlags
Definition: COFF.h:699
support::ulittle64_t VolatileMetadataPointer
Definition: COFF.h:720
support::ulittle16_t MinorVersion
Definition: COFF.h:676
support::ulittle16_t MajorVersion
Definition: COFF.h:675
support::ulittle64_t GuardRFFailureRoutineFunctionPointer
Definition: COFF.h:710
support::ulittle32_t DynamicValueRelocTableOffset
Definition: COFF.h:711
support::ulittle16_t DependentLoadFlags
Definition: COFF.h:688
support::ulittle16_t Reserved2
Definition: COFF.h:713
support::ulittle32_t GlobalFlagsSet
Definition: COFF.h:678
support::ulittle64_t GuardAddressTakenIatEntryTable
Definition: COFF.h:703
support::ulittle64_t EditList
Definition: COFF.h:689
support::ulittle64_t DeCommitFreeBlockThreshold
Definition: COFF.h:680
support::ulittle64_t GuardXFGCheckFunctionPointer
Definition: COFF.h:723
coff_load_config_code_integrity CodeIntegrity
Definition: COFF.h:702
support::ulittle64_t DynamicValueRelocTable
Definition: COFF.h:707
support::ulittle64_t ProcessAffinityMask
Definition: COFF.h:685
support::ulittle64_t DeCommitTotalFreeThreshold
Definition: COFF.h:681
support::ulittle64_t GuardAddressTakenIatEntryCount
Definition: COFF.h:704
support::ulittle64_t GuardEHContinuationCount
Definition: COFF.h:722
support::ulittle64_t GuardRFFailureRoutine
Definition: COFF.h:709
support::ulittle32_t CriticalSectionDefaultTimeout
Definition: COFF.h:679
support::ulittle64_t GuardCFFunctionTable
Definition: COFF.h:697
support::ulittle64_t GuardLongJumpTargetTable
Definition: COFF.h:705
support::ulittle64_t SEHandlerTable
Definition: COFF.h:691
support::ulittle64_t MaximumAllocationSize
Definition: COFF.h:683
support::ulittle64_t SEHandlerCount
Definition: COFF.h:692
support::ulittle64_t GuardCFCheckFunction
Definition: COFF.h:695
support::ulittle32_t Reserved3
Definition: COFF.h:718
support::ulittle32_t HotPatchTableOffset
Definition: COFF.h:715
support::ulittle64_t GuardCFCheckDispatch
Definition: COFF.h:696
support::ulittle64_t GuardXFGTableDispatchFunctionPointer
Definition: COFF.h:725
support::ulittle64_t SecurityCookie
Definition: COFF.h:690
support::ulittle64_t GuardEHContinuationTable
Definition: COFF.h:721
support::ulittle64_t LockPrefixTable
Definition: COFF.h:682
support::ulittle16_t CSDVersion
Definition: COFF.h:687
support::ulittle64_t CastGuardOsDeterminedFailureMode
Definition: COFF.h:726
support::ulittle32_t GlobalFlagsClear
Definition: COFF.h:677
support::ulittle32_t ProcessHeapFlags
Definition: COFF.h:686
support::ulittle16_t DynamicValueRelocTableSection
Definition: COFF.h:712
support::ulittle64_t CHPEMetadataPointer
Definition: COFF.h:708
support::ulittle64_t GuardXFGDispatchFunctionPointer
Definition: COFF.h:724
support::ulittle64_t GuardRFVerifyStackPointerFunctionPointer
Definition: COFF.h:714
support::ulittle64_t GuardLongJumpTargetCount
Definition: COFF.h:706
support::ulittle64_t EnclaveConfigurationPointer
Definition: COFF.h:719
support::ulittle32_t Size
Definition: COFF.h:673
support::ulittle16_t Type
Definition: COFF.h:481
support::ulittle32_t SymbolTableIndex
Definition: COFF.h:480
support::ulittle32_t VirtualAddress
Definition: COFF.h:479
Definition: COFF.h:817
support::ulittle32_t Reserved
Definition: COFF.h:821
support::ulittle32_t DataSize
Definition: COFF.h:819
support::ulittle32_t Codepage
Definition: COFF.h:820
support::ulittle32_t DataRVA
Definition: COFF.h:818
Definition: COFF.h:794
support::ulittle32_t NameOffset
Definition: COFF.h:796
support::ulittle32_t DataEntryOffset
Definition: COFF.h:806
union llvm::object::coff_resource_dir_entry::@361 Identifier
union llvm::object::coff_resource_dir_entry::@362 Offset
support::ulittle32_t ID
Definition: COFF.h:797
support::ulittle32_t SubdirOffset
Definition: COFF.h:807
support::ulittle16_t NumberOfNameEntries
Definition: COFF.h:829
support::ulittle32_t Characteristics
Definition: COFF.h:825
support::ulittle16_t NumberOfIDEntries
Definition: COFF.h:830
support::ulittle32_t TimeDateStamp
Definition: COFF.h:826
support::ulittle16_t MinorVersion
Definition: COFF.h:828
support::ulittle16_t MajorVersion
Definition: COFF.h:827
support::ulittle32_t BeginAddress
Definition: COFF.h:777
support::ulittle32_t UnwindInformation
Definition: COFF.h:779
support::ulittle32_t EndAddress
Definition: COFF.h:778
support::ulittle32_t PointerToRawData
Definition: COFF.h:449
char Name[COFF::NameSize]
Definition: COFF.h:445
support::ulittle32_t VirtualSize
Definition: COFF.h:446
bool hasExtendedRelocations() const
Definition: COFF.h:458
uint32_t getAlignment() const
Definition: COFF.h:463
support::ulittle32_t Characteristics
Definition: COFF.h:454
support::ulittle16_t NumberOfLinenumbers
Definition: COFF.h:453
support::ulittle32_t SizeOfRawData
Definition: COFF.h:448
support::ulittle32_t VirtualAddress
Definition: COFF.h:447
support::ulittle32_t PointerToRelocations
Definition: COFF.h:450
support::ulittle16_t NumberOfRelocations
Definition: COFF.h:452
support::ulittle32_t PointerToLinenumbers
Definition: COFF.h:451
union llvm::object::coff_symbol_generic::@360 Name
support::ulittle32_t Value
Definition: COFF.h:278
StringTableOffset Offset
Definition: COFF.h:276
char ShortName[COFF::NameSize]
Definition: COFF.h:275
union llvm::object::coff_symbol::@359 Name
StringTableOffset Offset
Definition: COFF.h:257
SectionNumberType SectionNumber
Definition: COFF.h:261
support::ulittle32_t Value
Definition: COFF.h:260
char ShortName[COFF::NameSize]
Definition: COFF.h:256
support::ulittle16_t Type
Definition: COFF.h:263
uint8_t NumberOfAuxSymbols
Definition: COFF.h:266
support::ulittle32_t SizeOfZeroFill
Definition: COFF.h:578
uint32_t getAlignment() const
Definition: COFF.h:581
support::ulittle32_t Characteristics
Definition: COFF.h:579
void setAlignment(uint32_t Align)
Definition: COFF.h:589
support::ulittle32_t RelativeVirtualAddress
Definition: COFF.h:177
support::ulittle32_t Size
Definition: COFF.h:178
support::ulittle16_t MajorVersion
Definition: COFF.h:184
support::ulittle32_t SizeOfData
Definition: COFF.h:187
support::ulittle32_t PointerToRawData
Definition: COFF.h:189
support::ulittle32_t AddressOfRawData
Definition: COFF.h:188
support::ulittle32_t TimeDateStamp
Definition: COFF.h:183
support::ulittle32_t Type
Definition: COFF.h:186
support::ulittle32_t Characteristics
Definition: COFF.h:182
support::ulittle16_t MinorVersion
Definition: COFF.h:185
support::ulittle16_t HashAlgorithm
Definition: COFF.h:836
support::ulittle16_t Version
Definition: COFF.h:835
support::ulittle32_t Magic
Definition: COFF.h:834
Definition: COFF.h:214
support::ulittle32_t DelayImportNameTable
Definition: COFF.h:220
support::ulittle32_t DelayImportAddressTable
Definition: COFF.h:219
support::ulittle32_t Name
Definition: COFF.h:217
support::ulittle32_t UnloadDelayImportTable
Definition: COFF.h:222
support::ulittle32_t BoundDelayImportTable
Definition: COFF.h:221
support::ulittle32_t TimeStamp
Definition: COFF.h:223
support::ulittle32_t Attributes
Definition: COFF.h:216
support::ulittle32_t ModuleHandle
Definition: COFF.h:218
The DOS compatible header at the front of all PE/COFF executables.
Definition: COFF.h:57
support::ulittle16_t AddressOfRelocationTable
Definition: COFF.h:70
support::ulittle16_t NumberOfRelocationItems
Definition: COFF.h:61
support::ulittle16_t InitialSP
Definition: COFF.h:66
support::ulittle16_t HeaderSizeInParagraphs
Definition: COFF.h:62
support::ulittle16_t InitialIP
Definition: COFF.h:68
support::ulittle32_t AddressOfNewExeHeader
Definition: COFF.h:76
support::ulittle16_t MaximumExtraParagraphs
Definition: COFF.h:64
support::ulittle16_t InitialRelativeSS
Definition: COFF.h:65
support::ulittle16_t OEMid
Definition: COFF.h:73
support::ulittle16_t OverlayNumber
Definition: COFF.h:71
support::ulittle16_t UsedBytesInTheLastPage
Definition: COFF.h:59
support::ulittle16_t Reserved[4]
Definition: COFF.h:72
support::ulittle16_t Checksum
Definition: COFF.h:67
support::ulittle16_t FileSizeInPages
Definition: COFF.h:60
support::ulittle16_t OEMinfo
Definition: COFF.h:74
support::ulittle16_t InitialRelativeCS
Definition: COFF.h:69
support::ulittle16_t Reserved2[10]
Definition: COFF.h:75
support::ulittle16_t MinimumExtraParagraphs
Definition: COFF.h:63
Definition: COFF.h:226
support::ulittle32_t OrdinalBase
Definition: COFF.h:232
support::ulittle32_t ExportAddressTableRVA
Definition: COFF.h:235
support::ulittle32_t NameRVA
Definition: COFF.h:231
support::ulittle32_t NumberOfNamePointers
Definition: COFF.h:234
support::ulittle32_t NamePointerRVA
Definition: COFF.h:236
support::ulittle32_t ExportFlags
Definition: COFF.h:227
support::ulittle32_t AddressTableEntries
Definition: COFF.h:233
support::ulittle16_t MinorVersion
Definition: COFF.h:230
support::ulittle16_t MajorVersion
Definition: COFF.h:229
support::ulittle32_t TimeDateStamp
Definition: COFF.h:228
support::ulittle32_t OrdinalTableRVA
Definition: COFF.h:237
Definition: COFF.h:193
bool isOrdinal() const
Definition: COFF.h:196
uint32_t getHintNameRVA() const
Definition: COFF.h:203
IntTy Data
Definition: COFF.h:194
uint16_t getOrdinal() const
Definition: COFF.h:198
The 32-bit PE header that follows the COFF header.
Definition: COFF.h:108
support::ulittle16_t MajorImageVersion
Definition: COFF.h:123
support::ulittle16_t Subsystem
Definition: COFF.h:131
support::ulittle16_t MinorImageVersion
Definition: COFF.h:124
support::ulittle16_t DLLCharacteristics
Definition: COFF.h:133
support::ulittle32_t CheckSum
Definition: COFF.h:130
uint8_t MinorLinkerVersion
Definition: COFF.h:111
support::ulittle32_t SizeOfStackCommit
Definition: COFF.h:135
support::ulittle32_t SizeOfStackReserve
Definition: COFF.h:134
support::ulittle32_t NumberOfRvaAndSize
Definition: COFF.h:140
support::ulittle16_t MinorOperatingSystemVersion
Definition: COFF.h:122
support::ulittle32_t SectionAlignment
Definition: COFF.h:119
support::ulittle32_t SizeOfInitializedData
Definition: COFF.h:113
support::ulittle32_t SizeOfHeapCommit
Definition: COFF.h:137
support::ulittle32_t AddressOfEntryPoint
Definition: COFF.h:115
support::ulittle32_t Win32VersionValue
Definition: COFF.h:127
support::ulittle16_t MinorSubsystemVersion
Definition: COFF.h:126
support::ulittle16_t Magic
Definition: COFF.h:109
support::ulittle32_t BaseOfData
Definition: COFF.h:117
support::ulittle32_t SizeOfImage
Definition: COFF.h:128
support::ulittle32_t BaseOfCode
Definition: COFF.h:116
support::ulittle32_t ImageBase
Definition: COFF.h:118
support::ulittle16_t MajorOperatingSystemVersion
Definition: COFF.h:121
support::ulittle32_t SizeOfHeaders
Definition: COFF.h:129
support::ulittle32_t SizeOfUninitializedData
Definition: COFF.h:114
uint8_t MajorLinkerVersion
Definition: COFF.h:110
support::ulittle32_t FileAlignment
Definition: COFF.h:120
support::ulittle16_t MajorSubsystemVersion
Definition: COFF.h:125
support::ulittle32_t SizeOfCode
Definition: COFF.h:112
support::ulittle32_t SizeOfHeapReserve
Definition: COFF.h:136
support::ulittle32_t LoaderFlags
Definition: COFF.h:138
The 64-bit PE header that follows the COFF header.
Definition: COFF.h:144
support::ulittle16_t MinorOperatingSystemVersion
Definition: COFF.h:157
support::ulittle32_t SizeOfImage
Definition: COFF.h:163
support::ulittle32_t SizeOfCode
Definition: COFF.h:148
support::ulittle16_t MajorImageVersion
Definition: COFF.h:158
support::ulittle32_t SizeOfHeaders
Definition: COFF.h:164
support::ulittle32_t CheckSum
Definition: COFF.h:165
support::ulittle64_t SizeOfStackCommit
Definition: COFF.h:169
support::ulittle32_t SizeOfInitializedData
Definition: COFF.h:149
support::ulittle32_t Win32VersionValue
Definition: COFF.h:162
support::ulittle16_t MajorOperatingSystemVersion
Definition: COFF.h:156
support::ulittle16_t MajorSubsystemVersion
Definition: COFF.h:160
support::ulittle32_t LoaderFlags
Definition: COFF.h:172
support::ulittle16_t MinorImageVersion
Definition: COFF.h:159
support::ulittle32_t AddressOfEntryPoint
Definition: COFF.h:151
support::ulittle16_t MinorSubsystemVersion
Definition: COFF.h:161
support::ulittle32_t FileAlignment
Definition: COFF.h:155
support::ulittle64_t ImageBase
Definition: COFF.h:153
support::ulittle16_t Subsystem
Definition: COFF.h:166
support::ulittle16_t Magic
Definition: COFF.h:145
support::ulittle32_t SizeOfUninitializedData
Definition: COFF.h:150
support::ulittle32_t NumberOfRvaAndSize
Definition: COFF.h:173
support::ulittle32_t BaseOfCode
Definition: COFF.h:152
support::ulittle32_t SectionAlignment
Definition: COFF.h:154
support::ulittle64_t SizeOfHeapReserve
Definition: COFF.h:170
support::ulittle64_t SizeOfStackReserve
Definition: COFF.h:168
support::ulittle16_t DLLCharacteristics
Definition: COFF.h:167
support::ulittle64_t SizeOfHeapCommit
Definition: COFF.h:171
Definition: COFF.h:240
support::ulittle32_t ExportRVA
Definition: COFF.h:241
support::ulittle32_t ForwarderRVA
Definition: COFF.h:242