LLVM  7.0.0svn
ObjectFile.h
Go to the documentation of this file.
1 //===- ObjectFile.h - File format independent object file -------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file declares a file format independent ObjectFile class.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_OBJECT_OBJECTFILE_H
15 #define LLVM_OBJECT_OBJECTFILE_H
16 
17 #include "llvm/ADT/StringRef.h"
18 #include "llvm/ADT/Triple.h"
22 #include "llvm/Object/Binary.h"
23 #include "llvm/Object/Error.h"
25 #include "llvm/Support/Casting.h"
26 #include "llvm/Support/Error.h"
29 #include <cassert>
30 #include <cstdint>
31 #include <memory>
32 #include <system_error>
33 
34 namespace llvm {
35 
36 class ARMAttributeParser;
37 
38 namespace object {
39 
40 class COFFObjectFile;
41 class MachOObjectFile;
42 class ObjectFile;
43 class SectionRef;
44 class SymbolRef;
45 class symbol_iterator;
46 class WasmObjectFile;
47 
49 
50 /// This is a value type class that represents a single relocation in the list
51 /// of relocations in the object file.
53  DataRefImpl RelocationPimpl;
54  const ObjectFile *OwningObject = nullptr;
55 
56 public:
57  RelocationRef() = default;
58  RelocationRef(DataRefImpl RelocationP, const ObjectFile *Owner);
59 
60  bool operator==(const RelocationRef &Other) const;
61 
62  void moveNext();
63 
64  uint64_t getOffset() const;
65  symbol_iterator getSymbol() const;
66  uint64_t getType() const;
67 
68  /// @brief Get a string that represents the type of this relocation.
69  ///
70  /// This is for display purposes only.
71  void getTypeName(SmallVectorImpl<char> &Result) const;
72 
74  const ObjectFile *getObject() const;
75 };
76 
78 
79 /// This is a value type class that represents a single section in the list of
80 /// sections in the object file.
81 class SectionRef {
82  friend class SymbolRef;
83 
84  DataRefImpl SectionPimpl;
85  const ObjectFile *OwningObject = nullptr;
86 
87 public:
88  SectionRef() = default;
89  SectionRef(DataRefImpl SectionP, const ObjectFile *Owner);
90 
91  bool operator==(const SectionRef &Other) const;
92  bool operator!=(const SectionRef &Other) const;
93  bool operator<(const SectionRef &Other) const;
94 
95  void moveNext();
96 
97  std::error_code getName(StringRef &Result) const;
98  uint64_t getAddress() const;
99  uint64_t getIndex() const;
100  uint64_t getSize() const;
101  std::error_code getContents(StringRef &Result) const;
102 
103  /// @brief Get the alignment of this section as the actual value (not log 2).
104  uint64_t getAlignment() const;
105 
106  bool isCompressed() const;
107  bool isText() const;
108  bool isData() const;
109  bool isBSS() const;
110  bool isVirtual() const;
111  bool isBitcode() const;
112  bool isStripped() const;
113 
114  bool containsSymbol(SymbolRef S) const;
115 
116  relocation_iterator relocation_begin() const;
117  relocation_iterator relocation_end() const;
119  return make_range(relocation_begin(), relocation_end());
120  }
121  section_iterator getRelocatedSection() const;
122 
124  const ObjectFile *getObject() const;
125 };
126 
127 /// This is a value type class that represents a single symbol in the list of
128 /// symbols in the object file.
129 class SymbolRef : public BasicSymbolRef {
130  friend class SectionRef;
131 
132 public:
133  enum Type {
134  ST_Unknown, // Type not specified
139  ST_Other
140  };
141 
142  SymbolRef() = default;
143  SymbolRef(DataRefImpl SymbolP, const ObjectFile *Owner);
145  assert(isa<ObjectFile>(BasicSymbolRef::getObject()));
146  }
147 
149  /// Returns the symbol virtual address (i.e. address at which it will be
150  /// mapped).
151  Expected<uint64_t> getAddress() const;
152 
153  /// Return the value of the symbol depending on the object this can be an
154  /// offset or a virtual address.
155  uint64_t getValue() const;
156 
157  /// @brief Get the alignment of this symbol as the actual value (not log 2).
158  uint32_t getAlignment() const;
159  uint64_t getCommonSize() const;
161 
162  /// @brief Get section this symbol is defined in reference to. Result is
163  /// end_sections() if it is undefined or is an absolute symbol.
165 
166  const ObjectFile *getObject() const;
167 };
168 
170 public:
174  cast<ObjectFile>(B->getObject()))) {}
175 
176  const SymbolRef *operator->() const {
178  return static_cast<const SymbolRef*>(&P);
179  }
180 
181  const SymbolRef &operator*() const {
183  return static_cast<const SymbolRef&>(P);
184  }
185 };
186 
187 /// This class is the base class for all object file types. Concrete instances
188 /// of this object are created by createObjectFile, which figures out which type
189 /// to create.
190 class ObjectFile : public SymbolicFile {
191  virtual void anchor();
192 
193 protected:
194  ObjectFile(unsigned int Type, MemoryBufferRef Source);
195 
196  const uint8_t *base() const {
197  return reinterpret_cast<const uint8_t *>(Data.getBufferStart());
198  }
199 
200  // These functions are for SymbolRef to call internally. The main goal of
201  // this is to allow SymbolRef::SymbolPimpl to point directly to the symbol
202  // entry in the memory mapped object file. SymbolPimpl cannot contain any
203  // virtual functions because then it could not point into the memory mapped
204  // file.
205  //
206  // Implementations assume that the DataRefImpl is valid and has not been
207  // modified externally. It's UB otherwise.
208  friend class SymbolRef;
209 
210  virtual Expected<StringRef> getSymbolName(DataRefImpl Symb) const = 0;
211  std::error_code printSymbolName(raw_ostream &OS,
212  DataRefImpl Symb) const override;
213  virtual Expected<uint64_t> getSymbolAddress(DataRefImpl Symb) const = 0;
214  virtual uint64_t getSymbolValueImpl(DataRefImpl Symb) const = 0;
215  virtual uint32_t getSymbolAlignment(DataRefImpl Symb) const;
216  virtual uint64_t getCommonSymbolSizeImpl(DataRefImpl Symb) const = 0;
217  virtual Expected<SymbolRef::Type> getSymbolType(DataRefImpl Symb) const = 0;
219  getSymbolSection(DataRefImpl Symb) const = 0;
220 
221  // Same as above for SectionRef.
222  friend class SectionRef;
223 
224  virtual void moveSectionNext(DataRefImpl &Sec) const = 0;
225  virtual std::error_code getSectionName(DataRefImpl Sec,
226  StringRef &Res) const = 0;
227  virtual uint64_t getSectionAddress(DataRefImpl Sec) const = 0;
228  virtual uint64_t getSectionIndex(DataRefImpl Sec) const = 0;
229  virtual uint64_t getSectionSize(DataRefImpl Sec) const = 0;
230  virtual std::error_code getSectionContents(DataRefImpl Sec,
231  StringRef &Res) const = 0;
232  virtual uint64_t getSectionAlignment(DataRefImpl Sec) const = 0;
233  virtual bool isSectionCompressed(DataRefImpl Sec) const = 0;
234  virtual bool isSectionText(DataRefImpl Sec) const = 0;
235  virtual bool isSectionData(DataRefImpl Sec) const = 0;
236  virtual bool isSectionBSS(DataRefImpl Sec) const = 0;
237  // A section is 'virtual' if its contents aren't present in the object image.
238  virtual bool isSectionVirtual(DataRefImpl Sec) const = 0;
239  virtual bool isSectionBitcode(DataRefImpl Sec) const;
240  virtual bool isSectionStripped(DataRefImpl Sec) const;
241  virtual relocation_iterator section_rel_begin(DataRefImpl Sec) const = 0;
242  virtual relocation_iterator section_rel_end(DataRefImpl Sec) const = 0;
243  virtual section_iterator getRelocatedSection(DataRefImpl Sec) const;
244 
245  // Same as above for RelocationRef.
246  friend class RelocationRef;
247  virtual void moveRelocationNext(DataRefImpl &Rel) const = 0;
248  virtual uint64_t getRelocationOffset(DataRefImpl Rel) const = 0;
249  virtual symbol_iterator getRelocationSymbol(DataRefImpl Rel) const = 0;
250  virtual uint64_t getRelocationType(DataRefImpl Rel) const = 0;
251  virtual void getRelocationTypeName(DataRefImpl Rel,
252  SmallVectorImpl<char> &Result) const = 0;
253 
254  uint64_t getSymbolValue(DataRefImpl Symb) const;
255 
256 public:
257  ObjectFile() = delete;
258  ObjectFile(const ObjectFile &other) = delete;
259 
260  uint64_t getCommonSymbolSize(DataRefImpl Symb) const {
261  assert(getSymbolFlags(Symb) & SymbolRef::SF_Common);
262  return getCommonSymbolSizeImpl(Symb);
263  }
264 
267  return symbol_iterator_range(symbol_begin(), symbol_end());
268  }
269 
270  virtual section_iterator section_begin() const = 0;
271  virtual section_iterator section_end() const = 0;
272 
275  return section_iterator_range(section_begin(), section_end());
276  }
277 
278  /// @brief The number of bytes used to represent an address in this object
279  /// file format.
280  virtual uint8_t getBytesInAddress() const = 0;
281 
282  virtual StringRef getFileFormatName() const = 0;
283  virtual Triple::ArchType getArch() const = 0;
284  virtual SubtargetFeatures getFeatures() const = 0;
285  virtual void setARMSubArch(Triple &TheTriple) const { }
286 
287  /// @brief Create a triple from the data in this object file.
288  Triple makeTriple() const;
289 
290  virtual std::error_code
292  return std::error_code();
293  }
294 
295  /// Maps a debug section name to a standard DWARF section name.
296  virtual StringRef mapDebugSectionName(StringRef Name) const { return Name; }
297 
298  /// True if this is a relocatable object (.o/.obj).
299  virtual bool isRelocatableObject() const = 0;
300 
301  /// @returns Pointer to ObjectFile subclass to handle this type of object.
302  /// @param ObjectPath The path to the object file. ObjectPath.isObject must
303  /// return true.
304  /// @brief Create ObjectFile from path.
306  createObjectFile(StringRef ObjectPath);
307 
309  createObjectFile(MemoryBufferRef Object, llvm::file_magic Type);
312  return createObjectFile(Object, llvm::file_magic::unknown);
313  }
314 
315  static bool classof(const Binary *v) {
316  return v->isObject();
317  }
318 
320  createCOFFObjectFile(MemoryBufferRef Object);
321 
323  createELFObjectFile(MemoryBufferRef Object);
324 
326  createMachOObjectFile(MemoryBufferRef Object,
327  uint32_t UniversalCputype = 0,
328  uint32_t UniversalIndex = 0);
329 
331  createWasmObjectFile(MemoryBufferRef Object);
332 };
333 
334 // Inline function definitions.
335 inline SymbolRef::SymbolRef(DataRefImpl SymbolP, const ObjectFile *Owner)
336  : BasicSymbolRef(SymbolP, Owner) {}
337 
340 }
341 
344 }
345 
346 inline uint64_t SymbolRef::getValue() const {
348 }
349 
352 }
353 
354 inline uint64_t SymbolRef::getCommonSize() const {
356 }
357 
360 }
361 
364 }
365 
366 inline const ObjectFile *SymbolRef::getObject() const {
368  return cast<ObjectFile>(O);
369 }
370 
371 /// SectionRef
373  const ObjectFile *Owner)
374  : SectionPimpl(SectionP)
375  , OwningObject(Owner) {}
376 
377 inline bool SectionRef::operator==(const SectionRef &Other) const {
378  return SectionPimpl == Other.SectionPimpl;
379 }
380 
381 inline bool SectionRef::operator!=(const SectionRef &Other) const {
382  return SectionPimpl != Other.SectionPimpl;
383 }
384 
385 inline bool SectionRef::operator<(const SectionRef &Other) const {
386  return SectionPimpl < Other.SectionPimpl;
387 }
388 
389 inline void SectionRef::moveNext() {
390  return OwningObject->moveSectionNext(SectionPimpl);
391 }
392 
393 inline std::error_code SectionRef::getName(StringRef &Result) const {
394  return OwningObject->getSectionName(SectionPimpl, Result);
395 }
396 
397 inline uint64_t SectionRef::getAddress() const {
398  return OwningObject->getSectionAddress(SectionPimpl);
399 }
400 
401 inline uint64_t SectionRef::getIndex() const {
402  return OwningObject->getSectionIndex(SectionPimpl);
403 }
404 
405 inline uint64_t SectionRef::getSize() const {
406  return OwningObject->getSectionSize(SectionPimpl);
407 }
408 
409 inline std::error_code SectionRef::getContents(StringRef &Result) const {
410  return OwningObject->getSectionContents(SectionPimpl, Result);
411 }
412 
413 inline uint64_t SectionRef::getAlignment() const {
414  return OwningObject->getSectionAlignment(SectionPimpl);
415 }
416 
417 inline bool SectionRef::isCompressed() const {
418  return OwningObject->isSectionCompressed(SectionPimpl);
419 }
420 
421 inline bool SectionRef::isText() const {
422  return OwningObject->isSectionText(SectionPimpl);
423 }
424 
425 inline bool SectionRef::isData() const {
426  return OwningObject->isSectionData(SectionPimpl);
427 }
428 
429 inline bool SectionRef::isBSS() const {
430  return OwningObject->isSectionBSS(SectionPimpl);
431 }
432 
433 inline bool SectionRef::isVirtual() const {
434  return OwningObject->isSectionVirtual(SectionPimpl);
435 }
436 
437 inline bool SectionRef::isBitcode() const {
438  return OwningObject->isSectionBitcode(SectionPimpl);
439 }
440 
441 inline bool SectionRef::isStripped() const {
442  return OwningObject->isSectionStripped(SectionPimpl);
443 }
444 
446  return OwningObject->section_rel_begin(SectionPimpl);
447 }
448 
450  return OwningObject->section_rel_end(SectionPimpl);
451 }
452 
454  return OwningObject->getRelocatedSection(SectionPimpl);
455 }
456 
458  return SectionPimpl;
459 }
460 
461 inline const ObjectFile *SectionRef::getObject() const {
462  return OwningObject;
463 }
464 
465 /// RelocationRef
467  const ObjectFile *Owner)
468  : RelocationPimpl(RelocationP)
469  , OwningObject(Owner) {}
470 
471 inline bool RelocationRef::operator==(const RelocationRef &Other) const {
472  return RelocationPimpl == Other.RelocationPimpl;
473 }
474 
475 inline void RelocationRef::moveNext() {
476  return OwningObject->moveRelocationNext(RelocationPimpl);
477 }
478 
479 inline uint64_t RelocationRef::getOffset() const {
480  return OwningObject->getRelocationOffset(RelocationPimpl);
481 }
482 
484  return OwningObject->getRelocationSymbol(RelocationPimpl);
485 }
486 
487 inline uint64_t RelocationRef::getType() const {
488  return OwningObject->getRelocationType(RelocationPimpl);
489 }
490 
492  return OwningObject->getRelocationTypeName(RelocationPimpl, Result);
493 }
494 
496  return RelocationPimpl;
497 }
498 
499 inline const ObjectFile *RelocationRef::getObject() const {
500  return OwningObject;
501 }
502 
503 } // end namespace object
504 
505 } // end namespace llvm
506 
507 #endif // LLVM_OBJECT_OBJECTFILE_H
const content_type & operator*() const
Definition: SymbolicFile.h:79
static uint64_t getSymbolValue(const MCSymbol &Symbol, const MCAsmLayout &Layout)
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
Expected< StringRef > getName() const
Definition: ObjectFile.h:338
uint64_t getValue() const
Return the value of the symbol depending on the object this can be an offset or a virtual address...
Definition: ObjectFile.h:346
uint64_t getOffset() const
Definition: ObjectFile.h:479
bool operator!=(const SectionRef &Other) const
Definition: ObjectFile.h:381
bool isStripped() const
Definition: ObjectFile.h:441
This provides a very simple, boring adaptor for a begin and end iterator into a range type...
bool operator<(const DataRefImpl &a, const DataRefImpl &b)
Definition: SymbolicFile.h:63
virtual bool isSectionBSS(DataRefImpl Sec) const =0
This class is the base class for all object file types.
Definition: ObjectFile.h:190
bool operator==(const RelocationRef &Other) const
Definition: ObjectFile.h:471
virtual uint64_t getRelocationOffset(DataRefImpl Rel) const =0
const uint8_t * base() const
Definition: ObjectFile.h:196
virtual std::error_code getSectionName(DataRefImpl Sec, StringRef &Res) const =0
uint32_t getAlignment() const
Get the alignment of this symbol as the actual value (not log 2).
Definition: ObjectFile.h:350
const ObjectFile * getObject() const
Definition: ObjectFile.h:499
virtual uint32_t getSymbolAlignment(DataRefImpl Symb) const
Definition: ObjectFile.cpp:69
virtual Expected< StringRef > getSymbolName(DataRefImpl Symb) const =0
virtual bool isSectionStripped(DataRefImpl Sec) const
Definition: ObjectFile.cpp:78
relocation_iterator relocation_end() const
Definition: ObjectFile.h:449
virtual relocation_iterator section_rel_end(DataRefImpl Sec) const =0
void getTypeName(SmallVectorImpl< char > &Result) const
Get a string that represents the type of this relocation.
Definition: ObjectFile.h:491
virtual std::error_code getBuildAttributes(ARMAttributeParser &Attributes) const
Definition: ObjectFile.h:291
static uint32_t getAlignment(const MCSectionCOFF &Sec)
uint64_t getAddress() const
Definition: ObjectFile.h:397
DataRefImpl getRawDataRefImpl() const
Definition: SymbolicFile.h:205
virtual std::error_code getSectionContents(DataRefImpl Sec, StringRef &Res) const =0
This is a value type class that represents a single relocation in the list of relocations in the obje...
Definition: ObjectFile.h:52
bool operator==(const SectionRef &Other) const
Definition: ObjectFile.h:377
static StringRef getName(Value *V)
virtual uint64_t getSectionIndex(DataRefImpl Sec) const =0
Tagged union holding either a T or a Error.
Definition: CachePruning.h:23
bool operator!=(const DataRefImpl &a, const DataRefImpl &b)
Definition: SymbolicFile.h:59
bool isBitcode() const
Definition: ObjectFile.h:437
ELFYAML::ELF_STO Other
Definition: ELFYAML.cpp:767
Expected< const typename ELFT::Shdr * > getSection(typename ELFT::ShdrRange Sections, uint32_t Index)
Definition: ELF.h:257
virtual relocation_iterator section_rel_begin(DataRefImpl Sec) const =0
uint64_t getIndex() const
Definition: ObjectFile.h:401
bool isCompressed() const
Definition: ObjectFile.h:417
uint64_t getCommonSize() const
Definition: ObjectFile.h:354
const ObjectFile * getObject() const
Definition: ObjectFile.h:366
virtual uint64_t getSectionAlignment(DataRefImpl Sec) const =0
section_iterator_range sections() const
Definition: ObjectFile.h:274
virtual bool isSectionBitcode(DataRefImpl Sec) const
Definition: ObjectFile.cpp:71
const ObjectFile * getObject() const
Definition: ObjectFile.h:461
std::enable_if<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type cast(const Y &Val)
Definition: Casting.h:240
Expected< section_iterator > getSection() const
Get section this symbol is defined in reference to.
Definition: ObjectFile.h:358
virtual StringRef mapDebugSectionName(StringRef Name) const
Maps a debug section name to a standard DWARF section name.
Definition: ObjectFile.h:296
virtual Expected< SymbolRef::Type > getSymbolType(DataRefImpl Symb) const =0
#define P(N)
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
virtual void moveRelocationNext(DataRefImpl &Rel) const =0
The instances of the Type class are immutable: once they are created, they are never changed...
Definition: Type.h:46
bool isVirtual() const
Definition: ObjectFile.h:433
symbol_iterator(const basic_symbol_iterator &B)
Definition: ObjectFile.h:172
uint64_t getSize() const
Definition: ObjectFile.h:405
relocation_iterator relocation_begin() const
Definition: ObjectFile.h:445
static Expected< std::unique_ptr< ObjectFile > > createObjectFile(MemoryBufferRef Object)
Definition: ObjectFile.h:311
bool operator<(const SectionRef &Other) const
Definition: ObjectFile.h:385
section_iterator getRelocatedSection() const
Definition: ObjectFile.h:453
Expected< uint64_t > getAddress() const
Returns the symbol virtual address (i.e.
Definition: ObjectFile.h:342
DataRefImpl getRawDataRefImpl() const
Definition: ObjectFile.h:457
uint64_t getType() const
Definition: ObjectFile.h:487
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
SymbolRef(const BasicSymbolRef &B)
Definition: ObjectFile.h:144
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
virtual Expected< uint64_t > getSymbolAddress(DataRefImpl Symb) const =0
Expected< SymbolRef::Type > getType() const
Definition: ObjectFile.h:362
bool isBitcode(const unsigned char *BufPtr, const unsigned char *BufEnd)
isBitcode - Return true if the given bytes are the magic bytes for LLVM IR bitcode, either with or without a wrapper.
const SymbolicFile * getObject() const
Definition: SymbolicFile.h:209
std::error_code getName(StringRef &Result) const
Definition: ObjectFile.h:393
virtual void setARMSubArch(Triple &TheTriple) const
Definition: ObjectFile.h:285
const SymbolRef & operator*() const
Definition: ObjectFile.h:181
virtual uint64_t getSectionAddress(DataRefImpl Sec) const =0
uint64_t getSymbolValue(DataRefImpl Symb) const
Definition: ObjectFile.cpp:51
virtual symbol_iterator getRelocationSymbol(DataRefImpl Rel) const =0
std::error_code getContents(StringRef &Result) const
Definition: ObjectFile.h:409
bool isObject() const
Definition: Binary.h:95
A range adaptor for a pair of iterators.
Manages the enabling and disabling of subtarget specific features.
virtual bool isSectionText(DataRefImpl Sec) const =0
This is a value type class that represents a single symbol in the list of symbols in the object file...
Definition: ObjectFile.h:129
static std::unique_ptr< PDBSymbol > getSymbolType(const PDBSymbol &Symbol)
Definition: UDTLayout.cpp:34
static bool classof(const Binary *v)
Definition: ObjectFile.h:315
symbol_iterator getSymbol() const
Definition: ObjectFile.h:483
symbol_iterator_range symbols() const
Definition: ObjectFile.h:266
virtual void moveSectionNext(DataRefImpl &Sec) const =0
iterator_range< relocation_iterator > relocations() const
Definition: ObjectFile.h:118
virtual bool isSectionData(DataRefImpl Sec) const =0
uint64_t getCommonSymbolSize(DataRefImpl Symb) const
Definition: ObjectFile.h:260
This is a value type class that represents a single symbol in the list of symbols in the object file...
Definition: SymbolicFile.h:99
virtual section_iterator getRelocatedSection(DataRefImpl Sec) const
Definition: ObjectFile.cpp:80
uint64_t getAlignment() const
Get the alignment of this section as the actual value (not log 2).
Definition: ObjectFile.h:413
const SymbolRef * operator->() const
Definition: ObjectFile.h:176
virtual bool isSectionCompressed(DataRefImpl Sec) const =0
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
virtual Expected< section_iterator > getSymbolSection(DataRefImpl Symb) const =0
virtual bool isSectionVirtual(DataRefImpl Sec) const =0
virtual uint64_t getSectionSize(DataRefImpl Sec) const =0
virtual void getRelocationTypeName(DataRefImpl Rel, SmallVectorImpl< char > &Result) const =0
symbol_iterator(SymbolRef Sym)
Definition: ObjectFile.h:171
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition: raw_ostream.h:44
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49
static FeatureBitset getFeatures(StringRef CPU, StringRef FS, ArrayRef< SubtargetFeatureKV > ProcDesc, ArrayRef< SubtargetFeatureKV > ProcFeatures)
virtual uint64_t getRelocationType(DataRefImpl Rel) const =0
Unrecognized file.
Definition: Magic.h:23
DataRefImpl getRawDataRefImpl() const
Definition: ObjectFile.h:495
This is a value type class that represents a single section in the list of sections in the object fil...
Definition: ObjectFile.h:81
StringRef getSymbolName(CVSymbol Sym)
Definition: RecordName.cpp:313
file_magic - An "enum class" enumeration of file types based on magic (the first N bytes of the file)...
Definition: Magic.h:21