LLVM  5.0.0
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"
21 #include "llvm/Object/Binary.h"
22 #include "llvm/Object/Error.h"
24 #include "llvm/Support/Casting.h"
25 #include "llvm/Support/Error.h"
26 #include "llvm/Support/ErrorOr.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 
113  bool containsSymbol(SymbolRef S) const;
114 
119  }
121 
123  const ObjectFile *getObject() const;
124 };
125 
126 /// This is a value type class that represents a single symbol in the list of
127 /// symbols in the object file.
128 class SymbolRef : public BasicSymbolRef {
129  friend class SectionRef;
130 
131 public:
132  enum Type {
133  ST_Unknown, // Type not specified
139  };
140 
141  SymbolRef() = default;
142  SymbolRef(DataRefImpl SymbolP, const ObjectFile *Owner);
144  assert(isa<ObjectFile>(BasicSymbolRef::getObject()));
145  }
146 
148  /// Returns the symbol virtual address (i.e. address at which it will be
149  /// mapped).
151 
152  /// Return the value of the symbol depending on the object this can be an
153  /// offset or a virtual address.
154  uint64_t getValue() const;
155 
156  /// @brief Get the alignment of this symbol as the actual value (not log 2).
157  uint32_t getAlignment() const;
158  uint64_t getCommonSize() const;
160 
161  /// @brief Get section this symbol is defined in reference to. Result is
162  /// end_sections() if it is undefined or is an absolute symbol.
164 
165  const ObjectFile *getObject() const;
166 };
167 
169 public:
172  : basic_symbol_iterator(SymbolRef(B->getRawDataRefImpl(),
173  cast<ObjectFile>(B->getObject()))) {}
174 
175  const SymbolRef *operator->() const {
177  return static_cast<const SymbolRef*>(&P);
178  }
179 
180  const SymbolRef &operator*() const {
182  return static_cast<const SymbolRef&>(P);
183  }
184 };
185 
186 /// This class is the base class for all object file types. Concrete instances
187 /// of this object are created by createObjectFile, which figures out which type
188 /// to create.
189 class ObjectFile : public SymbolicFile {
190  virtual void anchor();
191 
192 protected:
193  ObjectFile(unsigned int Type, MemoryBufferRef Source);
194 
195  const uint8_t *base() const {
196  return reinterpret_cast<const uint8_t *>(Data.getBufferStart());
197  }
198 
199  // These functions are for SymbolRef to call internally. The main goal of
200  // this is to allow SymbolRef::SymbolPimpl to point directly to the symbol
201  // entry in the memory mapped object file. SymbolPimpl cannot contain any
202  // virtual functions because then it could not point into the memory mapped
203  // file.
204  //
205  // Implementations assume that the DataRefImpl is valid and has not been
206  // modified externally. It's UB otherwise.
207  friend class SymbolRef;
208 
209  virtual Expected<StringRef> getSymbolName(DataRefImpl Symb) const = 0;
210  std::error_code printSymbolName(raw_ostream &OS,
211  DataRefImpl Symb) const override;
212  virtual Expected<uint64_t> getSymbolAddress(DataRefImpl Symb) const = 0;
213  virtual uint64_t getSymbolValueImpl(DataRefImpl Symb) const = 0;
214  virtual uint32_t getSymbolAlignment(DataRefImpl Symb) const;
215  virtual uint64_t getCommonSymbolSizeImpl(DataRefImpl Symb) const = 0;
216  virtual Expected<SymbolRef::Type> getSymbolType(DataRefImpl Symb) const = 0;
218  getSymbolSection(DataRefImpl Symb) const = 0;
219 
220  // Same as above for SectionRef.
221  friend class SectionRef;
222 
223  virtual void moveSectionNext(DataRefImpl &Sec) const = 0;
224  virtual std::error_code getSectionName(DataRefImpl Sec,
225  StringRef &Res) const = 0;
226  virtual uint64_t getSectionAddress(DataRefImpl Sec) const = 0;
227  virtual uint64_t getSectionIndex(DataRefImpl Sec) const = 0;
228  virtual uint64_t getSectionSize(DataRefImpl Sec) const = 0;
229  virtual std::error_code getSectionContents(DataRefImpl Sec,
230  StringRef &Res) const = 0;
231  virtual uint64_t getSectionAlignment(DataRefImpl Sec) const = 0;
232  virtual bool isSectionCompressed(DataRefImpl Sec) const = 0;
233  virtual bool isSectionText(DataRefImpl Sec) const = 0;
234  virtual bool isSectionData(DataRefImpl Sec) const = 0;
235  virtual bool isSectionBSS(DataRefImpl Sec) const = 0;
236  // A section is 'virtual' if its contents aren't present in the object image.
237  virtual bool isSectionVirtual(DataRefImpl Sec) const = 0;
238  virtual bool isSectionBitcode(DataRefImpl Sec) const;
239  virtual relocation_iterator section_rel_begin(DataRefImpl Sec) const = 0;
240  virtual relocation_iterator section_rel_end(DataRefImpl Sec) const = 0;
242 
243  // Same as above for RelocationRef.
244  friend class RelocationRef;
245  virtual void moveRelocationNext(DataRefImpl &Rel) const = 0;
246  virtual uint64_t getRelocationOffset(DataRefImpl Rel) const = 0;
247  virtual symbol_iterator getRelocationSymbol(DataRefImpl Rel) const = 0;
248  virtual uint64_t getRelocationType(DataRefImpl Rel) const = 0;
249  virtual void getRelocationTypeName(DataRefImpl Rel,
250  SmallVectorImpl<char> &Result) const = 0;
251 
252  uint64_t getSymbolValue(DataRefImpl Symb) const;
253 
254 public:
255  ObjectFile() = delete;
256  ObjectFile(const ObjectFile &other) = delete;
257 
258  uint64_t getCommonSymbolSize(DataRefImpl Symb) const {
260  return getCommonSymbolSizeImpl(Symb);
261  }
262 
266  }
267 
268  virtual section_iterator section_begin() const = 0;
269  virtual section_iterator section_end() const = 0;
270 
274  }
275 
276  /// @brief The number of bytes used to represent an address in this object
277  /// file format.
278  virtual uint8_t getBytesInAddress() const = 0;
279 
280  virtual StringRef getFileFormatName() const = 0;
281  virtual /* Triple::ArchType */ unsigned getArch() const = 0;
282  virtual SubtargetFeatures getFeatures() const = 0;
283  virtual void setARMSubArch(Triple &TheTriple) const { }
284 
285  /// Returns platform-specific object flags, if any.
286  virtual std::error_code getPlatformFlags(unsigned &Result) const {
287  Result = 0;
289  }
290 
291  virtual std::error_code
293  return std::error_code();
294  }
295 
296  /// Maps a debug section name to a standard DWARF section name.
297  virtual StringRef mapDebugSectionName(StringRef Name) const { return Name; }
298 
299  /// True if this is a relocatable object (.o/.obj).
300  virtual bool isRelocatableObject() const = 0;
301 
302  /// @returns Pointer to ObjectFile subclass to handle this type of object.
303  /// @param ObjectPath The path to the object file. ObjectPath.isObject must
304  /// return true.
305  /// @brief Create ObjectFile from path.
307  createObjectFile(StringRef ObjectPath);
308 
314  }
315 
316  static bool classof(const Binary *v) {
317  return v->isObject();
318  }
319 
322 
325 
328  uint32_t UniversalCputype = 0,
329  uint32_t UniversalIndex = 0);
330 
333 };
334 
335 // Inline function definitions.
336 inline SymbolRef::SymbolRef(DataRefImpl SymbolP, const ObjectFile *Owner)
337  : BasicSymbolRef(SymbolP, Owner) {}
338 
341 }
342 
345 }
346 
347 inline uint64_t SymbolRef::getValue() const {
349 }
350 
353 }
354 
355 inline uint64_t SymbolRef::getCommonSize() const {
357 }
358 
361 }
362 
365 }
366 
367 inline const ObjectFile *SymbolRef::getObject() const {
369  return cast<ObjectFile>(O);
370 }
371 
372 /// SectionRef
374  const ObjectFile *Owner)
375  : SectionPimpl(SectionP)
376  , OwningObject(Owner) {}
377 
378 inline bool SectionRef::operator==(const SectionRef &Other) const {
379  return SectionPimpl == Other.SectionPimpl;
380 }
381 
382 inline bool SectionRef::operator!=(const SectionRef &Other) const {
383  return SectionPimpl != Other.SectionPimpl;
384 }
385 
386 inline bool SectionRef::operator<(const SectionRef &Other) const {
387  return SectionPimpl < Other.SectionPimpl;
388 }
389 
390 inline void SectionRef::moveNext() {
391  return OwningObject->moveSectionNext(SectionPimpl);
392 }
393 
394 inline std::error_code SectionRef::getName(StringRef &Result) const {
395  return OwningObject->getSectionName(SectionPimpl, Result);
396 }
397 
398 inline uint64_t SectionRef::getAddress() const {
399  return OwningObject->getSectionAddress(SectionPimpl);
400 }
401 
402 inline uint64_t SectionRef::getIndex() const {
403  return OwningObject->getSectionIndex(SectionPimpl);
404 }
405 
406 inline uint64_t SectionRef::getSize() const {
407  return OwningObject->getSectionSize(SectionPimpl);
408 }
409 
410 inline std::error_code SectionRef::getContents(StringRef &Result) const {
411  return OwningObject->getSectionContents(SectionPimpl, Result);
412 }
413 
414 inline uint64_t SectionRef::getAlignment() const {
415  return OwningObject->getSectionAlignment(SectionPimpl);
416 }
417 
418 inline bool SectionRef::isCompressed() const {
419  return OwningObject->isSectionCompressed(SectionPimpl);
420 }
421 
422 inline bool SectionRef::isText() const {
423  return OwningObject->isSectionText(SectionPimpl);
424 }
425 
426 inline bool SectionRef::isData() const {
427  return OwningObject->isSectionData(SectionPimpl);
428 }
429 
430 inline bool SectionRef::isBSS() const {
431  return OwningObject->isSectionBSS(SectionPimpl);
432 }
433 
434 inline bool SectionRef::isVirtual() const {
435  return OwningObject->isSectionVirtual(SectionPimpl);
436 }
437 
438 inline bool SectionRef::isBitcode() const {
439  return OwningObject->isSectionBitcode(SectionPimpl);
440 }
441 
443  return OwningObject->section_rel_begin(SectionPimpl);
444 }
445 
447  return OwningObject->section_rel_end(SectionPimpl);
448 }
449 
451  return OwningObject->getRelocatedSection(SectionPimpl);
452 }
453 
455  return SectionPimpl;
456 }
457 
458 inline const ObjectFile *SectionRef::getObject() const {
459  return OwningObject;
460 }
461 
462 /// RelocationRef
464  const ObjectFile *Owner)
465  : RelocationPimpl(RelocationP)
466  , OwningObject(Owner) {}
467 
468 inline bool RelocationRef::operator==(const RelocationRef &Other) const {
469  return RelocationPimpl == Other.RelocationPimpl;
470 }
471 
472 inline void RelocationRef::moveNext() {
473  return OwningObject->moveRelocationNext(RelocationPimpl);
474 }
475 
476 inline uint64_t RelocationRef::getOffset() const {
477  return OwningObject->getRelocationOffset(RelocationPimpl);
478 }
479 
481  return OwningObject->getRelocationSymbol(RelocationPimpl);
482 }
483 
484 inline uint64_t RelocationRef::getType() const {
485  return OwningObject->getRelocationType(RelocationPimpl);
486 }
487 
489  return OwningObject->getRelocationTypeName(RelocationPimpl, Result);
490 }
491 
493  return RelocationPimpl;
494 }
495 
496 inline const ObjectFile *RelocationRef::getObject() const {
497  return OwningObject;
498 }
499 
500 } // end namespace object
501 
502 } // end namespace llvm
503 
504 #endif // LLVM_OBJECT_OBJECTFILE_H
static Expected< OwningBinary< ObjectFile > > createObjectFile(StringRef ObjectPath)
Create ObjectFile from path.
Definition: ObjectFile.cpp:125
Represents either an error or a value T.
Definition: ErrorOr.h:69
Expected< StringRef > getName() const
Definition: ObjectFile.h:339
DataRefImpl getRawDataRefImpl() const
Definition: SymbolicFile.h:205
const ObjectFile * getObject() const
Definition: ObjectFile.h:496
const uint8_t * base() const
Definition: ObjectFile.h:195
This provides a very simple, boring adaptor for a begin and end iterator into a range type...
static std::error_code getObject(const T *&Obj, MemoryBufferRef M, const void *Ptr, const uint64_t Size=sizeof(T))
uint32_t getAlignment() const
Get the alignment of this symbol as the actual value (not log 2).
Definition: ObjectFile.h:351
symbol_iterator_range symbols() const
Definition: ObjectFile.h:264
bool isData() const
Definition: ObjectFile.h:426
static ErrorOr< std::unique_ptr< COFFObjectFile > > createCOFFObjectFile(MemoryBufferRef Object)
virtual bool isSectionBSS(DataRefImpl Sec) const =0
This class is the base class for all object file types.
Definition: ObjectFile.h:189
uint64_t getOffset() const
Definition: ObjectFile.h:476
const char * getBufferStart() const
Definition: MemoryBuffer.h:173
virtual uint64_t getRelocationOffset(DataRefImpl Rel) const =0
virtual std::error_code getSectionName(DataRefImpl Sec, StringRef &Res) const =0
DataRefImpl getRawDataRefImpl() const
Definition: ObjectFile.h:454
virtual Expected< StringRef > getSymbolName(DataRefImpl Symb) const =0
iterator_range< symbol_iterator > symbol_iterator_range
Definition: ObjectFile.h:263
section_iterator getRelocatedSection() const
Definition: ObjectFile.h:450
virtual unsigned getArch() const =0
uint64_t getCommonSize() const
Definition: ObjectFile.h:355
virtual relocation_iterator section_rel_end(DataRefImpl Sec) const =0
virtual basic_symbol_iterator symbol_begin() const =0
bool isVirtual() const
Definition: ObjectFile.h:434
virtual std::error_code getSectionContents(DataRefImpl Sec, StringRef &Res) const =0
void getTypeName(SmallVectorImpl< char > &Result) const
Get a string that represents the type of this relocation.
Definition: ObjectFile.h:488
This is a value type class that represents a single relocation in the list of relocations in the obje...
Definition: ObjectFile.h:52
virtual uint64_t getSectionIndex(DataRefImpl Sec) const =0
Tagged union holding either a T or a Error.
Definition: CachePruning.h:23
ELFYAML::ELF_STO Other
Definition: ELFYAML.cpp:663
virtual relocation_iterator section_rel_begin(DataRefImpl Sec) const =0
bool containsSymbol(SymbolRef S) const
Definition: ObjectFile.cpp:41
virtual uint64_t getCommonSymbolSizeImpl(DataRefImpl Symb) const =0
std::error_code getName(StringRef &Result) const
Definition: ObjectFile.h:394
Expected< SymbolRef::Type > getType() const
Definition: ObjectFile.h:363
virtual uint64_t getSectionAlignment(DataRefImpl Sec) const =0
virtual void setARMSubArch(Triple &TheTriple) const
Definition: ObjectFile.h:283
const SymbolRef * operator->() const
Definition: ObjectFile.h:175
const char * Name
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
uint64_t getAlignment() const
Get the alignment of this section as the actual value (not log 2).
Definition: ObjectFile.h:414
virtual Expected< SymbolRef::Type > getSymbolType(DataRefImpl Symb) const =0
virtual uint32_t getSymbolFlags(DataRefImpl Symb) const =0
#define P(N)
virtual uint8_t getBytesInAddress() const =0
The number of bytes used to represent an address in this object file format.
bool isObject() const
Definition: Binary.h:94
virtual void moveRelocationNext(DataRefImpl &Rel) const =0
relocation_iterator relocation_begin() const
Definition: ObjectFile.h:442
The instances of the Type class are immutable: once they are created, they are never changed...
Definition: Type.h:46
iterator_range< relocation_iterator > relocations() const
Definition: ObjectFile.h:117
bool operator==(const RelocationRef &Other) const
Definition: ObjectFile.h:468
symbol_iterator(const basic_symbol_iterator &B)
Definition: ObjectFile.h:171
bool isText() const
Definition: ObjectFile.h:422
symbol_iterator getSymbol() const
Definition: ObjectFile.h:480
uint64_t getIndex() const
Definition: ObjectFile.h:402
uint64_t getSize() const
Definition: ObjectFile.h:406
static Expected< std::unique_ptr< ObjectFile > > createObjectFile(MemoryBufferRef Object)
Definition: ObjectFile.h:312
virtual basic_symbol_iterator symbol_end() const =0
virtual std::error_code getPlatformFlags(unsigned &Result) const
Returns platform-specific object flags, if any.
Definition: ObjectFile.h:286
section_iterator_range sections() const
Definition: ObjectFile.h:272
uint64_t getAddress() const
Definition: ObjectFile.h:398
const ObjectFile * getObject() const
Definition: ObjectFile.h:458
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
static Expected< std::unique_ptr< WasmObjectFile > > createWasmObjectFile(MemoryBufferRef Object)
Expected< uint64_t > getAddress() const
Returns the symbol virtual address (i.e.
Definition: ObjectFile.h:343
SymbolRef(const BasicSymbolRef &B)
Definition: ObjectFile.h:143
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
std::error_code printSymbolName(raw_ostream &OS, DataRefImpl Symb) const override
Definition: ObjectFile.cpp:60
#define B
Definition: LargeTest.cpp:24
static Expected< std::unique_ptr< MachOObjectFile > > createMachOObjectFile(MemoryBufferRef Object, uint32_t UniversalCputype=0, uint32_t UniversalIndex=0)
virtual section_iterator section_begin() const =0
const ObjectFile * getObject() const
Definition: ObjectFile.h:367
virtual uint64_t getSectionAddress(DataRefImpl Sec) const =0
virtual symbol_iterator getRelocationSymbol(DataRefImpl Rel) const =0
A range adaptor for a pair of iterators.
virtual section_iterator getRelocatedSection(DataRefImpl Sec) const
Definition: ObjectFile.cpp:78
MemoryBufferRef Data
Definition: Binary.h:36
Manages the enabling and disabling of subtarget specific features.
virtual std::error_code getBuildAttributes(ARMAttributeParser &Attributes) const
Definition: ObjectFile.h:292
relocation_iterator relocation_end() const
Definition: ObjectFile.h:446
virtual bool isSectionText(DataRefImpl Sec) const =0
std::error_code getContents(StringRef &Result) const
Definition: ObjectFile.h:410
This is a value type class that represents a single symbol in the list of symbols in the object file...
Definition: ObjectFile.h:128
static ErrorOr< std::unique_ptr< ObjectFile > > createELFObjectFile(MemoryBufferRef Object)
bool isCompressed() const
Definition: ObjectFile.h:418
static bool classof(const Binary *v)
Definition: ObjectFile.h:316
Expected< section_iterator > getSection() const
Get section this symbol is defined in reference to.
Definition: ObjectFile.h:359
uint64_t getType() const
Definition: ObjectFile.h:484
virtual void moveSectionNext(DataRefImpl &Sec) const =0
virtual section_iterator section_end() const =0
virtual StringRef mapDebugSectionName(StringRef Name) const
Maps a debug section name to a standard DWARF section name.
Definition: ObjectFile.h:297
virtual bool isSectionData(DataRefImpl Sec) const =0
uint64_t getSymbolValue(DataRefImpl Symb) const
Definition: ObjectFile.cpp:51
const SymbolicFile * getObject() const
Definition: SymbolicFile.h:209
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 SubtargetFeatures getFeatures() const =0
virtual uint64_t getSymbolValueImpl(DataRefImpl Symb) const =0
const SymbolRef & operator*() const
Definition: ObjectFile.h:180
virtual bool isRelocatableObject() const =0
True if this is a relocatable object (.o/.obj).
uint64_t getCommonSymbolSize(DataRefImpl Symb) const
Definition: ObjectFile.h:258
Provides ErrorOr<T> smart pointer.
const content_type & operator*() const
Definition: SymbolicFile.h:79
bool operator==(const SectionRef &Other) const
Definition: ObjectFile.h:378
virtual bool isSectionCompressed(DataRefImpl Sec) const =0
bool operator<(const SectionRef &Other) const
Definition: ObjectFile.h:386
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
virtual bool isSectionBitcode(DataRefImpl Sec) const
Definition: ObjectFile.cpp:71
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:170
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition: raw_ostream.h:44
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:347
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49
bool isBitcode() const
Definition: ObjectFile.h:438
virtual StringRef getFileFormatName() const =0
virtual uint64_t getRelocationType(DataRefImpl Rel) const =0
Unrecognized file.
Definition: Magic.h:23
bool operator!=(const SectionRef &Other) const
Definition: ObjectFile.h:382
This is a value type class that represents a single section in the list of sections in the object fil...
Definition: ObjectFile.h:81
iterator_range< section_iterator > section_iterator_range
Definition: ObjectFile.h:271
file_magic - An "enum class" enumeration of file types based on magic (the first N bytes of the file)...
Definition: Magic.h:21
virtual uint32_t getSymbolAlignment(DataRefImpl Symb) const
Definition: ObjectFile.cpp:69
DataRefImpl getRawDataRefImpl() const
Definition: ObjectFile.h:492