ObjectFile.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===- ObjectFile.h - File format independent object file -------*- C++ -*-===//
  7. //
  8. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  9. // See https://llvm.org/LICENSE.txt for license information.
  10. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  11. //
  12. //===----------------------------------------------------------------------===//
  13. //
  14. // This file declares a file format independent ObjectFile class.
  15. //
  16. //===----------------------------------------------------------------------===//
  17. #ifndef LLVM_OBJECT_OBJECTFILE_H
  18. #define LLVM_OBJECT_OBJECTFILE_H
  19. #include "llvm/ADT/DenseMapInfo.h"
  20. #include "llvm/ADT/StringRef.h"
  21. #include "llvm/ADT/Triple.h"
  22. #include "llvm/ADT/iterator_range.h"
  23. #include "llvm/BinaryFormat/Magic.h"
  24. #include "llvm/Object/Binary.h"
  25. #include "llvm/Object/Error.h"
  26. #include "llvm/Object/SymbolicFile.h"
  27. #include "llvm/Support/Casting.h"
  28. #include "llvm/Support/Error.h"
  29. #include "llvm/Support/MemoryBuffer.h"
  30. #include <cassert>
  31. #include <cstdint>
  32. #include <memory>
  33. #include <system_error>
  34. namespace llvm {
  35. class ARMAttributeParser;
  36. class SubtargetFeatures;
  37. namespace object {
  38. class COFFObjectFile;
  39. class MachOObjectFile;
  40. class ObjectFile;
  41. class SectionRef;
  42. class SymbolRef;
  43. class symbol_iterator;
  44. class WasmObjectFile;
  45. using section_iterator = content_iterator<SectionRef>;
  46. /// This is a value type class that represents a single relocation in the list
  47. /// of relocations in the object file.
  48. class RelocationRef {
  49. DataRefImpl RelocationPimpl;
  50. const ObjectFile *OwningObject = nullptr;
  51. public:
  52. RelocationRef() = default;
  53. RelocationRef(DataRefImpl RelocationP, const ObjectFile *Owner);
  54. bool operator==(const RelocationRef &Other) const;
  55. void moveNext();
  56. uint64_t getOffset() const;
  57. symbol_iterator getSymbol() const;
  58. uint64_t getType() const;
  59. /// Get a string that represents the type of this relocation.
  60. ///
  61. /// This is for display purposes only.
  62. void getTypeName(SmallVectorImpl<char> &Result) const;
  63. DataRefImpl getRawDataRefImpl() const;
  64. const ObjectFile *getObject() const;
  65. };
  66. using relocation_iterator = content_iterator<RelocationRef>;
  67. /// This is a value type class that represents a single section in the list of
  68. /// sections in the object file.
  69. class SectionRef {
  70. friend class SymbolRef;
  71. DataRefImpl SectionPimpl;
  72. const ObjectFile *OwningObject = nullptr;
  73. public:
  74. SectionRef() = default;
  75. SectionRef(DataRefImpl SectionP, const ObjectFile *Owner);
  76. bool operator==(const SectionRef &Other) const;
  77. bool operator!=(const SectionRef &Other) const;
  78. bool operator<(const SectionRef &Other) const;
  79. void moveNext();
  80. Expected<StringRef> getName() const;
  81. uint64_t getAddress() const;
  82. uint64_t getIndex() const;
  83. uint64_t getSize() const;
  84. Expected<StringRef> getContents() const;
  85. /// Get the alignment of this section as the actual value (not log 2).
  86. uint64_t getAlignment() const;
  87. bool isCompressed() const;
  88. /// Whether this section contains instructions.
  89. bool isText() const;
  90. /// Whether this section contains data, not instructions.
  91. bool isData() const;
  92. /// Whether this section contains BSS uninitialized data.
  93. bool isBSS() const;
  94. bool isVirtual() const;
  95. bool isBitcode() const;
  96. bool isStripped() const;
  97. /// Whether this section will be placed in the text segment, according to the
  98. /// Berkeley size format. This is true if the section is allocatable, and
  99. /// contains either code or readonly data.
  100. bool isBerkeleyText() const;
  101. /// Whether this section will be placed in the data segment, according to the
  102. /// Berkeley size format. This is true if the section is allocatable and
  103. /// contains data (e.g. PROGBITS), but is not text.
  104. bool isBerkeleyData() const;
  105. /// Whether this section is a debug section.
  106. bool isDebugSection(StringRef SectionName) const;
  107. bool containsSymbol(SymbolRef S) const;
  108. relocation_iterator relocation_begin() const;
  109. relocation_iterator relocation_end() const;
  110. iterator_range<relocation_iterator> relocations() const {
  111. return make_range(relocation_begin(), relocation_end());
  112. }
  113. Expected<section_iterator> getRelocatedSection() const;
  114. DataRefImpl getRawDataRefImpl() const;
  115. const ObjectFile *getObject() const;
  116. };
  117. struct SectionedAddress {
  118. const static uint64_t UndefSection = UINT64_MAX;
  119. uint64_t Address = 0;
  120. uint64_t SectionIndex = UndefSection;
  121. };
  122. inline bool operator<(const SectionedAddress &LHS,
  123. const SectionedAddress &RHS) {
  124. return std::tie(LHS.SectionIndex, LHS.Address) <
  125. std::tie(RHS.SectionIndex, RHS.Address);
  126. }
  127. inline bool operator==(const SectionedAddress &LHS,
  128. const SectionedAddress &RHS) {
  129. return std::tie(LHS.SectionIndex, LHS.Address) ==
  130. std::tie(RHS.SectionIndex, RHS.Address);
  131. }
  132. raw_ostream &operator<<(raw_ostream &OS, const SectionedAddress &Addr);
  133. /// This is a value type class that represents a single symbol in the list of
  134. /// symbols in the object file.
  135. class SymbolRef : public BasicSymbolRef {
  136. friend class SectionRef;
  137. public:
  138. enum Type {
  139. ST_Unknown, // Type not specified
  140. ST_Data,
  141. ST_Debug,
  142. ST_File,
  143. ST_Function,
  144. ST_Other
  145. };
  146. SymbolRef() = default;
  147. SymbolRef(DataRefImpl SymbolP, const ObjectFile *Owner);
  148. SymbolRef(const BasicSymbolRef &B) : BasicSymbolRef(B) {
  149. assert(isa<ObjectFile>(BasicSymbolRef::getObject()));
  150. }
  151. Expected<StringRef> getName() const;
  152. /// Returns the symbol virtual address (i.e. address at which it will be
  153. /// mapped).
  154. Expected<uint64_t> getAddress() const;
  155. /// Return the value of the symbol depending on the object this can be an
  156. /// offset or a virtual address.
  157. Expected<uint64_t> getValue() const;
  158. /// Get the alignment of this symbol as the actual value (not log 2).
  159. uint32_t getAlignment() const;
  160. uint64_t getCommonSize() const;
  161. Expected<SymbolRef::Type> getType() const;
  162. /// Get section this symbol is defined in reference to. Result is
  163. /// end_sections() if it is undefined or is an absolute symbol.
  164. Expected<section_iterator> getSection() const;
  165. const ObjectFile *getObject() const;
  166. };
  167. class symbol_iterator : public basic_symbol_iterator {
  168. public:
  169. symbol_iterator(SymbolRef Sym) : basic_symbol_iterator(Sym) {}
  170. symbol_iterator(const basic_symbol_iterator &B)
  171. : basic_symbol_iterator(SymbolRef(B->getRawDataRefImpl(),
  172. cast<ObjectFile>(B->getObject()))) {}
  173. const SymbolRef *operator->() const {
  174. const BasicSymbolRef &P = basic_symbol_iterator::operator *();
  175. return static_cast<const SymbolRef*>(&P);
  176. }
  177. const SymbolRef &operator*() const {
  178. const BasicSymbolRef &P = basic_symbol_iterator::operator *();
  179. return static_cast<const SymbolRef&>(P);
  180. }
  181. };
  182. /// This class is the base class for all object file types. Concrete instances
  183. /// of this object are created by createObjectFile, which figures out which type
  184. /// to create.
  185. class ObjectFile : public SymbolicFile {
  186. virtual void anchor();
  187. protected:
  188. ObjectFile(unsigned int Type, MemoryBufferRef Source);
  189. const uint8_t *base() const {
  190. return reinterpret_cast<const uint8_t *>(Data.getBufferStart());
  191. }
  192. // These functions are for SymbolRef to call internally. The main goal of
  193. // this is to allow SymbolRef::SymbolPimpl to point directly to the symbol
  194. // entry in the memory mapped object file. SymbolPimpl cannot contain any
  195. // virtual functions because then it could not point into the memory mapped
  196. // file.
  197. //
  198. // Implementations assume that the DataRefImpl is valid and has not been
  199. // modified externally. It's UB otherwise.
  200. friend class SymbolRef;
  201. virtual Expected<StringRef> getSymbolName(DataRefImpl Symb) const = 0;
  202. Error printSymbolName(raw_ostream &OS,
  203. DataRefImpl Symb) const override;
  204. virtual Expected<uint64_t> getSymbolAddress(DataRefImpl Symb) const = 0;
  205. virtual uint64_t getSymbolValueImpl(DataRefImpl Symb) const = 0;
  206. virtual uint32_t getSymbolAlignment(DataRefImpl Symb) const;
  207. virtual uint64_t getCommonSymbolSizeImpl(DataRefImpl Symb) const = 0;
  208. virtual Expected<SymbolRef::Type> getSymbolType(DataRefImpl Symb) const = 0;
  209. virtual Expected<section_iterator>
  210. getSymbolSection(DataRefImpl Symb) const = 0;
  211. // Same as above for SectionRef.
  212. friend class SectionRef;
  213. virtual void moveSectionNext(DataRefImpl &Sec) const = 0;
  214. virtual Expected<StringRef> getSectionName(DataRefImpl Sec) const = 0;
  215. virtual uint64_t getSectionAddress(DataRefImpl Sec) const = 0;
  216. virtual uint64_t getSectionIndex(DataRefImpl Sec) const = 0;
  217. virtual uint64_t getSectionSize(DataRefImpl Sec) const = 0;
  218. virtual Expected<ArrayRef<uint8_t>>
  219. getSectionContents(DataRefImpl Sec) const = 0;
  220. virtual uint64_t getSectionAlignment(DataRefImpl Sec) const = 0;
  221. virtual bool isSectionCompressed(DataRefImpl Sec) const = 0;
  222. virtual bool isSectionText(DataRefImpl Sec) const = 0;
  223. virtual bool isSectionData(DataRefImpl Sec) const = 0;
  224. virtual bool isSectionBSS(DataRefImpl Sec) const = 0;
  225. // A section is 'virtual' if its contents aren't present in the object image.
  226. virtual bool isSectionVirtual(DataRefImpl Sec) const = 0;
  227. virtual bool isSectionBitcode(DataRefImpl Sec) const;
  228. virtual bool isSectionStripped(DataRefImpl Sec) const;
  229. virtual bool isBerkeleyText(DataRefImpl Sec) const;
  230. virtual bool isBerkeleyData(DataRefImpl Sec) const;
  231. virtual bool isDebugSection(StringRef SectionName) const;
  232. virtual relocation_iterator section_rel_begin(DataRefImpl Sec) const = 0;
  233. virtual relocation_iterator section_rel_end(DataRefImpl Sec) const = 0;
  234. virtual Expected<section_iterator> getRelocatedSection(DataRefImpl Sec) const;
  235. // Same as above for RelocationRef.
  236. friend class RelocationRef;
  237. virtual void moveRelocationNext(DataRefImpl &Rel) const = 0;
  238. virtual uint64_t getRelocationOffset(DataRefImpl Rel) const = 0;
  239. virtual symbol_iterator getRelocationSymbol(DataRefImpl Rel) const = 0;
  240. virtual uint64_t getRelocationType(DataRefImpl Rel) const = 0;
  241. virtual void getRelocationTypeName(DataRefImpl Rel,
  242. SmallVectorImpl<char> &Result) const = 0;
  243. Expected<uint64_t> getSymbolValue(DataRefImpl Symb) const;
  244. public:
  245. ObjectFile() = delete;
  246. ObjectFile(const ObjectFile &other) = delete;
  247. uint64_t getCommonSymbolSize(DataRefImpl Symb) const {
  248. Expected<uint32_t> SymbolFlagsOrErr = getSymbolFlags(Symb);
  249. if (!SymbolFlagsOrErr)
  250. // TODO: Actually report errors helpfully.
  251. report_fatal_error(SymbolFlagsOrErr.takeError());
  252. assert(*SymbolFlagsOrErr & SymbolRef::SF_Common);
  253. return getCommonSymbolSizeImpl(Symb);
  254. }
  255. virtual std::vector<SectionRef> dynamic_relocation_sections() const {
  256. return std::vector<SectionRef>();
  257. }
  258. using symbol_iterator_range = iterator_range<symbol_iterator>;
  259. symbol_iterator_range symbols() const {
  260. return symbol_iterator_range(symbol_begin(), symbol_end());
  261. }
  262. virtual section_iterator section_begin() const = 0;
  263. virtual section_iterator section_end() const = 0;
  264. using section_iterator_range = iterator_range<section_iterator>;
  265. section_iterator_range sections() const {
  266. return section_iterator_range(section_begin(), section_end());
  267. }
  268. /// The number of bytes used to represent an address in this object
  269. /// file format.
  270. virtual uint8_t getBytesInAddress() const = 0;
  271. virtual StringRef getFileFormatName() const = 0;
  272. virtual Triple::ArchType getArch() const = 0;
  273. virtual SubtargetFeatures getFeatures() const = 0;
  274. virtual Optional<StringRef> tryGetCPUName() const { return None; };
  275. virtual void setARMSubArch(Triple &TheTriple) const { }
  276. virtual Expected<uint64_t> getStartAddress() const {
  277. return errorCodeToError(object_error::parse_failed);
  278. };
  279. /// Create a triple from the data in this object file.
  280. Triple makeTriple() const;
  281. /// Maps a debug section name to a standard DWARF section name.
  282. virtual StringRef mapDebugSectionName(StringRef Name) const { return Name; }
  283. /// True if this is a relocatable object (.o/.obj).
  284. virtual bool isRelocatableObject() const = 0;
  285. /// @returns Pointer to ObjectFile subclass to handle this type of object.
  286. /// @param ObjectPath The path to the object file. ObjectPath.isObject must
  287. /// return true.
  288. /// Create ObjectFile from path.
  289. static Expected<OwningBinary<ObjectFile>>
  290. createObjectFile(StringRef ObjectPath);
  291. static Expected<std::unique_ptr<ObjectFile>>
  292. createObjectFile(MemoryBufferRef Object, llvm::file_magic Type,
  293. bool InitContent = true);
  294. static Expected<std::unique_ptr<ObjectFile>>
  295. createObjectFile(MemoryBufferRef Object) {
  296. return createObjectFile(Object, llvm::file_magic::unknown);
  297. }
  298. static bool classof(const Binary *v) {
  299. return v->isObject();
  300. }
  301. static Expected<std::unique_ptr<COFFObjectFile>>
  302. createCOFFObjectFile(MemoryBufferRef Object);
  303. static Expected<std::unique_ptr<ObjectFile>>
  304. createXCOFFObjectFile(MemoryBufferRef Object, unsigned FileType);
  305. static Expected<std::unique_ptr<ObjectFile>>
  306. createELFObjectFile(MemoryBufferRef Object, bool InitContent = true);
  307. static Expected<std::unique_ptr<MachOObjectFile>>
  308. createMachOObjectFile(MemoryBufferRef Object,
  309. uint32_t UniversalCputype = 0,
  310. uint32_t UniversalIndex = 0);
  311. static Expected<std::unique_ptr<WasmObjectFile>>
  312. createWasmObjectFile(MemoryBufferRef Object);
  313. };
  314. // Inline function definitions.
  315. inline SymbolRef::SymbolRef(DataRefImpl SymbolP, const ObjectFile *Owner)
  316. : BasicSymbolRef(SymbolP, Owner) {}
  317. inline Expected<StringRef> SymbolRef::getName() const {
  318. return getObject()->getSymbolName(getRawDataRefImpl());
  319. }
  320. inline Expected<uint64_t> SymbolRef::getAddress() const {
  321. return getObject()->getSymbolAddress(getRawDataRefImpl());
  322. }
  323. inline Expected<uint64_t> SymbolRef::getValue() const {
  324. return getObject()->getSymbolValue(getRawDataRefImpl());
  325. }
  326. inline uint32_t SymbolRef::getAlignment() const {
  327. return getObject()->getSymbolAlignment(getRawDataRefImpl());
  328. }
  329. inline uint64_t SymbolRef::getCommonSize() const {
  330. return getObject()->getCommonSymbolSize(getRawDataRefImpl());
  331. }
  332. inline Expected<section_iterator> SymbolRef::getSection() const {
  333. return getObject()->getSymbolSection(getRawDataRefImpl());
  334. }
  335. inline Expected<SymbolRef::Type> SymbolRef::getType() const {
  336. return getObject()->getSymbolType(getRawDataRefImpl());
  337. }
  338. inline const ObjectFile *SymbolRef::getObject() const {
  339. const SymbolicFile *O = BasicSymbolRef::getObject();
  340. return cast<ObjectFile>(O);
  341. }
  342. /// SectionRef
  343. inline SectionRef::SectionRef(DataRefImpl SectionP,
  344. const ObjectFile *Owner)
  345. : SectionPimpl(SectionP)
  346. , OwningObject(Owner) {}
  347. inline bool SectionRef::operator==(const SectionRef &Other) const {
  348. return OwningObject == Other.OwningObject &&
  349. SectionPimpl == Other.SectionPimpl;
  350. }
  351. inline bool SectionRef::operator!=(const SectionRef &Other) const {
  352. return !(*this == Other);
  353. }
  354. inline bool SectionRef::operator<(const SectionRef &Other) const {
  355. assert(OwningObject == Other.OwningObject);
  356. return SectionPimpl < Other.SectionPimpl;
  357. }
  358. inline void SectionRef::moveNext() {
  359. return OwningObject->moveSectionNext(SectionPimpl);
  360. }
  361. inline Expected<StringRef> SectionRef::getName() const {
  362. return OwningObject->getSectionName(SectionPimpl);
  363. }
  364. inline uint64_t SectionRef::getAddress() const {
  365. return OwningObject->getSectionAddress(SectionPimpl);
  366. }
  367. inline uint64_t SectionRef::getIndex() const {
  368. return OwningObject->getSectionIndex(SectionPimpl);
  369. }
  370. inline uint64_t SectionRef::getSize() const {
  371. return OwningObject->getSectionSize(SectionPimpl);
  372. }
  373. inline Expected<StringRef> SectionRef::getContents() const {
  374. Expected<ArrayRef<uint8_t>> Res =
  375. OwningObject->getSectionContents(SectionPimpl);
  376. if (!Res)
  377. return Res.takeError();
  378. return StringRef(reinterpret_cast<const char *>(Res->data()), Res->size());
  379. }
  380. inline uint64_t SectionRef::getAlignment() const {
  381. return OwningObject->getSectionAlignment(SectionPimpl);
  382. }
  383. inline bool SectionRef::isCompressed() const {
  384. return OwningObject->isSectionCompressed(SectionPimpl);
  385. }
  386. inline bool SectionRef::isText() const {
  387. return OwningObject->isSectionText(SectionPimpl);
  388. }
  389. inline bool SectionRef::isData() const {
  390. return OwningObject->isSectionData(SectionPimpl);
  391. }
  392. inline bool SectionRef::isBSS() const {
  393. return OwningObject->isSectionBSS(SectionPimpl);
  394. }
  395. inline bool SectionRef::isVirtual() const {
  396. return OwningObject->isSectionVirtual(SectionPimpl);
  397. }
  398. inline bool SectionRef::isBitcode() const {
  399. return OwningObject->isSectionBitcode(SectionPimpl);
  400. }
  401. inline bool SectionRef::isStripped() const {
  402. return OwningObject->isSectionStripped(SectionPimpl);
  403. }
  404. inline bool SectionRef::isBerkeleyText() const {
  405. return OwningObject->isBerkeleyText(SectionPimpl);
  406. }
  407. inline bool SectionRef::isBerkeleyData() const {
  408. return OwningObject->isBerkeleyData(SectionPimpl);
  409. }
  410. inline bool SectionRef::isDebugSection(StringRef SectionName) const {
  411. return OwningObject->isDebugSection(SectionName);
  412. }
  413. inline relocation_iterator SectionRef::relocation_begin() const {
  414. return OwningObject->section_rel_begin(SectionPimpl);
  415. }
  416. inline relocation_iterator SectionRef::relocation_end() const {
  417. return OwningObject->section_rel_end(SectionPimpl);
  418. }
  419. inline Expected<section_iterator> SectionRef::getRelocatedSection() const {
  420. return OwningObject->getRelocatedSection(SectionPimpl);
  421. }
  422. inline DataRefImpl SectionRef::getRawDataRefImpl() const {
  423. return SectionPimpl;
  424. }
  425. inline const ObjectFile *SectionRef::getObject() const {
  426. return OwningObject;
  427. }
  428. /// RelocationRef
  429. inline RelocationRef::RelocationRef(DataRefImpl RelocationP,
  430. const ObjectFile *Owner)
  431. : RelocationPimpl(RelocationP)
  432. , OwningObject(Owner) {}
  433. inline bool RelocationRef::operator==(const RelocationRef &Other) const {
  434. return RelocationPimpl == Other.RelocationPimpl;
  435. }
  436. inline void RelocationRef::moveNext() {
  437. return OwningObject->moveRelocationNext(RelocationPimpl);
  438. }
  439. inline uint64_t RelocationRef::getOffset() const {
  440. return OwningObject->getRelocationOffset(RelocationPimpl);
  441. }
  442. inline symbol_iterator RelocationRef::getSymbol() const {
  443. return OwningObject->getRelocationSymbol(RelocationPimpl);
  444. }
  445. inline uint64_t RelocationRef::getType() const {
  446. return OwningObject->getRelocationType(RelocationPimpl);
  447. }
  448. inline void RelocationRef::getTypeName(SmallVectorImpl<char> &Result) const {
  449. return OwningObject->getRelocationTypeName(RelocationPimpl, Result);
  450. }
  451. inline DataRefImpl RelocationRef::getRawDataRefImpl() const {
  452. return RelocationPimpl;
  453. }
  454. inline const ObjectFile *RelocationRef::getObject() const {
  455. return OwningObject;
  456. }
  457. } // end namespace object
  458. template <> struct DenseMapInfo<object::SectionRef> {
  459. static bool isEqual(const object::SectionRef &A,
  460. const object::SectionRef &B) {
  461. return A == B;
  462. }
  463. static object::SectionRef getEmptyKey() {
  464. return object::SectionRef({}, nullptr);
  465. }
  466. static object::SectionRef getTombstoneKey() {
  467. object::DataRefImpl TS;
  468. TS.p = (uintptr_t)-1;
  469. return object::SectionRef(TS, nullptr);
  470. }
  471. static unsigned getHashValue(const object::SectionRef &Sec) {
  472. object::DataRefImpl Raw = Sec.getRawDataRefImpl();
  473. return hash_combine(Raw.p, Raw.d.a, Raw.d.b);
  474. }
  475. };
  476. } // end namespace llvm
  477. #endif // LLVM_OBJECT_OBJECTFILE_H
  478. #ifdef __GNUC__
  479. #pragma GCC diagnostic pop
  480. #endif