LLVM  14.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 
17 #include "llvm/BinaryFormat/COFF.h"
19 #include "llvm/Object/Binary.h"
21 #include "llvm/Object/Error.h"
22 #include "llvm/Object/ObjectFile.h"
25 #include "llvm/Support/Endian.h"
27 #include <cassert>
28 #include <cstddef>
29 #include <cstdint>
30 #include <system_error>
31 
32 namespace llvm {
33 
34 template <typename T> class ArrayRef;
35 
36 namespace object {
37 
38 class BaseRelocRef;
39 class DelayImportDirectoryEntryRef;
40 class ExportDirectoryEntryRef;
41 class ImportDirectoryEntryRef;
42 class ImportedSymbolRef;
43 class ResourceSectionRef;
44 
51 
52 /// The DOS compatible header at the front of all PE/COFF executables.
53 struct dos_header {
54  char Magic[2];
73 };
74 
83 
84  bool isImportLibrary() const { return NumberOfSections == 0xffff; }
85 };
86 
93  uint8_t UUID[16];
101 };
102 
103 /// The 32-bit PE header that follows the COFF header.
104 struct pe32_header {
128  // FIXME: This should be DllCharacteristics.
135  // FIXME: This should be NumberOfRvaAndSizes.
137 };
138 
139 /// The 64-bit PE header that follows the COFF header.
170 };
171 
175 };
176 
186 };
187 
188 template <typename IntTy>
190  IntTy Data;
191 
192  bool isOrdinal() const { return Data < 0; }
193 
195  assert(isOrdinal() && "ILT entry is not an ordinal!");
196  return Data & 0xFFFF;
197  }
198 
200  assert(!isOrdinal() && "ILT entry is not a Hint/Name RVA!");
201  return Data & 0xFFFFFFFF;
202  }
203 };
204 
209 
211  // dumpbin reports this field as "Characteristics" instead of "Attributes".
220 };
221 
234 };
235 
239 };
240 
243 
247 };
248 
249 template <typename SectionNumberType>
250 struct coff_symbol {
251  union {
254  } Name;
255 
257  SectionNumberType SectionNumber;
258 
260 
261  uint8_t StorageClass;
263 };
264 
267 
268 // Contains only common parts of coff_symbol16 and coff_symbol32.
270  union {
273  } Name;
275 };
276 
279 
281 public:
282  COFFSymbolRef() = default;
283  COFFSymbolRef(const coff_symbol16 *CS) : CS16(CS) {}
284  COFFSymbolRef(const coff_symbol32 *CS) : CS32(CS) {}
285 
286  const void *getRawPtr() const {
287  return CS16 ? static_cast<const void *>(CS16) : CS32;
288  }
289 
291  if (CS16)
292  return reinterpret_cast<const coff_symbol_generic *>(CS16);
293  return reinterpret_cast<const coff_symbol_generic *>(CS32);
294  }
295 
297  return A.getRawPtr() < B.getRawPtr();
298  }
299 
300  bool isBigObj() const {
301  if (CS16)
302  return false;
303  if (CS32)
304  return true;
305  llvm_unreachable("COFFSymbolRef points to nothing!");
306  }
307 
308  const char *getShortName() const {
309  return CS16 ? CS16->Name.ShortName : CS32->Name.ShortName;
310  }
311 
313  assert(isSet() && "COFFSymbolRef points to nothing!");
314  return CS16 ? CS16->Name.Offset : CS32->Name.Offset;
315  }
316 
317  uint32_t getValue() const {
318  assert(isSet() && "COFFSymbolRef points to nothing!");
319  return CS16 ? CS16->Value : CS32->Value;
320  }
321 
322  int32_t getSectionNumber() const {
323  assert(isSet() && "COFFSymbolRef points to nothing!");
324  if (CS16) {
325  // Reserved sections are returned as negative numbers.
327  return CS16->SectionNumber;
328  return static_cast<int16_t>(CS16->SectionNumber);
329  }
330  return static_cast<int32_t>(CS32->SectionNumber);
331  }
332 
333  uint16_t getType() const {
334  assert(isSet() && "COFFSymbolRef points to nothing!");
335  return CS16 ? CS16->Type : CS32->Type;
336  }
337 
338  uint8_t getStorageClass() const {
339  assert(isSet() && "COFFSymbolRef points to nothing!");
340  return CS16 ? CS16->StorageClass : CS32->StorageClass;
341  }
342 
343  uint8_t getNumberOfAuxSymbols() const {
344  assert(isSet() && "COFFSymbolRef points to nothing!");
345  return CS16 ? CS16->NumberOfAuxSymbols : CS32->NumberOfAuxSymbols;
346  }
347 
348  uint8_t getBaseType() const { return getType() & 0x0F; }
349 
350  uint8_t getComplexType() const {
351  return (getType() & 0xF0) >> COFF::SCT_COMPLEX_TYPE_SHIFT;
352  }
353 
354  template <typename T> const T *getAux() const {
355  return CS16 ? reinterpret_cast<const T *>(CS16 + 1)
356  : reinterpret_cast<const T *>(CS32 + 1);
357  }
358 
360  if (!getNumberOfAuxSymbols() ||
362  return nullptr;
363  return getAux<coff_aux_section_definition>();
364  }
365 
367  if (!getNumberOfAuxSymbols() ||
369  return nullptr;
370  return getAux<coff_aux_weak_external>();
371  }
372 
373  bool isAbsolute() const {
374  return getSectionNumber() == -1;
375  }
376 
377  bool isExternal() const {
379  }
380 
381  bool isCommon() const {
383  getValue() != 0;
384  }
385 
386  bool isUndefined() const {
388  getValue() == 0;
389  }
390 
391  bool isWeakExternal() const {
393  }
394 
395  bool isFunctionDefinition() const {
399  }
400 
401  bool isFunctionLineInfo() const {
403  }
404 
405  bool isAnyUndefined() const {
406  return isUndefined() || isWeakExternal();
407  }
408 
409  bool isFileRecord() const {
411  }
412 
413  bool isSection() const {
415  }
416 
417  bool isSectionDefinition() const {
418  // C++/CLI creates external ABS symbols for non-const appdomain globals.
419  // These are also followed by an auxiliary section definition.
420  bool isAppdomainGlobal =
423  bool isOrdinarySection = getStorageClass() == COFF::IMAGE_SYM_CLASS_STATIC;
424  if (!getNumberOfAuxSymbols())
425  return false;
426  return isAppdomainGlobal || isOrdinarySection;
427  }
428 
429  bool isCLRToken() const {
431  }
432 
433 private:
434  bool isSet() const { return CS16 || CS32; }
435 
436  const coff_symbol16 *CS16 = nullptr;
437  const coff_symbol32 *CS32 = nullptr;
438 };
439 
440 struct coff_section {
451 
452  // Returns true if the actual number of relocations is stored in
453  // VirtualAddress field of the first relocation table entry.
454  bool hasExtendedRelocations() const {
456  NumberOfRelocations == UINT16_MAX;
457  }
458 
460  // The IMAGE_SCN_TYPE_NO_PAD bit is a legacy way of getting to
461  // IMAGE_SCN_ALIGN_1BYTES.
463  return 1;
464 
465  // Bit [20:24] contains section alignment. 0 means use a default alignment
466  // of 16.
467  uint32_t Shift = (Characteristics >> 20) & 0xF;
468  if (Shift > 0)
469  return 1U << (Shift - 1);
470  return 16;
471  }
472 };
473 
478 };
479 
485  char Unused1[2];
486 };
487 
488 static_assert(sizeof(coff_aux_function_definition) == 18,
489  "auxiliary entry must be 18 bytes");
490 
492  char Unused1[4];
494  char Unused2[6];
496  char Unused3[2];
497 };
498 
499 static_assert(sizeof(coff_aux_bf_and_ef_symbol) == 18,
500  "auxiliary entry must be 18 bytes");
501 
505  char Unused1[10];
506 };
507 
508 static_assert(sizeof(coff_aux_weak_external) == 18,
509  "auxiliary entry must be 18 bytes");
510 
517  uint8_t Selection;
518  uint8_t Unused;
520  int32_t getNumber(bool IsBigObj) const {
521  uint32_t Number = static_cast<uint32_t>(NumberLowPart);
522  if (IsBigObj)
523  Number |= static_cast<uint32_t>(NumberHighPart) << 16;
524  return static_cast<int32_t>(Number);
525  }
526 };
527 
528 static_assert(sizeof(coff_aux_section_definition) == 18,
529  "auxiliary entry must be 18 bytes");
530 
532  uint8_t AuxType;
533  uint8_t Reserved;
535  char MBZ[12];
536 };
537 
538 static_assert(sizeof(coff_aux_clr_token) == 18,
539  "auxiliary entry must be 18 bytes");
540 
550 
551  int getType() const { return TypeInfo & 0x3; }
552  int getNameType() const { return (TypeInfo >> 2) & 0x7; }
553 };
554 
561 
562  bool isNull() const {
563  return ImportLookupTableRVA == 0 && TimeDateStamp == 0 &&
564  ForwarderChain == 0 && NameRVA == 0 && ImportAddressTableRVA == 0;
565  }
566 };
567 
568 template <typename IntTy>
576 
578  // Bit [20:24] contains section alignment.
580  if (Shift > 0)
581  return 1U << (Shift - 1);
582  return 0;
583  }
584 
586  uint32_t AlignBits = 0;
587  if (Align) {
588  assert(llvm::isPowerOf2_32(Align) && "alignment is not a power of 2");
589  assert(llvm::Log2_32(Align) <= 13 && "alignment requested is too large");
590  AlignBits = (llvm::Log2_32(Align) + 1) << 20;
591  }
593  (Characteristics & ~COFF::IMAGE_SCN_ALIGN_MASK) | AlignBits;
594  }
595 };
596 
599 
600 /// Bits in control flow guard flags as we understand them.
602  CFInstrumented = 0x00000100,
603  HasFidTable = 0x00000400,
604  ProtectDelayLoadIAT = 0x00001000,
605  DelayLoadIATSection = 0x00002000, // Delay load in separate section
606  HasLongJmpTable = 0x00010000,
607  HasEHContTable = 0x00400000,
608  FidTableHasFlags = 0x10000000, // Indicates that fid tables are 5 bytes
609 };
610 
611 enum class frame_type : uint16_t { Fpo = 0, Trap = 1, Tss = 2, NonFpo = 3 };
612 
618 };
619 
620 /// 32-bit load config (IMAGE_LOAD_CONFIG_DIRECTORY32)
642 
643  // Added in MSVC 2015 for /guard:cf.
648  support::ulittle32_t GuardFlags; // coff_guard_flags
649 
650  // Added in MSVC 2017
665 
666  // Added in MSVC 2019
676 };
677 
678 /// 64-bit load config (IMAGE_LOAD_CONFIG_DIRECTORY64)
700 
701  // Added in MSVC 2015 for /guard:cf.
707 
708  // Added in MSVC 2017
723 
724  // Added in MSVC 2019
734 };
735 
740 };
741 
745 };
746 
749 
750  int getType() const { return Data >> 12; }
751  int getOffset() const { return Data & ((1 << 12) - 1); }
752 };
753 
755  union {
758  uint32_t getNameOffset() const {
759  return maskTrailingOnes<uint32_t>(31) & NameOffset;
760  }
761  // Even though the PE/COFF spec doesn't mention this, the high bit of a name
762  // offset is set.
763  void setNameOffset(uint32_t Offset) { NameOffset = Offset | (1 << 31); }
764  } Identifier;
765  union {
768 
769  bool isSubDir() const { return SubdirOffset >> 31; }
770  uint32_t value() const {
771  return maskTrailingOnes<uint32_t>(31) & SubdirOffset;
772  }
773 
774  } Offset;
775 };
776 
782 };
783 
791 };
792 
797 };
798 
799 class COFFObjectFile : public ObjectFile {
800 private:
802 
805  const coff_file_header *COFFHeader;
806  const coff_bigobj_file_header *COFFBigObjHeader;
807  const pe32_header *PE32Header;
808  const pe32plus_header *PE32PlusHeader;
809  const data_directory *DataDirectory;
810  const coff_section *SectionTable;
811  const coff_symbol16 *SymbolTable16;
812  const coff_symbol32 *SymbolTable32;
813  const char *StringTable;
814  uint32_t StringTableSize;
815  const coff_import_directory_table_entry *ImportDirectory;
816  const delay_import_directory_table_entry *DelayImportDirectory;
817  uint32_t NumberOfDelayImportDirectory;
818  const export_directory_table_entry *ExportDirectory;
819  const coff_base_reloc_block_header *BaseRelocHeader;
820  const coff_base_reloc_block_header *BaseRelocEnd;
821  const debug_directory *DebugDirectoryBegin;
822  const debug_directory *DebugDirectoryEnd;
823  const coff_tls_directory32 *TLSDirectory32;
824  const coff_tls_directory64 *TLSDirectory64;
825  // Either coff_load_configuration32 or coff_load_configuration64.
826  const void *LoadConfig = nullptr;
827 
828  Expected<StringRef> getString(uint32_t offset) const;
829 
830  template <typename coff_symbol_type>
831  const coff_symbol_type *toSymb(DataRefImpl Symb) const;
832  const coff_section *toSec(DataRefImpl Sec) const;
833  const coff_relocation *toRel(DataRefImpl Rel) const;
834 
835  // Finish initializing the object and return success or an error.
836  Error initialize();
837 
838  Error initSymbolTablePtr();
839  Error initImportTablePtr();
840  Error initDelayImportTablePtr();
841  Error initExportTablePtr();
842  Error initBaseRelocPtr();
843  Error initDebugDirectoryPtr();
844  Error initTLSDirectoryPtr();
845  Error initLoadConfigPtr();
846 
847 public:
849  create(MemoryBufferRef Object);
850 
851  uintptr_t getSymbolTable() const {
852  if (SymbolTable16)
853  return reinterpret_cast<uintptr_t>(SymbolTable16);
854  if (SymbolTable32)
855  return reinterpret_cast<uintptr_t>(SymbolTable32);
856  return uintptr_t(0);
857  }
858 
860  if (COFFHeader)
861  return COFFHeader->Machine;
862  if (COFFBigObjHeader)
863  return COFFBigObjHeader->Machine;
864  llvm_unreachable("no COFF header!");
865  }
866 
868  if (COFFHeader)
869  return COFFHeader->isImportLibrary() ? 0
870  : COFFHeader->SizeOfOptionalHeader;
871  // bigobj doesn't have this field.
872  if (COFFBigObjHeader)
873  return 0;
874  llvm_unreachable("no COFF header!");
875  }
876 
878  if (COFFHeader)
879  return COFFHeader->isImportLibrary() ? 0 : COFFHeader->Characteristics;
880  // bigobj doesn't have characteristics to speak of,
881  // editbin will silently lie to you if you attempt to set any.
882  if (COFFBigObjHeader)
883  return 0;
884  llvm_unreachable("no COFF header!");
885  }
886 
888  if (COFFHeader)
889  return COFFHeader->TimeDateStamp;
890  if (COFFBigObjHeader)
891  return COFFBigObjHeader->TimeDateStamp;
892  llvm_unreachable("no COFF header!");
893  }
894 
896  if (COFFHeader)
897  return COFFHeader->isImportLibrary() ? 0 : COFFHeader->NumberOfSections;
898  if (COFFBigObjHeader)
899  return COFFBigObjHeader->NumberOfSections;
900  llvm_unreachable("no COFF header!");
901  }
902 
904  if (COFFHeader)
905  return COFFHeader->isImportLibrary() ? 0
906  : COFFHeader->PointerToSymbolTable;
907  if (COFFBigObjHeader)
908  return COFFBigObjHeader->PointerToSymbolTable;
909  llvm_unreachable("no COFF header!");
910  }
911 
913  if (COFFHeader)
914  return COFFHeader->isImportLibrary() ? 0 : COFFHeader->NumberOfSymbols;
915  if (COFFBigObjHeader)
916  return COFFBigObjHeader->NumberOfSymbols;
917  llvm_unreachable("no COFF header!");
918  }
919 
921  if (!SymbolTable16 && !SymbolTable32)
922  return 0;
923  return getRawNumberOfSymbols();
924  }
925 
926  uint32_t getStringTableSize() const { return StringTableSize; }
927 
929  assert(!is64());
930  return reinterpret_cast<const coff_load_configuration32 *>(LoadConfig);
931  }
932 
934  assert(is64());
935  return reinterpret_cast<const coff_load_configuration64 *>(LoadConfig);
936  }
938 
939 protected:
940  void moveSymbolNext(DataRefImpl &Symb) const override;
941  Expected<StringRef> getSymbolName(DataRefImpl Symb) const override;
942  Expected<uint64_t> getSymbolAddress(DataRefImpl Symb) const override;
943  uint32_t getSymbolAlignment(DataRefImpl Symb) const override;
944  uint64_t getSymbolValueImpl(DataRefImpl Symb) const override;
945  uint64_t getCommonSymbolSizeImpl(DataRefImpl Symb) const override;
946  Expected<uint32_t> getSymbolFlags(DataRefImpl Symb) const override;
949  void moveSectionNext(DataRefImpl &Sec) const override;
950  Expected<StringRef> getSectionName(DataRefImpl Sec) const override;
951  uint64_t getSectionAddress(DataRefImpl Sec) const override;
952  uint64_t getSectionIndex(DataRefImpl Sec) const override;
953  uint64_t getSectionSize(DataRefImpl Sec) const override;
955  getSectionContents(DataRefImpl Sec) const override;
956  uint64_t getSectionAlignment(DataRefImpl Sec) const override;
957  bool isSectionCompressed(DataRefImpl Sec) const override;
958  bool isSectionText(DataRefImpl Sec) const override;
959  bool isSectionData(DataRefImpl Sec) const override;
960  bool isSectionBSS(DataRefImpl Sec) const override;
961  bool isSectionVirtual(DataRefImpl Sec) const override;
962  bool isDebugSection(DataRefImpl Sec) const override;
964  relocation_iterator section_rel_end(DataRefImpl Sec) const override;
965 
966  void moveRelocationNext(DataRefImpl &Rel) const override;
967  uint64_t getRelocationOffset(DataRefImpl Rel) const override;
968  symbol_iterator getRelocationSymbol(DataRefImpl Rel) const override;
969  uint64_t getRelocationType(DataRefImpl Rel) const override;
971  SmallVectorImpl<char> &Result) const override;
972 
973 public:
974  basic_symbol_iterator symbol_begin() const override;
975  basic_symbol_iterator symbol_end() const override;
976  section_iterator section_begin() const override;
977  section_iterator section_end() const override;
978 
979  const coff_section *getCOFFSection(const SectionRef &Section) const;
980  COFFSymbolRef getCOFFSymbol(const DataRefImpl &Ref) const;
982  const coff_relocation *getCOFFRelocation(const RelocationRef &Reloc) const;
983  unsigned getSectionID(SectionRef Sec) const;
984  unsigned getSymbolSectionID(SymbolRef Sym) const;
985 
986  uint8_t getBytesInAddress() const override;
987  StringRef getFileFormatName() const override;
988  Triple::ArchType getArch() const override;
989  Expected<uint64_t> getStartAddress() const override;
990  SubtargetFeatures getFeatures() const override { return SubtargetFeatures(); }
991 
1001  return DebugDirectoryBegin;
1002  }
1004  return DebugDirectoryEnd;
1005  }
1006 
1009  delay_import_directories() const;
1014  }
1015 
1017  return TLSDirectory32;
1018  }
1020  return TLSDirectory64;
1021  }
1022 
1023  const dos_header *getDOSHeader() const {
1024  if (!PE32Header && !PE32PlusHeader)
1025  return nullptr;
1026  return reinterpret_cast<const dos_header *>(base());
1027  }
1028 
1029  const coff_file_header *getCOFFHeader() const { return COFFHeader; }
1031  return COFFBigObjHeader;
1032  }
1033  const pe32_header *getPE32Header() const { return PE32Header; }
1034  const pe32plus_header *getPE32PlusHeader() const { return PE32PlusHeader; }
1035 
1038 
1040  if (index >= getNumberOfSymbols())
1042  if (SymbolTable16)
1043  return COFFSymbolRef(SymbolTable16 + index);
1044  if (SymbolTable32)
1045  return COFFSymbolRef(SymbolTable32 + index);
1047  }
1048 
1049  template <typename T>
1050  Error getAuxSymbol(uint32_t index, const T *&Res) const {
1052  if (Error E = S.takeError())
1053  return E;
1054  Res = reinterpret_cast<const T *>(S->getRawPtr());
1055  return Error::success();
1056  }
1057 
1060 
1062 
1064 
1065  size_t getSymbolTableEntrySize() const {
1066  if (COFFHeader)
1067  return sizeof(coff_symbol16);
1068  if (COFFBigObjHeader)
1069  return sizeof(coff_symbol32);
1070  llvm_unreachable("null symbol table pointer!");
1071  }
1072 
1074 
1076  uint64_t getSectionSize(const coff_section *Sec) const;
1078  ArrayRef<uint8_t> &Res) const;
1079 
1080  uint64_t getImageBase() const;
1081  Error getVaPtr(uint64_t VA, uintptr_t &Res) const;
1082  Error getRvaPtr(uint32_t Rva, uintptr_t &Res) const;
1083 
1084  /// Given an RVA base and size, returns a valid array of bytes or an error
1085  /// code if the RVA and size is not contained completely within a valid
1086  /// section.
1088  ArrayRef<uint8_t> &Contents) const;
1089 
1090  Error getHintName(uint32_t Rva, uint16_t &Hint,
1091  StringRef &Name) const;
1092 
1093  /// Get PDB information out of a codeview debug directory entry.
1094  Error getDebugPDBInfo(const debug_directory *DebugDir,
1095  const codeview::DebugInfo *&Info,
1096  StringRef &PDBFileName) const;
1097 
1098  /// Get PDB information from an executable. If the information is not present,
1099  /// Info will be set to nullptr and PDBFileName will be empty. An error is
1100  /// returned only on corrupt object files. Convenience accessor that can be
1101  /// used if the debug directory is not already handy.
1103  StringRef &PDBFileName) const;
1104 
1105  bool isRelocatableObject() const override;
1106  bool is64() const { return PE32PlusHeader; }
1107 
1108  StringRef mapDebugSectionName(StringRef Name) const override;
1109 
1110  static bool classof(const Binary *v) { return v->isCOFF(); }
1111 };
1112 
1113 // The iterator for the import directory table.
1115 public:
1116  ImportDirectoryEntryRef() = default;
1118  uint32_t I, const COFFObjectFile *Owner)
1119  : ImportTable(Table), Index(I), OwningObject(Owner) {}
1120 
1121  bool operator==(const ImportDirectoryEntryRef &Other) const;
1122  void moveNext();
1123 
1127 
1131 
1132  Error getName(StringRef &Result) const;
1133  Error getImportLookupTableRVA(uint32_t &Result) const;
1134  Error getImportAddressTableRVA(uint32_t &Result) const;
1135 
1136  Error
1138 
1139 private:
1140  const coff_import_directory_table_entry *ImportTable;
1141  uint32_t Index;
1142  const COFFObjectFile *OwningObject = nullptr;
1143 };
1144 
1146 public:
1147  DelayImportDirectoryEntryRef() = default;
1149  uint32_t I, const COFFObjectFile *Owner)
1150  : Table(T), Index(I), OwningObject(Owner) {}
1151 
1152  bool operator==(const DelayImportDirectoryEntryRef &Other) const;
1153  void moveNext();
1154 
1158 
1159  Error getName(StringRef &Result) const;
1161  const delay_import_directory_table_entry *&Result) const;
1162  Error getImportAddress(int AddrIndex, uint64_t &Result) const;
1163 
1164 private:
1166  uint32_t Index;
1167  const COFFObjectFile *OwningObject = nullptr;
1168 };
1169 
1170 // The iterator for the export directory table entry.
1172 public:
1173  ExportDirectoryEntryRef() = default;
1175  const COFFObjectFile *Owner)
1176  : ExportTable(Table), Index(I), OwningObject(Owner) {}
1177 
1178  bool operator==(const ExportDirectoryEntryRef &Other) const;
1179  void moveNext();
1180 
1181  Error getDllName(StringRef &Result) const;
1182  Error getOrdinalBase(uint32_t &Result) const;
1183  Error getOrdinal(uint32_t &Result) const;
1184  Error getExportRVA(uint32_t &Result) const;
1185  Error getSymbolName(StringRef &Result) const;
1186 
1187  Error isForwarder(bool &Result) const;
1188  Error getForwardTo(StringRef &Result) const;
1189 
1190 private:
1191  const export_directory_table_entry *ExportTable;
1192  uint32_t Index;
1193  const COFFObjectFile *OwningObject = nullptr;
1194 };
1195 
1197 public:
1198  ImportedSymbolRef() = default;
1200  const COFFObjectFile *Owner)
1201  : Entry32(Entry), Entry64(nullptr), Index(I), OwningObject(Owner) {}
1203  const COFFObjectFile *Owner)
1204  : Entry32(nullptr), Entry64(Entry), Index(I), OwningObject(Owner) {}
1205 
1206  bool operator==(const ImportedSymbolRef &Other) const;
1207  void moveNext();
1208 
1209  Error getSymbolName(StringRef &Result) const;
1210  Error isOrdinal(bool &Result) const;
1211  Error getOrdinal(uint16_t &Result) const;
1212  Error getHintNameRVA(uint32_t &Result) const;
1213 
1214 private:
1215  const import_lookup_table_entry32 *Entry32;
1216  const import_lookup_table_entry64 *Entry64;
1217  uint32_t Index;
1218  const COFFObjectFile *OwningObject = nullptr;
1219 };
1220 
1222 public:
1223  BaseRelocRef() = default;
1225  const COFFObjectFile *Owner)
1226  : Header(Header), Index(0) {}
1227 
1228  bool operator==(const BaseRelocRef &Other) const;
1229  void moveNext();
1230 
1231  Error getType(uint8_t &Type) const;
1232  Error getRVA(uint32_t &Result) const;
1233 
1234 private:
1235  const coff_base_reloc_block_header *Header;
1236  uint32_t Index;
1237 };
1238 
1240 public:
1241  ResourceSectionRef() = default;
1242  explicit ResourceSectionRef(StringRef Ref) : BBS(Ref, support::little) {}
1243 
1244  Error load(const COFFObjectFile *O);
1245  Error load(const COFFObjectFile *O, const SectionRef &S);
1246 
1252  getEntryData(const coff_resource_dir_entry &Entry);
1256 
1258 
1259 private:
1260  BinaryByteStream BBS;
1261 
1262  SectionRef Section;
1263  const COFFObjectFile *Obj;
1264 
1265  std::vector<const coff_relocation *> Relocs;
1266 
1269  getTableEntryAtOffset(uint32_t Offset);
1271  getDataEntryAtOffset(uint32_t Offset);
1272  Expected<ArrayRef<UTF16>> getDirStringAtOffset(uint32_t Offset);
1273 };
1274 
1275 // Corresponds to `_FPO_DATA` structure in the PE/COFF spec.
1276 struct FpoData {
1277  support::ulittle32_t Offset; // ulOffStart: Offset 1st byte of function code
1278  support::ulittle32_t Size; // cbProcSize: # bytes in function
1279  support::ulittle32_t NumLocals; // cdwLocals: # bytes in locals/4
1280  support::ulittle16_t NumParams; // cdwParams: # bytes in params/4
1282 
1283  // cbProlog: # bytes in prolog
1284  int getPrologSize() const { return Attributes & 0xF; }
1285 
1286  // cbRegs: # regs saved
1287  int getNumSavedRegs() const { return (Attributes >> 8) & 0x7; }
1288 
1289  // fHasSEH: true if seh is func
1290  bool hasSEH() const { return (Attributes >> 9) & 1; }
1291 
1292  // fUseBP: true if EBP has been allocated
1293  bool useBP() const { return (Attributes >> 10) & 1; }
1294 
1295  // cbFrame: frame pointer
1296  frame_type getFP() const { return static_cast<frame_type>(Attributes >> 14); }
1297 };
1298 
1299 } // end namespace object
1300 
1301 } // end namespace llvm
1302 
1303 #endif // LLVM_OBJECT_COFF_H
llvm::Check::Size
@ Size
Definition: FileCheck.h:73
llvm::object::pe32plus_header::MinorLinkerVersion
uint8_t MinorLinkerVersion
Definition: COFF.h:143
llvm::object::COFFObjectFile::base_relocs
iterator_range< base_reloc_iterator > base_relocs() const
Definition: COFFObjectFile.cpp:1000
llvm::object::coff_base_reloc_block_header::BlockSize
support::ulittle32_t BlockSize
Definition: COFF.h:744
llvm::object::coff_load_configuration64::GuardRFFailureRoutine
support::ulittle64_t GuardRFFailureRoutine
Definition: COFF.h:716
llvm::object::coff_load_configuration64::MinorVersion
support::ulittle16_t MinorVersion
Definition: COFF.h:683
llvm::object::frame_type
frame_type
Definition: COFF.h:611
llvm::object::COFFObjectFile::getBytesInAddress
uint8_t getBytesInAddress() const override
The number of bytes used to represent an address in this object file format.
Definition: COFFObjectFile.cpp:944
llvm::object::DelayImportDirectoryEntryRef::imported_symbol_begin
imported_symbol_iterator imported_symbol_begin() const
Definition: COFFObjectFile.cpp:1445
llvm::object::DelayImportDirectoryEntryRef::getName
Error getName(StringRef &Result) const
Definition: COFFObjectFile.cpp:1461
llvm::object::COFFObjectFile::getCharacteristics
uint16_t getCharacteristics() const
Definition: COFF.h:877
llvm::object::coff_load_configuration32::SEHandlerCount
support::ulittle32_t SEHandlerCount
Definition: COFF.h:641
llvm::object::COFFObjectFile::getSectionAlignment
uint64_t getSectionAlignment(DataRefImpl Sec) const override
Definition: COFFObjectFile.cpp:302
llvm::object::BaseRelocRef::getRVA
Error getRVA(uint32_t &Result) const
Definition: COFFObjectFile.cpp:1687
llvm::object::StringTableOffset::Zeroes
support::ulittle32_t Zeroes
Definition: COFF.h:245
llvm::object::coff_base_reloc_block_entry
Definition: COFF.h:747
llvm::object::coff_load_configuration64::CriticalSectionDefaultTimeout
support::ulittle32_t CriticalSectionDefaultTimeout
Definition: COFF.h:686
llvm::object::debug_directory::SizeOfData
support::ulittle32_t SizeOfData
Definition: COFF.h:183
llvm::object::dos_header::AddressOfNewExeHeader
support::ulittle32_t AddressOfNewExeHeader
Definition: COFF.h:72
llvm::object::coff_base_reloc_block_entry::getType
int getType() const
Definition: COFF.h:750
llvm
---------------------— PointerInfo ------------------------------------—
Definition: AllocatorList.h:23
llvm::object::coff_runtime_function_x64::UnwindInformation
support::ulittle32_t UnwindInformation
Definition: COFF.h:739
llvm::object::coff_load_config_code_integrity::CatalogOffset
support::ulittle32_t CatalogOffset
Definition: COFF.h:616
llvm::COFF::IMAGE_SCN_LNK_NRELOC_OVFL
@ IMAGE_SCN_LNK_NRELOC_OVFL
Definition: COFF.h:315
llvm::object::coff_aux_function_definition::PointerToNextFunction
support::ulittle32_t PointerToNextFunction
Definition: COFF.h:484
llvm::object::coff_tls_directory::getAlignment
uint32_t getAlignment() const
Definition: COFF.h:577
llvm::object::COFFSymbolRef::getType
uint16_t getType() const
Definition: COFF.h:333
llvm::object::COFFObjectFile::getSymbolAddress
Expected< uint64_t > getSymbolAddress(DataRefImpl Symb) const override
Definition: COFFObjectFile.cpp:166
llvm::object::dos_header::NumberOfRelocationItems
support::ulittle16_t NumberOfRelocationItems
Definition: COFF.h:57
llvm::object::pe32_header::MajorSubsystemVersion
support::ulittle16_t MajorSubsystemVersion
Definition: COFF.h:121
llvm::object::pe32plus_header::SizeOfStackReserve
support::ulittle64_t SizeOfStackReserve
Definition: COFF.h:164
llvm::make_range
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
Definition: iterator_range.h:53
llvm::object::coff_load_configuration32::LockPrefixTable
support::ulittle32_t LockPrefixTable
Definition: COFF.h:631
llvm::object::delay_import_directory_table_entry::DelayImportAddressTable
support::ulittle32_t DelayImportAddressTable
Definition: COFF.h:215
llvm::object::COFFObjectFile::section_begin
section_iterator section_begin() const override
Definition: COFFObjectFile.cpp:922
llvm::object::COFFSymbolRef::getWeakExternal
const coff_aux_weak_external * getWeakExternal() const
Definition: COFF.h:366
llvm::object::COFFSymbolRef::getSectionNumber
int32_t getSectionNumber() const
Definition: COFF.h:322
llvm::object::pe32plus_header::BaseOfCode
support::ulittle32_t BaseOfCode
Definition: COFF.h:148
llvm::object::coff_resource_dir_entry::NameOffset
support::ulittle32_t NameOffset
Definition: COFF.h:756
llvm::object::COFFObjectFile::getRelocationType
uint64_t getRelocationType(DataRefImpl Rel) const override
Definition: COFFObjectFile.cpp:1177
llvm::object::COFFObjectFile::getCOFFRelocation
const coff_relocation * getCOFFRelocation(const RelocationRef &Reloc) const
Definition: COFFObjectFile.cpp:1200
llvm::object::coff_load_configuration64::GuardCFCheckDispatch
support::ulittle64_t GuardCFCheckDispatch
Definition: COFF.h:703
llvm::object::delay_import_directory_table_entry::Attributes
support::ulittle32_t Attributes
Definition: COFF.h:212
llvm::object::coff_load_configuration64::LockPrefixTable
support::ulittle64_t LockPrefixTable
Definition: COFF.h:689
llvm::object::debug_directory::TimeDateStamp
support::ulittle32_t TimeDateStamp
Definition: COFF.h:179
llvm::object::COFFObjectFile::getSectionAddress
uint64_t getSectionAddress(DataRefImpl Sec) const override
Definition: COFFObjectFile.cpp:275
llvm::COFF::IMAGE_SYM_CLASS_STATIC
@ IMAGE_SYM_CLASS_STATIC
Static.
Definition: COFF.h:210
llvm::object::coff_load_configuration64::SecurityCookie
support::ulittle64_t SecurityCookie
Definition: COFF.h:697
llvm::object::COFFObjectFile::getDataDirectory
const data_directory * getDataDirectory(uint32_t index) const
Definition: COFFObjectFile.cpp:1004
llvm::object::coff_bigobj_file_header::NumberOfSymbols
support::ulittle32_t NumberOfSymbols
Definition: COFF.h:100
llvm::object::COFFObjectFile::getHintName
Error getHintName(uint32_t Rva, uint16_t &Hint, StringRef &Name) const
Definition: COFFObjectFile.cpp:509
llvm::object::COFFObjectFile::getStringTableSize
uint32_t getStringTableSize() const
Definition: COFF.h:926
llvm::object::coff_section::VirtualAddress
support::ulittle32_t VirtualAddress
Definition: COFF.h:443
llvm::support::detail::packed_endian_specific_integral
Definition: Endian.h:206
llvm::object::coff_import_header::getType
int getType() const
Definition: COFF.h:551
llvm::object::COFFObjectFile::isSectionVirtual
bool isSectionVirtual(DataRefImpl Sec) const override
Definition: COFFObjectFile.cpp:349
llvm::object::pe32plus_header::FileAlignment
support::ulittle32_t FileAlignment
Definition: COFF.h:151
llvm::object::coff_section::hasExtendedRelocations
bool hasExtendedRelocations() const
Definition: COFF.h:454
llvm::object::COFFObjectFile::getCommonSymbolSizeImpl
uint64_t getCommonSymbolSizeImpl(DataRefImpl Symb) const override
Definition: COFFObjectFile.cpp:241
llvm::object::coff_file_header::Machine
support::ulittle16_t Machine
Definition: COFF.h:76
BinaryByteStream.h
llvm::object::ExportDirectoryEntryRef::ExportDirectoryEntryRef
ExportDirectoryEntryRef(const export_directory_table_entry *Table, uint32_t I, const COFFObjectFile *Owner)
Definition: COFF.h:1174
llvm::object::coff_load_configuration64::EditList
support::ulittle64_t EditList
Definition: COFF.h:696
llvm::object::DelayImportDirectoryEntryRef::DelayImportDirectoryEntryRef
DelayImportDirectoryEntryRef(const delay_import_directory_table_entry *T, uint32_t I, const COFFObjectFile *Owner)
Definition: COFF.h:1148
llvm::object::pe32_header::MajorImageVersion
support::ulittle16_t MajorImageVersion
Definition: COFF.h:119
llvm::object::coff_section::NumberOfLinenumbers
support::ulittle16_t NumberOfLinenumbers
Definition: COFF.h:449
llvm::COFF::IMAGE_SYM_CLASS_FUNCTION
@ IMAGE_SYM_CLASS_FUNCTION
".bf" or ".ef" - beginning or end of function
Definition: COFF.h:229
llvm::object::ImportedSymbolRef::moveNext
void moveNext()
Definition: COFFObjectFile.cpp:1592
llvm::object::coff_load_configuration64::MajorVersion
support::ulittle16_t MajorVersion
Definition: COFF.h:682
llvm::object::export_directory_table_entry::OrdinalTableRVA
support::ulittle32_t OrdinalTableRVA
Definition: COFF.h:233
llvm::object::COFFObjectFile::debug_directories
iterator_range< const debug_directory * > debug_directories() const
Definition: COFF.h:1012
llvm::object::COFFObjectFile::getStartAddress
Expected< uint64_t > getStartAddress() const override
Definition: COFFObjectFile.cpp:978
llvm::object::delay_import_directory_table_entry::TimeStamp
support::ulittle32_t TimeStamp
Definition: COFF.h:219
llvm::object::COFFObjectFile::getSymbolSection
Expected< section_iterator > getSymbolSection(DataRefImpl Symb) const override
Definition: COFFObjectFile.cpp:247
llvm::object::ImportDirectoryEntryRef::getImportAddressTableRVA
Error getImportAddressTableRVA(uint32_t &Result) const
Definition: COFFObjectFile.cpp:1429
llvm::object::debug_directory::Type
support::ulittle32_t Type
Definition: COFF.h:182
llvm::object::coff_section::getAlignment
uint32_t getAlignment() const
Definition: COFF.h:459
llvm::object::ImportedSymbolRef::ImportedSymbolRef
ImportedSymbolRef(const import_lookup_table_entry32 *Entry, uint32_t I, const COFFObjectFile *Owner)
Definition: COFF.h:1199
llvm::object::pe32_header::SizeOfCode
support::ulittle32_t SizeOfCode
Definition: COFF.h:108
llvm::object::COFFObjectFile::import_directories
iterator_range< import_directory_iterator > import_directories() const
Definition: COFFObjectFile.cpp:985
llvm::COFF::IMAGE_SYM_CLASS_EXTERNAL
@ IMAGE_SYM_CLASS_EXTERNAL
External symbol.
Definition: COFF.h:209
ErrorHandling.h
llvm::object::COFFObjectFile::section_rel_end
relocation_iterator section_rel_end(DataRefImpl Sec) const override
Definition: COFFObjectFile.cpp:406
llvm::object::coff_file_header::NumberOfSymbols
support::ulittle32_t NumberOfSymbols
Definition: COFF.h:80
llvm::Error::success
static ErrorSuccess success()
Create a success value.
Definition: Error.h:331
llvm::object::coff_bigobj_file_header::unused4
support::ulittle32_t unused4
Definition: COFF.h:97
llvm::object::BaseRelocRef::operator==
bool operator==(const BaseRelocRef &Other) const
Definition: COFFObjectFile.cpp:1659
llvm::object::ImportedSymbolRef::ImportedSymbolRef
ImportedSymbolRef()=default
llvm::object::export_directory_table_entry
Definition: COFF.h:222
llvm::object::COFFSymbolRef::isFunctionDefinition
bool isFunctionDefinition() const
Definition: COFF.h:395
llvm::object::coff_guard_flags
coff_guard_flags
Bits in control flow guard flags as we understand them.
Definition: COFF.h:601
llvm::object::coff_load_configuration64::DeCommitFreeBlockThreshold
support::ulittle64_t DeCommitFreeBlockThreshold
Definition: COFF.h:687
llvm::object::coff_aux_clr_token::SymbolTableIndex
support::ulittle32_t SymbolTableIndex
Definition: COFF.h:534
llvm::object::COFFObjectFile::getSectionID
unsigned getSectionID(SectionRef Sec) const
Definition: COFFObjectFile.cpp:342
llvm::COFF::SCT_COMPLEX_TYPE_SHIFT
@ SCT_COMPLEX_TYPE_SHIFT
Type is formed as (base + (derived << SCT_COMPLEX_TYPE_SHIFT))
Definition: COFF.h:265
llvm::object::StringTableOffset::Offset
support::ulittle32_t Offset
Definition: COFF.h:246
llvm::object::coff_load_configuration64::Reserved2
support::ulittle16_t Reserved2
Definition: COFF.h:720
COFF.h
llvm::object::COFFObjectFile::getTimeDateStamp
uint32_t getTimeDateStamp() const
Definition: COFF.h:887
llvm::object::COFFObjectFile::getVaPtr
Error getVaPtr(uint64_t VA, uintptr_t &Res) const
Definition: COFFObjectFile.cpp:464
llvm::object::coff_aux_clr_token::Reserved
uint8_t Reserved
Definition: COFF.h:533
llvm::object::COFFSymbolRef::isBigObj
bool isBigObj() const
Definition: COFF.h:300
llvm::object::COFFSymbolRef::getSectionDefinition
const coff_aux_section_definition * getSectionDefinition() const
Definition: COFF.h:359
llvm::COFF::NameSize
@ NameSize
Definition: COFF.h:58
llvm::object::ResourceSectionRef::getTableEntry
Expected< const coff_resource_dir_entry & > getTableEntry(const coff_resource_dir_table &Table, uint32_t Index)
Definition: COFFObjectFile.cpp:1766
llvm::object::delay_import_directory_table_entry::DelayImportNameTable
support::ulittle32_t DelayImportNameTable
Definition: COFF.h:216
llvm::object::COFFSymbolRef::getAux
const T * getAux() const
Definition: COFF.h:354
llvm::object::import_lookup_table_entry::getOrdinal
uint16_t getOrdinal() const
Definition: COFF.h:194
llvm::object::coff_tls_directory::SizeOfZeroFill
support::ulittle32_t SizeOfZeroFill
Definition: COFF.h:574
llvm::object::ExportDirectoryEntryRef::getSymbolName
Error getSymbolName(StringRef &Result) const
Definition: COFFObjectFile.cpp:1535
Shift
bool Shift
Definition: README.txt:468
llvm::object::coff_symbol_generic::ShortName
char ShortName[COFF::NameSize]
Definition: COFF.h:271
llvm::object::dos_header::OverlayNumber
support::ulittle16_t OverlayNumber
Definition: COFF.h:67
llvm::object::pe32_header::SizeOfHeaders
support::ulittle32_t SizeOfHeaders
Definition: COFF.h:125
llvm::Type
The instances of the Type class are immutable: once they are created, they are never changed.
Definition: Type.h:45
llvm::object::coff_load_configuration32::GuardCFFunctionCount
support::ulittle32_t GuardCFFunctionCount
Definition: COFF.h:647
llvm::object::coff_load_configuration32::GuardAddressTakenIatEntryTable
support::ulittle32_t GuardAddressTakenIatEntryTable
Definition: COFF.h:652
llvm::object::coff_guard_flags::HasLongJmpTable
@ HasLongJmpTable
llvm::object::coff_aux_bf_and_ef_symbol::Unused1
char Unused1[4]
Definition: COFF.h:492
llvm::object::coff_load_configuration64::EnclaveConfigurationPointer
support::ulittle64_t EnclaveConfigurationPointer
Definition: COFF.h:726
llvm::object::COFFSymbolRef::getBaseType
uint8_t getBaseType() const
Definition: COFF.h:348
llvm::object::coff_load_configuration64::MaximumAllocationSize
support::ulittle64_t MaximumAllocationSize
Definition: COFF.h:690
llvm::object::ImportDirectoryEntryRef::lookup_table_begin
imported_symbol_iterator lookup_table_begin() const
Definition: COFFObjectFile.cpp:1400
llvm::object::FpoData::getPrologSize
int getPrologSize() const
Definition: COFF.h:1284
llvm::object::coff_bigobj_file_header::NumberOfSections
support::ulittle32_t NumberOfSections
Definition: COFF.h:98
llvm::object::COFFObjectFile::getFeatures
SubtargetFeatures getFeatures() const override
Definition: COFF.h:990
llvm::object::COFFObjectFile::getLoadConfig32
const coff_load_configuration32 * getLoadConfig32() const
Definition: COFF.h:928
llvm::object::coff_load_configuration32::EnclaveConfigurationPointer
support::ulittle32_t EnclaveConfigurationPointer
Definition: COFF.h:668
llvm::object::pe32plus_header::LoaderFlags
support::ulittle32_t LoaderFlags
Definition: COFF.h:168
T
#define T
Definition: Mips16ISelLowering.cpp:341
llvm::object::COFFSymbolRef::isExternal
bool isExternal() const
Definition: COFF.h:377
Offset
uint64_t Offset
Definition: ELFObjHandler.cpp:81
llvm::object::pe32plus_header::SizeOfInitializedData
support::ulittle32_t SizeOfInitializedData
Definition: COFF.h:145
llvm::object::delay_import_directory_table_entry::BoundDelayImportTable
support::ulittle32_t BoundDelayImportTable
Definition: COFF.h:217
llvm::object::ExportDirectoryEntryRef::getExportRVA
Error getExportRVA(uint32_t &Result) const
Definition: COFFObjectFile.cpp:1521
llvm::object::coff_aux_bf_and_ef_symbol::Unused2
char Unused2[6]
Definition: COFF.h:494
llvm::object::pe32plus_header::SizeOfUninitializedData
support::ulittle32_t SizeOfUninitializedData
Definition: COFF.h:146
llvm::object::pe32_header::MinorSubsystemVersion
support::ulittle16_t MinorSubsystemVersion
Definition: COFF.h:122
llvm::object::coff_section::VirtualSize
support::ulittle32_t VirtualSize
Definition: COFF.h:442
llvm::object::COFFObjectFile::getArch
Triple::ArchType getArch() const override
Definition: COFFObjectFile.cpp:963
llvm::object::ImportDirectoryEntryRef::imported_symbol_begin
imported_symbol_iterator imported_symbol_begin() const
Definition: COFFObjectFile.cpp:1384
llvm::object::coff_resource_dir_entry::Identifier
union llvm::object::coff_resource_dir_entry::@310 Identifier
llvm::object::coff_aux_clr_token::AuxType
uint8_t AuxType
Definition: COFF.h:532
llvm::object::coff_load_configuration32::GuardEHContinuationCount
support::ulittle32_t GuardEHContinuationCount
Definition: COFF.h:671
llvm::object::coff_load_configuration32::GuardFlags
support::ulittle32_t GuardFlags
Definition: COFF.h:648
llvm::Expected
Tagged union holding either a T or a Error.
Definition: APFloat.h:42
llvm::object::COFFObjectFile::export_directory_end
export_directory_iterator export_directory_end() const
Definition: COFFObjectFile.cpp:914
initialize
static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, ArrayRef< StringLiteral > StandardNames)
Initialize the set of available library functions based on the specified target triple.
Definition: TargetLibraryInfo.cpp:116
llvm::object::ImportDirectoryEntryRef::getName
Error getName(StringRef &Result) const
Definition: COFFObjectFile.cpp:1415
llvm::object::coff_load_configuration32::ProcessAffinityMask
support::ulittle32_t ProcessAffinityMask
Definition: COFF.h:634
llvm::object::debug_h_header
Definition: COFF.h:793
llvm::object::coff_tls_directory
Definition: COFF.h:569
llvm::isPowerOf2_32
constexpr bool isPowerOf2_32(uint32_t Value)
Return true if the argument is a power of two > 0.
Definition: MathExtras.h:491
llvm::object::pe32_header::SizeOfInitializedData
support::ulittle32_t SizeOfInitializedData
Definition: COFF.h:109
llvm::object::coff_load_configuration32::DynamicValueRelocTableOffset
support::ulittle32_t DynamicValueRelocTableOffset
Definition: COFF.h:660
llvm::object::coff_base_reloc_block_header
Definition: COFF.h:742
llvm::object::import_lookup_table_entry32
import_lookup_table_entry< support::little32_t > import_lookup_table_entry32
Definition: COFF.h:206
llvm::object::coff_guard_flags::CFInstrumented
@ CFInstrumented
llvm::object::export_address_table_entry::ExportRVA
support::ulittle32_t ExportRVA
Definition: COFF.h:237
llvm::object::debug_directory::PointerToRawData
support::ulittle32_t PointerToRawData
Definition: COFF.h:185
llvm::object::pe32plus_header
The 64-bit PE header that follows the COFF header.
Definition: COFF.h:140
llvm::COFF::IMAGE_SYM_ABSOLUTE
@ IMAGE_SYM_ABSOLUTE
Definition: COFF.h:198
llvm::object::ExportDirectoryEntryRef::getForwardTo
Error getForwardTo(StringRef &Result) const
Definition: COFFObjectFile.cpp:1575
llvm::object::pe32plus_header::MinorOperatingSystemVersion
support::ulittle16_t MinorOperatingSystemVersion
Definition: COFF.h:153
llvm::object::coff_base_reloc_block_entry::Data
support::ulittle16_t Data
Definition: COFF.h:748
llvm::object::COFFObjectFile::getRvaPtr
Error getRvaPtr(uint32_t Rva, uintptr_t &Res) const
Definition: COFFObjectFile.cpp:472
llvm::MemoryBufferRef
Definition: MemoryBufferRef.h:22
llvm::object::pe32_header::Subsystem
support::ulittle16_t Subsystem
Definition: COFF.h:127
llvm::object::export_directory_table_entry::ExportAddressTableRVA
support::ulittle32_t ExportAddressTableRVA
Definition: COFF.h:231
llvm::object::coff_load_configuration32::Reserved2
support::ulittle16_t Reserved2
Definition: COFF.h:662
llvm::object::delay_import_directory_table_entry::UnloadDelayImportTable
support::ulittle32_t UnloadDelayImportTable
Definition: COFF.h:218
llvm::object::coff_load_configuration64::GuardCFFunctionCount
support::ulittle64_t GuardCFFunctionCount
Definition: COFF.h:705
llvm::object::coff_guard_flags::DelayLoadIATSection
@ DelayLoadIATSection
llvm::object::coff_load_config_code_integrity
Definition: COFF.h:613
llvm::object::coff_load_configuration32::CodeIntegrity
coff_load_config_code_integrity CodeIntegrity
Definition: COFF.h:651
llvm::object::COFFSymbolRef::isFileRecord
bool isFileRecord() const
Definition: COFF.h:409
llvm::object::pe32plus_header::SizeOfHeapCommit
support::ulittle64_t SizeOfHeapCommit
Definition: COFF.h:167
llvm::object::pe32_header::MajorLinkerVersion
uint8_t MajorLinkerVersion
Definition: COFF.h:106
llvm::object::COFFObjectFile::getRelocations
ArrayRef< coff_relocation > getRelocations(const coff_section *Sec) const
Definition: COFFObjectFile.cpp:1205
llvm::object::coff_import_directory_table_entry::ImportAddressTableRVA
support::ulittle32_t ImportAddressTableRVA
Definition: COFF.h:560
llvm::object::coff_file_header::NumberOfSections
support::ulittle16_t NumberOfSections
Definition: COFF.h:77
llvm::object::ImportDirectoryEntryRef::lookup_table_symbols
iterator_range< imported_symbol_iterator > lookup_table_symbols() const
Definition: COFFObjectFile.cpp:1411
llvm::object::pe32_header::BaseOfCode
support::ulittle32_t BaseOfCode
Definition: COFF.h:112
llvm::object::pe32_header::SizeOfHeapReserve
support::ulittle32_t SizeOfHeapReserve
Definition: COFF.h:132
llvm::object::ResourceSectionRef::getEntryData
Expected< const coff_resource_data_entry & > getEntryData(const coff_resource_dir_entry &Entry)
Definition: COFFObjectFile.cpp:1756
llvm::object::coff_load_configuration32::GuardCFCheckDispatch
support::ulittle32_t GuardCFCheckDispatch
Definition: COFF.h:645
llvm::object::COFFSymbolRef::isWeakExternal
bool isWeakExternal() const
Definition: COFF.h:391
llvm::object::coff_load_configuration64::GuardXFGCheckFunctionPointer
support::ulittle64_t GuardXFGCheckFunctionPointer
Definition: COFF.h:730
llvm::object::dos_header
The DOS compatible header at the front of all PE/COFF executables.
Definition: COFF.h:53
llvm::object::dos_header::Magic
char Magic[2]
Definition: COFF.h:54
llvm::object::COFFSymbolRef::getShortName
const char * getShortName() const
Definition: COFF.h:308
llvm::object::coff_load_configuration32::GlobalFlagsSet
support::ulittle32_t GlobalFlagsSet
Definition: COFF.h:627
llvm::object::coff_load_configuration32::ProcessHeapFlags
support::ulittle32_t ProcessHeapFlags
Definition: COFF.h:635
llvm::object::coff_load_configuration64::DynamicValueRelocTableOffset
support::ulittle32_t DynamicValueRelocTableOffset
Definition: COFF.h:718
llvm::ARMBuildAttrs::Section
@ Section
Legacy Tags.
Definition: ARMBuildAttributes.h:78
llvm::object::coff_import_header::Machine
support::ulittle16_t Machine
Definition: COFF.h:545
llvm::object::coff_file_header
Definition: COFF.h:75
llvm::object::ImportedSymbolRef::getOrdinal
Error getOrdinal(uint16_t &Result) const
Definition: COFFObjectFile.cpp:1632
llvm::object::COFFObjectFile::getFileFormatName
StringRef getFileFormatName() const override
Definition: COFFObjectFile.cpp:948
llvm::object::coff_load_configuration64::GuardAddressTakenIatEntryCount
support::ulittle64_t GuardAddressTakenIatEntryCount
Definition: COFF.h:711
llvm::object::COFFObjectFile::section_end
section_iterator section_end() const override
Definition: COFFObjectFile.cpp:928
llvm::object::BaseRelocRef::BaseRelocRef
BaseRelocRef()=default
llvm::object::coff_load_configuration32::DeCommitTotalFreeThreshold
support::ulittle32_t DeCommitTotalFreeThreshold
Definition: COFF.h:630
llvm::object::import_lookup_table_entry
Definition: COFF.h:189
llvm::object::ImportedSymbolRef::ImportedSymbolRef
ImportedSymbolRef(const import_lookup_table_entry64 *Entry, uint32_t I, const COFFObjectFile *Owner)
Definition: COFF.h:1202
llvm::object::COFFObjectFile::getSectionSize
uint64_t getSectionSize(DataRefImpl Sec) const override
llvm::object::coff_resource_data_entry::Codepage
support::ulittle32_t Codepage
Definition: COFF.h:780
llvm::object::COFFObjectFile::debug_directory_begin
const debug_directory * debug_directory_begin() const
Definition: COFF.h:1000
llvm::object::coff_guard_flags::FidTableHasFlags
@ FidTableHasFlags
llvm::object::coff_load_configuration32::GuardRFFailureRoutine
support::ulittle32_t GuardRFFailureRoutine
Definition: COFF.h:658
llvm::object::coff_load_configuration32::VolatileMetadataPointer
support::ulittle32_t VolatileMetadataPointer
Definition: COFF.h:669
llvm::object::ImportedSymbolRef::getSymbolName
Error getSymbolName(StringRef &Result) const
Definition: COFFObjectFile.cpp:1596
Error.h
llvm::object::coff_import_header::Sig2
support::ulittle16_t Sig2
Definition: COFF.h:543
llvm::object::data_directory::RelativeVirtualAddress
support::ulittle32_t RelativeVirtualAddress
Definition: COFF.h:173
llvm::object::COFFSymbolRef
Definition: COFF.h:280
SubtargetFeature.h
llvm::object::coff_aux_weak_external::TagIndex
support::ulittle32_t TagIndex
Definition: COFF.h:503
llvm::object::ImportedSymbolRef::getHintNameRVA
Error getHintNameRVA(uint32_t &Result) const
Definition: COFFObjectFile.cpp:1624
llvm::object::coff_aux_section_definition::NumberOfRelocations
support::ulittle16_t NumberOfRelocations
Definition: COFF.h:513
llvm::COFF::IMAGE_SYM_CLASS_FILE
@ IMAGE_SYM_CLASS_FILE
File name.
Definition: COFF.h:231
llvm::object::coff_aux_weak_external::Unused1
char Unused1[10]
Definition: COFF.h:505
llvm::object::coff_section::PointerToRelocations
support::ulittle32_t PointerToRelocations
Definition: COFF.h:446
llvm::object::coff_aux_section_definition::NumberHighPart
support::ulittle16_t NumberHighPart
Definition: COFF.h:519
llvm::object::coff_bigobj_file_header::Sig1
support::ulittle16_t Sig1
Definition: COFF.h:88
llvm::Triple::ArchType
ArchType
Definition: Triple.h:47
llvm::ModRefInfo::Ref
@ Ref
The access may reference the value stored in memory.
llvm::object::pe32plus_header::Win32VersionValue
support::ulittle32_t Win32VersionValue
Definition: COFF.h:158
llvm::object::coff_load_configuration32::VirtualMemoryThreshold
support::ulittle32_t VirtualMemoryThreshold
Definition: COFF.h:633
llvm::object::coff_import_directory_table_entry::NameRVA
support::ulittle32_t NameRVA
Definition: COFF.h:559
llvm::object::coff_tls_directory::setAlignment
void setAlignment(uint32_t Align)
Definition: COFF.h:585
llvm::object::import_lookup_table_entry::isOrdinal
bool isOrdinal() const
Definition: COFF.h:192
llvm::object::COFFObjectFile::getMachine
uint16_t getMachine() const
Definition: COFF.h:859
llvm::object::coff_load_configuration64::GuardLongJumpTargetTable
support::ulittle64_t GuardLongJumpTargetTable
Definition: COFF.h:712
E
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
llvm::object::frame_type::Tss
@ Tss
llvm::support::little
@ little
Definition: Endian.h:27
llvm::object::COFFObjectFile::getSymbolAlignment
uint32_t getSymbolAlignment(DataRefImpl Symb) const override
Definition: COFFObjectFile.cpp:159
llvm::object::export_directory_table_entry::OrdinalBase
support::ulittle32_t OrdinalBase
Definition: COFF.h:228
llvm::object::pe32plus_header::MajorImageVersion
support::ulittle16_t MajorImageVersion
Definition: COFF.h:154
llvm::object::coff_symbol::NumberOfAuxSymbols
uint8_t NumberOfAuxSymbols
Definition: COFF.h:262
llvm::errorCodeToError
Error errorCodeToError(std::error_code EC)
Helper for converting an std::error_code to a Error.
Definition: Error.cpp:87
llvm::object::COFFObjectFile::getPointerToSymbolTable
uint32_t getPointerToSymbolTable() const
Definition: COFF.h:903
llvm::BinaryByteStream
An implementation of BinaryStream which holds its entire data set in a single contiguous buffer.
Definition: BinaryByteStream.h:31
llvm::object::coff_resource_data_entry
Definition: COFF.h:777
llvm::object::FpoData::useBP
bool useBP() const
Definition: COFF.h:1293
llvm::object::ExportDirectoryEntryRef::ExportDirectoryEntryRef
ExportDirectoryEntryRef()=default
llvm::object::debug_directory::MinorVersion
support::ulittle16_t MinorVersion
Definition: COFF.h:181
llvm::object::export_directory_table_entry::AddressTableEntries
support::ulittle32_t AddressTableEntries
Definition: COFF.h:229
llvm::object::COFFObjectFile::getTLSDirectory64
const coff_tls_directory64 * getTLSDirectory64() const
Definition: COFF.h:1019
llvm::object::coff_load_configuration64::ProcessHeapFlags
support::ulittle32_t ProcessHeapFlags
Definition: COFF.h:693
llvm::object::ExportDirectoryEntryRef::isForwarder
Error isForwarder(bool &Result) const
Definition: COFFObjectFile.cpp:1561
llvm::object::COFFObjectFile::getLoadConfig64
const coff_load_configuration64 * getLoadConfig64() const
Definition: COFF.h:933
llvm::SubtargetFeatures
Manages the enabling and disabling of subtarget specific features.
Definition: SubtargetFeature.h:183
llvm::object::coff_load_configuration64
64-bit load config (IMAGE_LOAD_CONFIG_DIRECTORY64)
Definition: COFF.h:679
llvm::object::coff_resource_data_entry::DataRVA
support::ulittle32_t DataRVA
Definition: COFF.h:778
llvm::object::export_directory_table_entry::NamePointerRVA
support::ulittle32_t NamePointerRVA
Definition: COFF.h:232
llvm::object::coff_load_config_code_integrity::Catalog
support::ulittle16_t Catalog
Definition: COFF.h:615
llvm::object::coff_section::Name
char Name[COFF::NameSize]
Definition: COFF.h:441
llvm::Log2_32
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:596
llvm::object::coff_load_configuration64::DynamicValueRelocTableSection
support::ulittle16_t DynamicValueRelocTableSection
Definition: COFF.h:719
llvm::object::coff_aux_section_definition
Definition: COFF.h:511
B
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
llvm::object::coff_section::PointerToRawData
support::ulittle32_t PointerToRawData
Definition: COFF.h:445
llvm::object::coff_resource_dir_entry::DataEntryOffset
support::ulittle32_t DataEntryOffset
Definition: COFF.h:766
llvm::object::coff_load_configuration64::GlobalFlagsSet
support::ulittle32_t GlobalFlagsSet
Definition: COFF.h:685
llvm::object::BaseRelocRef::BaseRelocRef
BaseRelocRef(const coff_base_reloc_block_header *Header, const COFFObjectFile *Owner)
Definition: COFF.h:1224
llvm::object::coff_aux_clr_token::MBZ
char MBZ[12]
Definition: COFF.h:535
llvm::object::pe32plus_header::ImageBase
support::ulittle64_t ImageBase
Definition: COFF.h:149
llvm::object::pe32_header::CheckSum
support::ulittle32_t CheckSum
Definition: COFF.h:126
llvm::object::coff_load_configuration32::MinorVersion
support::ulittle16_t MinorVersion
Definition: COFF.h:625
llvm::object::COFFObjectFile::getCOFFBigObjHeader
const coff_bigobj_file_header * getCOFFBigObjHeader() const
Definition: COFF.h:1030
llvm::object::export_directory_table_entry::NumberOfNamePointers
support::ulittle32_t NumberOfNamePointers
Definition: COFF.h:230
llvm::object::coff_tls_directory::AddressOfCallBacks
IntTy AddressOfCallBacks
Definition: COFF.h:573
llvm::object::COFFObjectFile::getRelocationOffset
uint64_t getRelocationOffset(DataRefImpl Rel) const override
Definition: COFFObjectFile.cpp:1158
CVDebugRecord.h
llvm::object::coff_load_configuration64::CastGuardOsDeterminedFailureMode
support::ulittle64_t CastGuardOsDeterminedFailureMode
Definition: COFF.h:733
llvm::object::dos_header::InitialSP
support::ulittle16_t InitialSP
Definition: COFF.h:62
llvm::object::coff_load_configuration32::SecurityCookie
support::ulittle32_t SecurityCookie
Definition: COFF.h:639
llvm::object::coff_load_configuration64::CodeIntegrity
coff_load_config_code_integrity CodeIntegrity
Definition: COFF.h:709
llvm::object::COFFSymbolRef::COFFSymbolRef
COFFSymbolRef(const coff_symbol32 *CS)
Definition: COFF.h:284
llvm::object::ResourceSectionRef::getEntrySubDir
Expected< const coff_resource_dir_table & > getEntrySubDir(const coff_resource_dir_entry &Entry)
Definition: COFFObjectFile.cpp:1750
llvm::object::coff_bigobj_file_header::unused1
support::ulittle32_t unused1
Definition: COFF.h:94
llvm::object::coff_load_configuration32::GuardXFGDispatchFunctionPointer
support::ulittle32_t GuardXFGDispatchFunctionPointer
Definition: COFF.h:673
llvm::object::pe32plus_header::SizeOfHeapReserve
support::ulittle64_t SizeOfHeapReserve
Definition: COFF.h:166
llvm::object::object_error::parse_failed
@ parse_failed
llvm::object::FpoData::hasSEH
bool hasSEH() const
Definition: COFF.h:1290
llvm::object::coff_load_config_code_integrity::Flags
support::ulittle16_t Flags
Definition: COFF.h:614
llvm::object::coff_file_header::isImportLibrary
bool isImportLibrary() const
Definition: COFF.h:84
llvm::object::pe32plus_header::MajorLinkerVersion
uint8_t MajorLinkerVersion
Definition: COFF.h:142
llvm::object::COFFSymbolRef::COFFSymbolRef
COFFSymbolRef()=default
llvm::object::dos_header::Reserved2
support::ulittle16_t Reserved2[10]
Definition: COFF.h:71
llvm::object::COFFSymbolRef::isCLRToken
bool isCLRToken() const
Definition: COFF.h:429
Info
Analysis containing CSE Info
Definition: CSEInfo.cpp:27
llvm::object::coff_guard_flags::ProtectDelayLoadIAT
@ ProtectDelayLoadIAT
llvm::object::export_address_table_entry
Definition: COFF.h:236
llvm::COFF::IMAGE_SYM_CLASS_WEAK_EXTERNAL
@ IMAGE_SYM_CLASS_WEAK_EXTERNAL
Duplicate tag.
Definition: COFF.h:234
llvm::object::coff_symbol
Definition: COFF.h:250
llvm::object::coff_section::Characteristics
support::ulittle32_t Characteristics
Definition: COFF.h:450
llvm::object::coff_symbol16
coff_symbol< support::ulittle16_t > coff_symbol16
Definition: COFF.h:265
llvm::object::export_directory_table_entry::NameRVA
support::ulittle32_t NameRVA
Definition: COFF.h:227
llvm::object::coff_aux_weak_external::Characteristics
support::ulittle32_t Characteristics
Definition: COFF.h:504
llvm::object::dos_header::AddressOfRelocationTable
support::ulittle16_t AddressOfRelocationTable
Definition: COFF.h:66
llvm::Align
This struct is a compact representation of a valid (non-zero power of two) alignment.
Definition: Alignment.h:39
llvm::object::pe32_header::ImageBase
support::ulittle32_t ImageBase
Definition: COFF.h:114
llvm::object::coff_load_configuration64::SEHandlerCount
support::ulittle64_t SEHandlerCount
Definition: COFF.h:699
llvm::object::coff_relocation
Definition: COFF.h:474
llvm::object::COFFObjectFile::getSymbolTableEntrySize
size_t getSymbolTableEntrySize() const
Definition: COFF.h:1065
llvm::object::COFFObjectFile::getSymbolFlags
Expected< uint32_t > getSymbolFlags(DataRefImpl Symb) const override
Definition: COFFObjectFile.cpp:210
llvm::object::COFFObjectFile::getSymbolIndex
uint32_t getSymbolIndex(COFFSymbolRef Symbol) const
Definition: COFFObjectFile.cpp:1077
llvm::object::FpoData::NumLocals
support::ulittle32_t NumLocals
Definition: COFF.h:1279
llvm::object::coff_symbol::SectionNumber
SectionNumberType SectionNumber
Definition: COFF.h:257
llvm::object::COFFObjectFile::getSymbolSectionID
unsigned getSymbolSectionID(SymbolRef Sym) const
Definition: COFFObjectFile.cpp:259
llvm::object::pe32plus_header::MajorOperatingSystemVersion
support::ulittle16_t MajorOperatingSystemVersion
Definition: COFF.h:152
llvm::object::COFFObjectFile::section_rel_begin
relocation_iterator section_rel_begin(DataRefImpl Sec) const override
Definition: COFFObjectFile.cpp:396
llvm::object::dos_header::OEMid
support::ulittle16_t OEMid
Definition: COFF.h:69
llvm::object::coff_aux_section_definition::CheckSum
support::ulittle32_t CheckSum
Definition: COFF.h:515
llvm::object::import_lookup_table_entry::getHintNameRVA
uint32_t getHintNameRVA() const
Definition: COFF.h:199
llvm::object::coff_import_header::TimeDateStamp
support::ulittle32_t TimeDateStamp
Definition: COFF.h:546
llvm::object::COFFObjectFile::moveSectionNext
void moveSectionNext(DataRefImpl &Sec) const override
Definition: COFFObjectFile.cpp:264
llvm::object::coff_import_header::Sig1
support::ulittle16_t Sig1
Definition: COFF.h:542
llvm::object::coff_resource_dir_entry
Definition: COFF.h:754
llvm::object::COFFSymbolRef::getStringTableOffset
const StringTableOffset & getStringTableOffset() const
Definition: COFF.h:312
llvm::object::pe32_header::SizeOfHeapCommit
support::ulittle32_t SizeOfHeapCommit
Definition: COFF.h:133
llvm::object::coff_aux_section_definition::Length
support::ulittle32_t Length
Definition: COFF.h:512
llvm::object::pe32plus_header::SizeOfStackCommit
support::ulittle64_t SizeOfStackCommit
Definition: COFF.h:165
llvm::object::coff_load_configuration32::CastGuardOsDeterminedFailureMode
support::ulittle32_t CastGuardOsDeterminedFailureMode
Definition: COFF.h:675
llvm::object::pe32_header::SizeOfImage
support::ulittle32_t SizeOfImage
Definition: COFF.h:124
llvm::object::ImportedSymbolRef
Definition: COFF.h:1196
llvm::object::coff_load_configuration64::ProcessAffinityMask
support::ulittle64_t ProcessAffinityMask
Definition: COFF.h:692
llvm::object::COFFSymbolRef::isSectionDefinition
bool isSectionDefinition() const
Definition: COFF.h:417
llvm::object::coff_load_configuration64::Size
support::ulittle32_t Size
Definition: COFF.h:680
llvm::object::coff_base_reloc_block_entry::getOffset
int getOffset() const
Definition: COFF.h:751
llvm::object::coff_symbol::Offset
StringTableOffset Offset
Definition: COFF.h:253
llvm::object::COFFSymbolRef::isUndefined
bool isUndefined() const
Definition: COFF.h:386
llvm::OutputFileType::Object
@ Object
llvm::object::SectionRef
This is a value type class that represents a single section in the list of sections in the object fil...
Definition: ObjectFile.h:80
llvm::object::frame_type::Fpo
@ Fpo
llvm::object::COFFObjectFile::export_directory_begin
export_directory_iterator export_directory_begin() const
Definition: COFFObjectFile.cpp:909
llvm::object::coff_aux_function_definition::TagIndex
support::ulittle32_t TagIndex
Definition: COFF.h:481
llvm::object::import_lookup_table_entry::Data
IntTy Data
Definition: COFF.h:190
llvm::support::ulittle32_t
detail::packed_endian_specific_integral< uint32_t, little, unaligned > ulittle32_t
Definition: Endian.h:272
llvm::object::COFFSymbolRef::isAnyUndefined
bool isAnyUndefined() const
Definition: COFF.h:405
llvm::object::COFFObjectFile::isSectionData
bool isSectionData(DataRefImpl Sec) const override
Definition: COFFObjectFile.cpp:316
llvm::object::coff_load_configuration32::MajorVersion
support::ulittle16_t MajorVersion
Definition: COFF.h:624
llvm::COFF::IMAGE_SYM_UNDEFINED
@ IMAGE_SYM_UNDEFINED
Definition: COFF.h:199
llvm::object::COFFObjectFile::base_reloc_end
base_reloc_iterator base_reloc_end() const
Definition: COFFObjectFile.cpp:940
llvm::COFF::IMAGE_SYM_TYPE_NULL
@ IMAGE_SYM_TYPE_NULL
No type information or unknown base type.
Definition: COFF.h:240
llvm::object::debug_directory::Characteristics
support::ulittle32_t Characteristics
Definition: COFF.h:178
llvm::object::coff_tls_directory::Characteristics
support::ulittle32_t Characteristics
Definition: COFF.h:575
llvm::object::pe32_header::MinorOperatingSystemVersion
support::ulittle16_t MinorOperatingSystemVersion
Definition: COFF.h:118
llvm::object::FpoData::Offset
support::ulittle32_t Offset
Definition: COFF.h:1277
llvm::object::coff_file_header::TimeDateStamp
support::ulittle32_t TimeDateStamp
Definition: COFF.h:78
llvm::object::COFFObjectFile::getSymbolTable
uintptr_t getSymbolTable() const
Definition: COFF.h:851
llvm::object::coff_bigobj_file_header::TimeDateStamp
support::ulittle32_t TimeDateStamp
Definition: COFF.h:92
llvm::object::data_directory
Definition: COFF.h:172
llvm::object::COFFObjectFile::getImageBase
uint64_t getImageBase() const
Definition: COFFObjectFile.cpp:454
llvm::RISCVFenceField::O
@ O
Definition: RISCVBaseInfo.h:179
llvm::support::ulittle16_t
detail::packed_endian_specific_integral< uint16_t, little, unaligned > ulittle16_t
Definition: Endian.h:270
object
bar al al movzbl eax ret Missed when stored in a memory object
Definition: README.txt:1411
llvm::object::dos_header::OEMinfo
support::ulittle16_t OEMinfo
Definition: COFF.h:70
llvm::object::coff_load_configuration64::GuardFlags
support::ulittle32_t GuardFlags
Definition: COFF.h:706
llvm::object::coff_symbol::Value
support::ulittle32_t Value
Definition: COFF.h:256
llvm::COFF::IMAGE_SCN_TYPE_NO_PAD
@ IMAGE_SCN_TYPE_NO_PAD
Definition: COFF.h:287
llvm::object::debug_h_header::Magic
support::ulittle32_t Magic
Definition: COFF.h:794
llvm::object::dos_header::InitialRelativeCS
support::ulittle16_t InitialRelativeCS
Definition: COFF.h:65
llvm::object::coff_symbol_generic::Offset
StringTableOffset Offset
Definition: COFF.h:272
llvm::object::coff_aux_function_definition::Unused1
char Unused1[2]
Definition: COFF.h:485
llvm::object::coff_import_directory_table_entry::isNull
bool isNull() const
Definition: COFF.h:562
llvm::object::export_directory_table_entry::TimeDateStamp
support::ulittle32_t TimeDateStamp
Definition: COFF.h:224
llvm::object::coff_load_configuration32::MaximumAllocationSize
support::ulittle32_t MaximumAllocationSize
Definition: COFF.h:632
Index
uint32_t Index
Definition: ELFObjHandler.cpp:84
index
splat index
Definition: README_ALTIVEC.txt:181
llvm::object::coff_load_configuration32
32-bit load config (IMAGE_LOAD_CONFIG_DIRECTORY32)
Definition: COFF.h:621
llvm::object::pe32_header::MinorLinkerVersion
uint8_t MinorLinkerVersion
Definition: COFF.h:107
llvm::object::FpoData::Size
support::ulittle32_t Size
Definition: COFF.h:1278
llvm::object::symbol_iterator
Definition: ObjectFile.h:207
llvm::object::pe32plus_header::NumberOfRvaAndSize
support::ulittle32_t NumberOfRvaAndSize
Definition: COFF.h:169
llvm::object::coff_resource_dir_table::TimeDateStamp
support::ulittle32_t TimeDateStamp
Definition: COFF.h:786
llvm::object::ImportDirectoryEntryRef::ImportDirectoryEntryRef
ImportDirectoryEntryRef()=default
llvm::object::coff_import_header::TypeInfo
support::ulittle16_t TypeInfo
Definition: COFF.h:549
llvm::object::coff_guard_flags::HasEHContTable
@ HasEHContTable
llvm::object::ResourceSectionRef::ResourceSectionRef
ResourceSectionRef()=default
llvm::object::coff_aux_weak_external
Definition: COFF.h:502
llvm::object::coff_load_configuration32::GuardXFGCheckFunctionPointer
support::ulittle32_t GuardXFGCheckFunctionPointer
Definition: COFF.h:672
llvm::object::coff_import_header::getNameType
int getNameType() const
Definition: COFF.h:552
llvm::object::coff_load_configuration64::GuardEHContinuationCount
support::ulittle64_t GuardEHContinuationCount
Definition: COFF.h:729
llvm::object::ImportedSymbolRef::isOrdinal
Error isOrdinal(bool &Result) const
Definition: COFFObjectFile.cpp:1616
llvm::object::coff_load_configuration64::DependentLoadFlags
support::ulittle16_t DependentLoadFlags
Definition: COFF.h:695
llvm::object::COFFObjectFile::getPE32Header
const pe32_header * getPE32Header() const
Definition: COFF.h:1033
llvm::object::ExportDirectoryEntryRef::operator==
bool operator==(const ExportDirectoryEntryRef &Other) const
Definition: COFFObjectFile.cpp:1490
llvm::object::coff_bigobj_file_header::unused3
support::ulittle32_t unused3
Definition: COFF.h:96
llvm::object::COFFSymbolRef::getNumberOfAuxSymbols
uint8_t getNumberOfAuxSymbols() const
Definition: COFF.h:343
llvm::object::pe32plus_header::AddressOfEntryPoint
support::ulittle32_t AddressOfEntryPoint
Definition: COFF.h:147
llvm::object::coff_symbol::ShortName
char ShortName[COFF::NameSize]
Definition: COFF.h:252
llvm::object::coff_symbol::Name
union llvm::object::coff_symbol::@308 Name
llvm::object::ResourceSectionRef::getBaseTable
Expected< const coff_resource_dir_table & > getBaseTable()
Definition: COFFObjectFile.cpp:1761
llvm::COFF::IMAGE_SYM_CLASS_CLR_TOKEN
@ IMAGE_SYM_CLASS_CLR_TOKEN
External symbol in dmert public lib.
Definition: COFF.h:236
llvm::object::coff_aux_function_definition
Definition: COFF.h:480
llvm::object::dos_header::MaximumExtraParagraphs
support::ulittle16_t MaximumExtraParagraphs
Definition: COFF.h:60
llvm::object::ExportDirectoryEntryRef
Definition: COFF.h:1171
llvm::object::COFFObjectFile::mapDebugSectionName
StringRef mapDebugSectionName(StringRef Name) const override
Maps a debug section name to a standard DWARF section name.
Definition: COFFObjectFile.cpp:1321
I
#define I(x, y, z)
Definition: MD5.cpp:59
llvm::object::pe32plus_header::Magic
support::ulittle16_t Magic
Definition: COFF.h:141
llvm::object::coff_resource_dir_entry::SubdirOffset
support::ulittle32_t SubdirOffset
Definition: COFF.h:767
llvm::object::COFFObjectFile::classof
static bool classof(const Binary *v)
Definition: COFF.h:1110
llvm::object::StringTableOffset
Definition: COFF.h:244
llvm::object::export_directory_table_entry::MinorVersion
support::ulittle16_t MinorVersion
Definition: COFF.h:226
llvm::object::COFFObjectFile::create
static Expected< std::unique_ptr< COFFObjectFile > > create(MemoryBufferRef Object)
Definition: COFFObjectFile.cpp:712
llvm::object::COFFObjectFile::getNumberOfSections
uint32_t getNumberOfSections() const
Definition: COFF.h:895
llvm::object::BaseRelocRef::getType
Error getType(uint8_t &Type) const
Definition: COFFObjectFile.cpp:1681
llvm::object::pe32plus_header::SizeOfCode
support::ulittle32_t SizeOfCode
Definition: COFF.h:144
llvm::object::coff_load_configuration32::CriticalSectionDefaultTimeout
support::ulittle32_t CriticalSectionDefaultTimeout
Definition: COFF.h:628
llvm::object::ResourceSectionRef::getContents
Expected< StringRef > getContents(const coff_resource_data_entry &Entry)
Definition: COFFObjectFile.cpp:1808
llvm::object::COFFObjectFile::getAuxSymbol
Error getAuxSymbol(uint32_t index, const T *&Res) const
Definition: COFF.h:1050
llvm::object::pe32_header::AddressOfEntryPoint
support::ulittle32_t AddressOfEntryPoint
Definition: COFF.h:111
llvm::object::COFFSymbolRef::getGeneric
const coff_symbol_generic * getGeneric() const
Definition: COFF.h:290
llvm::object::pe32plus_header::DLLCharacteristics
support::ulittle16_t DLLCharacteristics
Definition: COFF.h:163
llvm::object::coff_symbol_generic::Value
support::ulittle32_t Value
Definition: COFF.h:274
llvm::object::COFFObjectFile::getSizeOfOptionalHeader
uint16_t getSizeOfOptionalHeader() const
Definition: COFF.h:867
llvm::object::pe32_header::SizeOfUninitializedData
support::ulittle32_t SizeOfUninitializedData
Definition: COFF.h:110
llvm::object::coff_load_configuration32::DynamicValueRelocTableSection
support::ulittle16_t DynamicValueRelocTableSection
Definition: COFF.h:661
llvm::object::COFFObjectFile::moveSymbolNext
void moveSymbolNext(DataRefImpl &Symb) const override
Definition: COFFObjectFile.cpp:136
assert
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
llvm::object::pe32_header::LoaderFlags
support::ulittle32_t LoaderFlags
Definition: COFF.h:134
llvm::object::ResourceSectionRef::getEntryNameString
Expected< ArrayRef< UTF16 > > getEntryNameString(const coff_resource_dir_entry &Entry)
Definition: COFFObjectFile.cpp:1712
ObjectFile.h
llvm::object::coff_load_configuration64::GuardAddressTakenIatEntryTable
support::ulittle64_t GuardAddressTakenIatEntryTable
Definition: COFF.h:710
llvm::object::BaseRelocRef
Definition: COFF.h:1221
llvm::object::coff_load_configuration64::TimeDateStamp
support::ulittle32_t TimeDateStamp
Definition: COFF.h:681
llvm::object::content_iterator
Definition: SymbolicFile.h:67
llvm::object::dos_header::UsedBytesInTheLastPage
support::ulittle16_t UsedBytesInTheLastPage
Definition: COFF.h:55
llvm::object::pe32_header::NumberOfRvaAndSize
support::ulittle32_t NumberOfRvaAndSize
Definition: COFF.h:136
llvm::object::ImportDirectoryEntryRef::imported_symbol_end
imported_symbol_iterator imported_symbol_end() const
Definition: COFFObjectFile.cpp:1390
llvm::object::coff_symbol_generic
Definition: COFF.h:269
llvm::object::ObjectFile::base
const uint8_t * base() const
Definition: ObjectFile.h:234
llvm::object::pe32plus_header::MinorSubsystemVersion
support::ulittle16_t MinorSubsystemVersion
Definition: COFF.h:157
iterator_range.h
llvm::object::coff_load_configuration64::GuardEHContinuationTable
support::ulittle64_t GuardEHContinuationTable
Definition: COFF.h:728
llvm::object::DelayImportDirectoryEntryRef::getDelayImportTable
Error getDelayImportTable(const delay_import_directory_table_entry *&Result) const
Definition: COFFObjectFile.cpp:1469
llvm::object::FpoData::getFP
frame_type getFP() const
Definition: COFF.h:1296
UUID
std::pair< llvm::MachO::Target, std::string > UUID
Definition: TextStubCommon.h:23
llvm::object::COFFObjectFile::getNumberOfSymbols
uint32_t getNumberOfSymbols() const
Definition: COFF.h:920
llvm::object::coff_import_header::SizeOfData
support::ulittle32_t SizeOfData
Definition: COFF.h:547
llvm::object::COFFObjectFile::getSymbol
Expected< COFFSymbolRef > getSymbol(uint32_t index) const
Definition: COFF.h:1039
llvm::object::coff_load_configuration32::GuardRFFailureRoutineFunctionPointer
support::ulittle32_t GuardRFFailureRoutineFunctionPointer
Definition: COFF.h:659
llvm::object::coff_load_configuration32::GuardCFCheckFunction
support::ulittle32_t GuardCFCheckFunction
Definition: COFF.h:644
llvm::object::COFFObjectFile::getCOFFSymbol
COFFSymbolRef getCOFFSymbol(const DataRefImpl &Ref) const
Definition: COFFObjectFile.cpp:1187
llvm::object::coff_aux_section_definition::Unused
uint8_t Unused
Definition: COFF.h:518
llvm::object::ExportDirectoryEntryRef::getOrdinalBase
Error getOrdinalBase(uint32_t &Result) const
Definition: COFFObjectFile.cpp:1509
llvm::object::ResourceSectionRef::load
Error load(const COFFObjectFile *O)
Definition: COFFObjectFile.cpp:1776
llvm::object::COFFObjectFile::moveRelocationNext
void moveRelocationNext(DataRefImpl &Rel) const override
Definition: COFFObjectFile.cpp:1153
llvm::object::COFFObjectFile::getSectionContents
Expected< ArrayRef< uint8_t > > getSectionContents(DataRefImpl Sec) const override
llvm::object::ImportDirectoryEntryRef::getImportLookupTableRVA
Error getImportLookupTableRVA(uint32_t &Result) const
Definition: COFFObjectFile.cpp:1424
llvm::object::coff_bigobj_file_header::Version
support::ulittle16_t Version
Definition: COFF.h:90
llvm::object::coff_load_configuration32::GuardEHContinuationTable
support::ulittle32_t GuardEHContinuationTable
Definition: COFF.h:670
llvm::object::dos_header::InitialRelativeSS
support::ulittle16_t InitialRelativeSS
Definition: COFF.h:61
llvm::object::COFFObjectFile::base_reloc_begin
base_reloc_iterator base_reloc_begin() const
Definition: COFFObjectFile.cpp:936
llvm::object::pe32plus_header::CheckSum
support::ulittle32_t CheckSum
Definition: COFF.h:161
llvm::object::FpoData::Attributes
support::ulittle16_t Attributes
Definition: COFF.h:1281
llvm::object::coff_load_configuration32::GuardLongJumpTargetCount
support::ulittle32_t GuardLongJumpTargetCount
Definition: COFF.h:655
llvm::object::coff_load_configuration64::GuardRFFailureRoutineFunctionPointer
support::ulittle64_t GuardRFFailureRoutineFunctionPointer
Definition: COFF.h:717
llvm::object::coff_load_configuration32::CSDVersion
support::ulittle16_t CSDVersion
Definition: COFF.h:636
llvm::object::Binary::isCOFF
bool isCOFF() const
Definition: Binary.h:128
llvm::object::coff_bigobj_file_header
Definition: COFF.h:87
llvm::object::ImportDirectoryEntryRef::imported_symbols
iterator_range< imported_symbol_iterator > imported_symbols() const
Definition: COFFObjectFile.cpp:1396
llvm::object::pe32plus_header::MinorImageVersion
support::ulittle16_t MinorImageVersion
Definition: COFF.h:155
llvm::ArrayRef< uint8_t >
llvm::object::dos_header::Checksum
support::ulittle16_t Checksum
Definition: COFF.h:63
llvm::object::coff_relocation::VirtualAddress
support::ulittle32_t VirtualAddress
Definition: COFF.h:475
llvm::object::COFFSymbolRef::getValue
uint32_t getValue() const
Definition: COFF.h:317
llvm::object::coff_aux_section_definition::NumberOfLinenumbers
support::ulittle16_t NumberOfLinenumbers
Definition: COFF.h:514
llvm::object::COFFSymbolRef::getStorageClass
uint8_t getStorageClass() const
Definition: COFF.h:338
llvm::object::COFFSymbolRef::isCommon
bool isCommon() const
Definition: COFF.h:381
llvm::object::coff_aux_bf_and_ef_symbol
Definition: COFF.h:491
llvm::object::COFFObjectFile::getSymbolAuxData
ArrayRef< uint8_t > getSymbolAuxData(COFFSymbolRef Symbol) const
Definition: COFFObjectFile.cpp:1055
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:58
llvm::object::coff_load_configuration64::GuardXFGTableDispatchFunctionPointer
support::ulittle64_t GuardXFGTableDispatchFunctionPointer
Definition: COFF.h:732
llvm::object::COFFObjectFile::isDebugSection
bool isDebugSection(DataRefImpl Sec) const override
Definition: COFFObjectFile.cpp:331
llvm::object::ObjectFile
This class is the base class for all object file types.
Definition: ObjectFile.h:228
llvm::object::coff_resource_dir_table::NumberOfIDEntries
support::ulittle16_t NumberOfIDEntries
Definition: COFF.h:790
llvm::object::Binary
Definition: Binary.h:32
llvm::object::debug_h_header::HashAlgorithm
support::ulittle16_t HashAlgorithm
Definition: COFF.h:796
llvm::object::COFFObjectFile::getDebugPDBInfo
Error getDebugPDBInfo(const debug_directory *DebugDir, const codeview::DebugInfo *&Info, StringRef &PDBFileName) const
Get PDB information out of a codeview debug directory entry.
llvm::object::coff_load_configuration64::GuardCFCheckFunction
support::ulittle64_t GuardCFCheckFunction
Definition: COFF.h:702
llvm_unreachable
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Definition: ErrorHandling.h:136
llvm::object::COFFObjectFile::getSectionIndex
uint64_t getSectionIndex(DataRefImpl Sec) const override
Definition: COFFObjectFile.cpp:285
llvm::object::coff_load_configuration64::Reserved3
support::ulittle32_t Reserved3
Definition: COFF.h:725
llvm::object::COFFObjectFile::getCOFFSection
const coff_section * getCOFFSection(const SectionRef &Section) const
Definition: COFFObjectFile.cpp:1183
llvm::object::coff_load_configuration64::VirtualMemoryThreshold
support::ulittle64_t VirtualMemoryThreshold
Definition: COFF.h:691
llvm::object::COFFObjectFile::isSectionText
bool isSectionText(DataRefImpl Sec) const override
Definition: COFFObjectFile.cpp:311
Number
uint32_t Number
Definition: Profile.cpp:47
uint32_t
llvm::object::coff_load_configuration64::GuardXFGDispatchFunctionPointer
support::ulittle64_t GuardXFGDispatchFunctionPointer
Definition: COFF.h:731
llvm::object::DelayImportDirectoryEntryRef::DelayImportDirectoryEntryRef
DelayImportDirectoryEntryRef()=default
llvm::object::pe32plus_header::MajorSubsystemVersion
support::ulittle16_t MajorSubsystemVersion
Definition: COFF.h:156
llvm::object::coff_section::SizeOfRawData
support::ulittle32_t SizeOfRawData
Definition: COFF.h:444
llvm::object::debug_directory
Definition: COFF.h:177
S
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
Definition: README.txt:210
llvm::object::COFFObjectFile::getDOSHeader
const dos_header * getDOSHeader() const
Definition: COFF.h:1023
llvm::object::DataRefImpl
Definition: SymbolicFile.h:33
llvm::object::ImportedSymbolRef::operator==
bool operator==(const ImportedSymbolRef &Other) const
Definition: COFFObjectFile.cpp:1587
llvm::object::COFFObjectFile::getPE32PlusHeader
const pe32plus_header * getPE32PlusHeader() const
Definition: COFF.h:1034
llvm::object::coff_import_directory_table_entry::TimeDateStamp
support::ulittle32_t TimeDateStamp
Definition: COFF.h:557
llvm::object::COFFObjectFile::getSection
Expected< const coff_section * > getSection(int32_t index) const
Definition: COFFObjectFile.cpp:1015
llvm::object::COFFSymbolRef::COFFSymbolRef
COFFSymbolRef(const coff_symbol16 *CS)
Definition: COFF.h:283
llvm::object::coff_runtime_function_x64::EndAddress
support::ulittle32_t EndAddress
Definition: COFF.h:738
llvm::object::COFFSymbolRef::isAbsolute
bool isAbsolute() const
Definition: COFF.h:373
llvm::codeview::DebugInfo
Definition: CVDebugRecord.h:45
llvm::object::coff_file_header::PointerToSymbolTable
support::ulittle32_t PointerToSymbolTable
Definition: COFF.h:79
ConvertUTF.h
llvm::object::DelayImportDirectoryEntryRef::operator==
bool operator==(const DelayImportDirectoryEntryRef &Other) const
Definition: COFFObjectFile.cpp:1436
llvm::object::coff_tls_directory::StartAddressOfRawData
IntTy StartAddressOfRawData
Definition: COFF.h:570
llvm::object::pe32_header::MajorOperatingSystemVersion
support::ulittle16_t MajorOperatingSystemVersion
Definition: COFF.h:117
llvm::object::frame_type::NonFpo
@ NonFpo
llvm::object::coff_relocation::Type
support::ulittle16_t Type
Definition: COFF.h:477
llvm::object::coff_load_configuration64::GlobalFlagsClear
support::ulittle32_t GlobalFlagsClear
Definition: COFF.h:684
llvm::object::COFFSymbolRef::getRawPtr
const void * getRawPtr() const
Definition: COFF.h:286
llvm::object::coff_import_directory_table_entry
Definition: COFF.h:555
llvm::object::COFFSymbolRef::operator<
friend bool operator<(COFFSymbolRef A, COFFSymbolRef B)
Definition: COFF.h:296
llvm::object::coff_load_configuration32::Reserved3
support::ulittle32_t Reserved3
Definition: COFF.h:667
llvm::object::coff_aux_clr_token
Definition: COFF.h:531
llvm::object::COFFObjectFile::isRelocatableObject
bool isRelocatableObject() const override
True if this is a relocatable object (.o/.obj).
Definition: COFFObjectFile.cpp:1317
llvm::object::coff_relocation::SymbolTableIndex
support::ulittle32_t SymbolTableIndex
Definition: COFF.h:476
llvm::object::dos_header::Reserved
support::ulittle16_t Reserved[4]
Definition: COFF.h:68
llvm::object::coff_guard_flags::HasFidTable
@ HasFidTable
llvm::object::ExportDirectoryEntryRef::getOrdinal
Error getOrdinal(uint32_t &Result) const
Definition: COFFObjectFile.cpp:1515
llvm::object::coff_symbol32
coff_symbol< support::ulittle32_t > coff_symbol32
Definition: COFF.h:266
llvm::object::pe32_header::Magic
support::ulittle16_t Magic
Definition: COFF.h:105
llvm::object::ImportDirectoryEntryRef::getImportTableEntry
Error getImportTableEntry(const coff_import_directory_table_entry *&Result) const
Definition: COFFObjectFile.cpp:1340
llvm::object::coff_load_configuration64::CSDVersion
support::ulittle16_t CSDVersion
Definition: COFF.h:694
llvm::GraphProgram::Name
Name
Definition: GraphWriter.h:52
llvm::object::pe32_header::BaseOfData
support::ulittle32_t BaseOfData
Definition: COFF.h:113
llvm::object::coff_aux_function_definition::TotalSize
support::ulittle32_t TotalSize
Definition: COFF.h:482
llvm::object::coff_import_header::OrdinalHint
support::ulittle16_t OrdinalHint
Definition: COFF.h:548
llvm::object::ImportDirectoryEntryRef::ImportDirectoryEntryRef
ImportDirectoryEntryRef(const coff_import_directory_table_entry *Table, uint32_t I, const COFFObjectFile *Owner)
Definition: COFF.h:1117
llvm::object::pe32_header::SizeOfStackCommit
support::ulittle32_t SizeOfStackCommit
Definition: COFF.h:131
llvm::object::COFFObjectFile::getRelocationSymbol
symbol_iterator getRelocationSymbol(DataRefImpl Rel) const override
Definition: COFFObjectFile.cpp:1163
llvm::COFF::MaxNumberOfSections16
const int32_t MaxNumberOfSections16
Definition: COFF.h:33
llvm::object::coff_load_configuration32::GuardXFGTableDispatchFunctionPointer
support::ulittle32_t GuardXFGTableDispatchFunctionPointer
Definition: COFF.h:674
llvm::object::coff_resource_dir_table::MinorVersion
support::ulittle16_t MinorVersion
Definition: COFF.h:788
llvm::object::export_address_table_entry::ForwarderRVA
support::ulittle32_t ForwarderRVA
Definition: COFF.h:238
uint16_t
llvm::object::coff_load_configuration32::GuardLongJumpTargetTable
support::ulittle32_t GuardLongJumpTargetTable
Definition: COFF.h:654
llvm::object::COFFObjectFile::delay_import_directory_end
delay_import_directory_iterator delay_import_directory_end() const
Definition: COFFObjectFile.cpp:903
llvm::object::COFFObjectFile::symbol_begin
basic_symbol_iterator symbol_begin() const override
Definition: COFFObjectFile.cpp:869
llvm::object::coff_resource_dir_entry::Offset
union llvm::object::coff_resource_dir_entry::@311 Offset
llvm::object::coff_load_configuration64::GuardLongJumpTargetCount
support::ulittle64_t GuardLongJumpTargetCount
Definition: COFF.h:713
llvm::object::COFFObjectFile::isSectionBSS
bool isSectionBSS(DataRefImpl Sec) const override
Definition: COFFObjectFile.cpp:321
llvm::Error
Lightweight error class with error context and mandatory checking.
Definition: Error.h:157
llvm::object::coff_aux_section_definition::NumberLowPart
support::ulittle16_t NumberLowPart
Definition: COFF.h:516
llvm::object::coff_section
Definition: COFF.h:440
llvm::object::coff_aux_section_definition::Selection
uint8_t Selection
Definition: COFF.h:517
llvm::object::coff_symbol::StorageClass
uint8_t StorageClass
Definition: COFF.h:261
llvm::object::coff_bigobj_file_header::PointerToSymbolTable
support::ulittle32_t PointerToSymbolTable
Definition: COFF.h:99
llvm::object::ImportDirectoryEntryRef
Definition: COFF.h:1114
llvm::object::pe32plus_header::Subsystem
support::ulittle16_t Subsystem
Definition: COFF.h:162
llvm::object::coff_load_configuration32::TimeDateStamp
support::ulittle32_t TimeDateStamp
Definition: COFF.h:623
llvm::object::COFFObjectFile::getTLSDirectory32
const coff_tls_directory32 * getTLSDirectory32() const
Definition: COFF.h:1016
llvm::object::DelayImportDirectoryEntryRef::getImportAddress
Error getImportAddress(int AddrIndex, uint64_t &Result) const
Definition: COFFObjectFile.cpp:1475
llvm::object::COFFObjectFile::debug_directory_end
const debug_directory * debug_directory_end() const
Definition: COFF.h:1003
llvm::object::COFFObjectFile::isSectionCompressed
bool isSectionCompressed(DataRefImpl Sec) const override
Definition: COFFObjectFile.cpp:307
llvm::object::pe32_header::Win32VersionValue
support::ulittle32_t Win32VersionValue
Definition: COFF.h:123
llvm::object::coff_aux_bf_and_ef_symbol::Linenumber
support::ulittle16_t Linenumber
Definition: COFF.h:493
llvm::object::pe32_header::MinorImageVersion
support::ulittle16_t MinorImageVersion
Definition: COFF.h:120
llvm::object::delay_import_directory_table_entry
Definition: COFF.h:210
llvm::object::coff_load_configuration32::GuardAddressTakenIatEntryCount
support::ulittle32_t GuardAddressTakenIatEntryCount
Definition: COFF.h:653
llvm::object::COFFObjectFile::getSymbolValueImpl
uint64_t getSymbolValueImpl(DataRefImpl Symb) const override
Definition: COFFObjectFile.cpp:155
llvm::object::DelayImportDirectoryEntryRef::imported_symbols
iterator_range< imported_symbol_iterator > imported_symbols() const
Definition: COFFObjectFile.cpp:1457
llvm::object::COFFObjectFile::getRvaAndSizeAsBytes
Error getRvaAndSizeAsBytes(uint32_t RVA, uint32_t Size, ArrayRef< uint8_t > &Contents) const
Given an RVA base and size, returns a valid array of bytes or an error code if the RVA and size is no...
Definition: COFFObjectFile.cpp:487
llvm::object::COFFObjectFile
Definition: COFF.h:799
llvm::object::ResourceSectionRef
Definition: COFF.h:1239
llvm::object::coff_load_configuration64::DeCommitTotalFreeThreshold
support::ulittle64_t DeCommitTotalFreeThreshold
Definition: COFF.h:688
llvm::object::BaseRelocRef::moveNext
void moveNext()
Definition: COFFObjectFile.cpp:1663
llvm::object::coff_resource_dir_table::NumberOfNameEntries
support::ulittle16_t NumberOfNameEntries
Definition: COFF.h:789
llvm::object::export_directory_table_entry::MajorVersion
support::ulittle16_t MajorVersion
Definition: COFF.h:225
llvm::COFF::IMAGE_SYM_CLASS_SECTION
@ IMAGE_SYM_CLASS_SECTION
Line number, reformatted as symbol.
Definition: COFF.h:233
llvm::object::pe32_header
The 32-bit PE header that follows the COFF header.
Definition: COFF.h:104
llvm::object::coff_runtime_function_x64::BeginAddress
support::ulittle32_t BeginAddress
Definition: COFF.h:737
llvm::object::coff_aux_section_definition::getNumber
int32_t getNumber(bool IsBigObj) const
Definition: COFF.h:520
llvm::object::coff_resource_dir_table::MajorVersion
support::ulittle16_t MajorVersion
Definition: COFF.h:787
llvm::object::coff_load_configuration32::GuardRFVerifyStackPointerFunctionPointer
support::ulittle32_t GuardRFVerifyStackPointerFunctionPointer
Definition: COFF.h:663
llvm::object::coff_file_header::Characteristics
support::ulittle16_t Characteristics
Definition: COFF.h:82
llvm::object::coff_tls_directory::EndAddressOfRawData
IntTy EndAddressOfRawData
Definition: COFF.h:571
llvm::object::coff_load_config_code_integrity::Reserved
support::ulittle32_t Reserved
Definition: COFF.h:617
llvm::object::coff_base_reloc_block_header::PageRVA
support::ulittle32_t PageRVA
Definition: COFF.h:743
llvm::object::coff_load_configuration64::CHPEMetadataPointer
support::ulittle64_t CHPEMetadataPointer
Definition: COFF.h:715
llvm::ARMBuildAttrs::Symbol
@ Symbol
Definition: ARMBuildAttributes.h:79
llvm::object::ResourceSectionRef::ResourceSectionRef
ResourceSectionRef(StringRef Ref)
Definition: COFF.h:1242
llvm::object::ExportDirectoryEntryRef::moveNext
void moveNext()
Definition: COFFObjectFile.cpp:1494
llvm::object::coff_load_configuration32::GlobalFlagsClear
support::ulittle32_t GlobalFlagsClear
Definition: COFF.h:626
llvm::object::COFFObjectFile::getSymbolType
Expected< SymbolRef::Type > getSymbolType(DataRefImpl Symb) const override
Definition: COFFObjectFile.cpp:187
llvm::object::FpoData::NumParams
support::ulittle16_t NumParams
Definition: COFF.h:1280
llvm::object::COFFObjectFile::delay_import_directories
iterator_range< delay_import_directory_iterator > delay_import_directories() const
Definition: COFFObjectFile.cpp:990
Binary.h
llvm::object::coff_load_configuration64::GuardCFFunctionTable
support::ulittle64_t GuardCFFunctionTable
Definition: COFF.h:704
llvm::object::coff_aux_function_definition::PointerToLinenumber
support::ulittle32_t PointerToLinenumber
Definition: COFF.h:483
llvm::object::COFFObjectFile::delay_import_directory_begin
delay_import_directory_iterator delay_import_directory_begin() const
Definition: COFFObjectFile.cpp:897
llvm::object::coff_import_header::Version
support::ulittle16_t Version
Definition: COFF.h:544
llvm::object::pe32plus_header::SectionAlignment
support::ulittle32_t SectionAlignment
Definition: COFF.h:150
llvm::object::COFFObjectFile::getCOFFHeader
const coff_file_header * getCOFFHeader() const
Definition: COFF.h:1029
llvm::object::DelayImportDirectoryEntryRef::moveNext
void moveNext()
Definition: COFFObjectFile.cpp:1440
llvm::object::coff_load_configuration64::VolatileMetadataPointer
support::ulittle64_t VolatileMetadataPointer
Definition: COFF.h:727
llvm::COFF::isReservedSectionNumber
bool isReservedSectionNumber(int32_t SectionNumber)
Definition: COFF.h:730
llvm::object::DelayImportDirectoryEntryRef::imported_symbol_end
imported_symbol_iterator imported_symbol_end() const
Definition: COFFObjectFile.cpp:1451
llvm::object::coff_load_configuration64::HotPatchTableOffset
support::ulittle32_t HotPatchTableOffset
Definition: COFF.h:722
llvm::object::coff_resource_dir_table::Characteristics
support::ulittle32_t Characteristics
Definition: COFF.h:785
llvm::object::coff_load_configuration32::CHPEMetadataPointer
support::ulittle32_t CHPEMetadataPointer
Definition: COFF.h:657
llvm::object::FpoData::getNumSavedRegs
int getNumSavedRegs() const
Definition: COFF.h:1287
llvm::object::ExportDirectoryEntryRef::getDllName
Error getDllName(StringRef &Result) const
Definition: COFFObjectFile.cpp:1500
llvm::object::COFFObjectFile::import_directory_begin
import_directory_iterator import_directory_begin() const
Definition: COFFObjectFile.cpp:882
llvm::object::COFFSymbolRef::isSection
bool isSection() const
Definition: COFF.h:413
llvm::object::ImportDirectoryEntryRef::operator==
bool operator==(const ImportDirectoryEntryRef &Other) const
Definition: COFFObjectFile.cpp:1328
llvm::object::coff_resource_dir_table
Definition: COFF.h:784
llvm::object::COFFObjectFile::symbol_end
basic_symbol_iterator symbol_end() const override
Definition: COFFObjectFile.cpp:875
support
Reimplement select in terms of SEL *We would really like to support but we need to prove that the add doesn t need to overflow between the two bit chunks *Implement pre post increment support(e.g. PR935) *Implement smarter const ant generation for binops with large immediates. A few ARMv6T2 ops should be pattern matched
Definition: README.txt:10
llvm::iterator_range
A range adaptor for a pair of iterators.
Definition: iterator_range.h:30
llvm::object::coff_file_header::SizeOfOptionalHeader
support::ulittle16_t SizeOfOptionalHeader
Definition: COFF.h:81
llvm::object::dos_header::FileSizeInPages
support::ulittle16_t FileSizeInPages
Definition: COFF.h:56
llvm::object::coff_bigobj_file_header::Sig2
support::ulittle16_t Sig2
Definition: COFF.h:89
llvm::object::debug_directory::AddressOfRawData
support::ulittle32_t AddressOfRawData
Definition: COFF.h:184
llvm::object::dos_header::MinimumExtraParagraphs
support::ulittle16_t MinimumExtraParagraphs
Definition: COFF.h:59
llvm::object::coff_tls_directory::AddressOfIndex
IntTy AddressOfIndex
Definition: COFF.h:572
llvm::SmallVectorImpl< char >
llvm::object::coff_resource_data_entry::Reserved
support::ulittle32_t Reserved
Definition: COFF.h:781
llvm::object::COFFObjectFile::is64
bool is64() const
Definition: COFF.h:1106
llvm::object::SymbolRef
This is a value type class that represents a single symbol in the list of symbols in the object file.
Definition: ObjectFile.h:167
llvm::object::coff_load_configuration32::Size
support::ulittle32_t Size
Definition: COFF.h:622
llvm::object::data_directory::Size
support::ulittle32_t Size
Definition: COFF.h:174
llvm::object::coff_symbol_generic::Name
union llvm::object::coff_symbol_generic::@309 Name
llvm::COFF::IMAGE_SCN_ALIGN_MASK
@ IMAGE_SCN_ALIGN_MASK
Definition: COFF.h:314
llvm::object::pe32_header::DLLCharacteristics
support::ulittle16_t DLLCharacteristics
Definition: COFF.h:129
llvm::object::DelayImportDirectoryEntryRef
Definition: COFF.h:1145
llvm::object::coff_import_header
Definition: COFF.h:541
llvm::object::coff_bigobj_file_header::Machine
support::ulittle16_t Machine
Definition: COFF.h:91
llvm::object::coff_load_configuration32::DeCommitFreeBlockThreshold
support::ulittle32_t DeCommitFreeBlockThreshold
Definition: COFF.h:629
llvm::object::frame_type::Trap
@ Trap
llvm::object::ImportDirectoryEntryRef::moveNext
void moveNext()
Definition: COFFObjectFile.cpp:1332
llvm::object::coff_aux_bf_and_ef_symbol::PointerToNextFunction
support::ulittle32_t PointerToNextFunction
Definition: COFF.h:495
llvm::object::coff_load_configuration32::DynamicValueRelocTable
support::ulittle32_t DynamicValueRelocTable
Definition: COFF.h:656
llvm::object::coff_section::PointerToLinenumbers
support::ulittle32_t PointerToLinenumbers
Definition: COFF.h:447
llvm::object::export_directory_table_entry::ExportFlags
support::ulittle32_t ExportFlags
Definition: COFF.h:223
llvm::object::delay_import_directory_table_entry::Name
support::ulittle32_t Name
Definition: COFF.h:213
llvm::object::RelocationRef
This is a value type class that represents a single relocation in the list of relocations in the obje...
Definition: ObjectFile.h:51
llvm::object::COFFObjectFile::getRelocationTypeName
StringRef getRelocationTypeName(uint16_t Type) const
Definition: COFFObjectFile.cpp:1214
llvm::object::pe32_header::SizeOfStackReserve
support::ulittle32_t SizeOfStackReserve
Definition: COFF.h:130
llvm::object::COFFObjectFile::import_directory_end
import_directory_iterator import_directory_end() const
Definition: COFFObjectFile.cpp:891
llvm::object::delay_import_directory_table_entry::ModuleHandle
support::ulittle32_t ModuleHandle
Definition: COFF.h:214
llvm::object::COFFSymbolRef::getComplexType
uint8_t getComplexType() const
Definition: COFF.h:350
llvm::object::coff_load_configuration32::GuardCFFunctionTable
support::ulittle32_t GuardCFFunctionTable
Definition: COFF.h:646
llvm::object::coff_resource_dir_entry::ID
support::ulittle32_t ID
Definition: COFF.h:757
llvm::object::coff_symbol::Type
support::ulittle16_t Type
Definition: COFF.h:259
llvm::COFF::IMAGE_SYM_DTYPE_FUNCTION
@ IMAGE_SYM_DTYPE_FUNCTION
A function that returns a base type.
Definition: COFF.h:261
Endian.h
llvm::object::coff_aux_bf_and_ef_symbol::Unused3
char Unused3[2]
Definition: COFF.h:496
llvm::object::pe32_header::SectionAlignment
support::ulittle32_t SectionAlignment
Definition: COFF.h:115
llvm::object::COFFObjectFile::getSymbolName
Expected< StringRef > getSymbolName(DataRefImpl Symb) const override
llvm::object::pe32_header::FileAlignment
support::ulittle32_t FileAlignment
Definition: COFF.h:116
llvm::object::pe32plus_header::SizeOfHeaders
support::ulittle32_t SizeOfHeaders
Definition: COFF.h:160
llvm::object::COFFObjectFile::export_directories
iterator_range< export_directory_iterator > export_directories() const
Definition: COFFObjectFile.cpp:996
llvm::object::coff_load_configuration32::DependentLoadFlags
support::ulittle16_t DependentLoadFlags
Definition: COFF.h:637
llvm::object::coff_bigobj_file_header::unused2
support::ulittle32_t unused2
Definition: COFF.h:95
llvm::object::debug_directory::MajorVersion
support::ulittle16_t MajorVersion
Definition: COFF.h:180
llvm::object::COFFSymbolRef::isFunctionLineInfo
bool isFunctionLineInfo() const
Definition: COFF.h:401
llvm::object::coff_load_configuration32::SEHandlerTable
support::ulittle32_t SEHandlerTable
Definition: COFF.h:640
llvm::object::debug_h_header::Version
support::ulittle16_t Version
Definition: COFF.h:795
llvm::object::COFFObjectFile::getSectionName
Expected< StringRef > getSectionName(DataRefImpl Sec) const override
llvm::object::dos_header::HeaderSizeInParagraphs
support::ulittle16_t HeaderSizeInParagraphs
Definition: COFF.h:58
llvm::object::coff_runtime_function_x64
Definition: COFF.h:736
llvm::object::coff_load_configuration32::EditList
support::ulittle32_t EditList
Definition: COFF.h:638
llvm::object::ImportDirectoryEntryRef::lookup_table_end
imported_symbol_iterator lookup_table_end() const
Definition: COFFObjectFile.cpp:1405
llvm::object::COFFObjectFile::getRawNumberOfSymbols
uint32_t getRawNumberOfSymbols() const
Definition: COFF.h:912
llvm::object::coff_load_configuration32::HotPatchTableOffset
support::ulittle32_t HotPatchTableOffset
Definition: COFF.h:664
llvm::object::FpoData
Definition: COFF.h:1276
llvm::object::coff_load_configuration64::GuardRFVerifyStackPointerFunctionPointer
support::ulittle64_t GuardRFVerifyStackPointerFunctionPointer
Definition: COFF.h:721
llvm::object::coff_section::NumberOfRelocations
support::ulittle16_t NumberOfRelocations
Definition: COFF.h:448
llvm::object::coff_import_directory_table_entry::ImportLookupTableRVA
support::ulittle32_t ImportLookupTableRVA
Definition: COFF.h:556
llvm::object::dos_header::InitialIP
support::ulittle16_t InitialIP
Definition: COFF.h:64
llvm::object::pe32plus_header::SizeOfImage
support::ulittle32_t SizeOfImage
Definition: COFF.h:159
llvm::object::coff_resource_data_entry::DataSize
support::ulittle32_t DataSize
Definition: COFF.h:779
llvm::object::coff_import_directory_table_entry::ForwarderChain
support::ulittle32_t ForwarderChain
Definition: COFF.h:558
llvm::object::coff_load_configuration64::SEHandlerTable
support::ulittle64_t SEHandlerTable
Definition: COFF.h:698
llvm::object::coff_load_configuration64::DynamicValueRelocTable
support::ulittle64_t DynamicValueRelocTable
Definition: COFF.h:714