LLVM  15.0.0git
ELFObjectFile.cpp
Go to the documentation of this file.
1 //===- ELFObjectFile.cpp - ELF object file implementation -----------------===//
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 // Part of the ELFObjectFile class implementation.
10 //
11 //===----------------------------------------------------------------------===//
12 
14 #include "llvm/ADT/Triple.h"
15 #include "llvm/BinaryFormat/ELF.h"
18 #include "llvm/MC/TargetRegistry.h"
19 #include "llvm/Object/ELF.h"
20 #include "llvm/Object/ELFTypes.h"
21 #include "llvm/Object/Error.h"
28 #include <algorithm>
29 #include <cstddef>
30 #include <cstdint>
31 #include <memory>
32 #include <string>
33 #include <utility>
34 
35 using namespace llvm;
36 using namespace object;
37 
39  {"None", "NOTYPE", ELF::STT_NOTYPE},
40  {"Object", "OBJECT", ELF::STT_OBJECT},
41  {"Function", "FUNC", ELF::STT_FUNC},
42  {"Section", "SECTION", ELF::STT_SECTION},
43  {"File", "FILE", ELF::STT_FILE},
44  {"Common", "COMMON", ELF::STT_COMMON},
45  {"TLS", "TLS", ELF::STT_TLS},
46  {"Unknown", "<unknown>: 7", 7},
47  {"Unknown", "<unknown>: 8", 8},
48  {"Unknown", "<unknown>: 9", 9},
49  {"GNU_IFunc", "IFUNC", ELF::STT_GNU_IFUNC},
50  {"OS Specific", "<OS specific>: 11", 11},
51  {"OS Specific", "<OS specific>: 12", 12},
52  {"Proc Specific", "<processor specific>: 13", 13},
53  {"Proc Specific", "<processor specific>: 14", 14},
54  {"Proc Specific", "<processor specific>: 15", 15}
55 };
56 
58  : ObjectFile(Type, Source) {}
59 
60 template <class ELFT>
62 createPtr(MemoryBufferRef Object, bool InitContent) {
63  auto Ret = ELFObjectFile<ELFT>::create(Object, InitContent);
64  if (Error E = Ret.takeError())
65  return std::move(E);
66  return std::make_unique<ELFObjectFile<ELFT>>(std::move(*Ret));
67 }
68 
71  std::pair<unsigned char, unsigned char> Ident =
73  std::size_t MaxAlignment =
74  1ULL << countTrailingZeros(
75  reinterpret_cast<uintptr_t>(Obj.getBufferStart()));
76 
77  if (MaxAlignment < 2)
78  return createError("Insufficient alignment");
79 
80  if (Ident.first == ELF::ELFCLASS32) {
81  if (Ident.second == ELF::ELFDATA2LSB)
82  return createPtr<ELF32LE>(Obj, InitContent);
83  else if (Ident.second == ELF::ELFDATA2MSB)
84  return createPtr<ELF32BE>(Obj, InitContent);
85  else
86  return createError("Invalid ELF data");
87  } else if (Ident.first == ELF::ELFCLASS64) {
88  if (Ident.second == ELF::ELFDATA2LSB)
89  return createPtr<ELF64LE>(Obj, InitContent);
90  else if (Ident.second == ELF::ELFDATA2MSB)
91  return createPtr<ELF64BE>(Obj, InitContent);
92  else
93  return createError("Invalid ELF data");
94  }
95  return createError("Invalid ELF class");
96 }
97 
98 SubtargetFeatures ELFObjectFileBase::getMIPSFeatures() const {
99  SubtargetFeatures Features;
100  unsigned PlatformFlags = getPlatformFlags();
101 
102  switch (PlatformFlags & ELF::EF_MIPS_ARCH) {
103  case ELF::EF_MIPS_ARCH_1:
104  break;
105  case ELF::EF_MIPS_ARCH_2:
106  Features.AddFeature("mips2");
107  break;
108  case ELF::EF_MIPS_ARCH_3:
109  Features.AddFeature("mips3");
110  break;
111  case ELF::EF_MIPS_ARCH_4:
112  Features.AddFeature("mips4");
113  break;
114  case ELF::EF_MIPS_ARCH_5:
115  Features.AddFeature("mips5");
116  break;
118  Features.AddFeature("mips32");
119  break;
121  Features.AddFeature("mips64");
122  break;
124  Features.AddFeature("mips32r2");
125  break;
127  Features.AddFeature("mips64r2");
128  break;
130  Features.AddFeature("mips32r6");
131  break;
133  Features.AddFeature("mips64r6");
134  break;
135  default:
136  llvm_unreachable("Unknown EF_MIPS_ARCH value");
137  }
138 
139  switch (PlatformFlags & ELF::EF_MIPS_MACH) {
141  // No feature associated with this value.
142  break;
144  Features.AddFeature("cnmips");
145  break;
146  default:
147  llvm_unreachable("Unknown EF_MIPS_ARCH value");
148  }
149 
150  if (PlatformFlags & ELF::EF_MIPS_ARCH_ASE_M16)
151  Features.AddFeature("mips16");
152  if (PlatformFlags & ELF::EF_MIPS_MICROMIPS)
153  Features.AddFeature("micromips");
154 
155  return Features;
156 }
157 
158 SubtargetFeatures ELFObjectFileBase::getARMFeatures() const {
159  SubtargetFeatures Features;
163  return SubtargetFeatures();
164  }
165 
166  // both ARMv7-M and R have to support thumb hardware div
167  bool isV7 = false;
168  Optional<unsigned> Attr =
169  Attributes.getAttributeValue(ARMBuildAttrs::CPU_arch);
170  if (Attr)
171  isV7 = Attr.getValue() == ARMBuildAttrs::v7;
172 
173  Attr = Attributes.getAttributeValue(ARMBuildAttrs::CPU_arch_profile);
174  if (Attr) {
175  switch (Attr.getValue()) {
177  Features.AddFeature("aclass");
178  break;
180  Features.AddFeature("rclass");
181  if (isV7)
182  Features.AddFeature("hwdiv");
183  break;
185  Features.AddFeature("mclass");
186  if (isV7)
187  Features.AddFeature("hwdiv");
188  break;
189  }
190  }
191 
192  Attr = Attributes.getAttributeValue(ARMBuildAttrs::THUMB_ISA_use);
193  if (Attr) {
194  switch (Attr.getValue()) {
195  default:
196  break;
198  Features.AddFeature("thumb", false);
199  Features.AddFeature("thumb2", false);
200  break;
202  Features.AddFeature("thumb2");
203  break;
204  }
205  }
206 
207  Attr = Attributes.getAttributeValue(ARMBuildAttrs::FP_arch);
208  if (Attr) {
209  switch (Attr.getValue()) {
210  default:
211  break;
213  Features.AddFeature("vfp2sp", false);
214  Features.AddFeature("vfp3d16sp", false);
215  Features.AddFeature("vfp4d16sp", false);
216  break;
218  Features.AddFeature("vfp2");
219  break;
222  Features.AddFeature("vfp3");
223  break;
226  Features.AddFeature("vfp4");
227  break;
228  }
229  }
230 
231  Attr = Attributes.getAttributeValue(ARMBuildAttrs::Advanced_SIMD_arch);
232  if (Attr) {
233  switch (Attr.getValue()) {
234  default:
235  break;
237  Features.AddFeature("neon", false);
238  Features.AddFeature("fp16", false);
239  break;
241  Features.AddFeature("neon");
242  break;
244  Features.AddFeature("neon");
245  Features.AddFeature("fp16");
246  break;
247  }
248  }
249 
250  Attr = Attributes.getAttributeValue(ARMBuildAttrs::MVE_arch);
251  if (Attr) {
252  switch (Attr.getValue()) {
253  default:
254  break;
256  Features.AddFeature("mve", false);
257  Features.AddFeature("mve.fp", false);
258  break;
260  Features.AddFeature("mve.fp", false);
261  Features.AddFeature("mve");
262  break;
264  Features.AddFeature("mve.fp");
265  break;
266  }
267  }
268 
269  Attr = Attributes.getAttributeValue(ARMBuildAttrs::DIV_use);
270  if (Attr) {
271  switch (Attr.getValue()) {
272  default:
273  break;
275  Features.AddFeature("hwdiv", false);
276  Features.AddFeature("hwdiv-arm", false);
277  break;
279  Features.AddFeature("hwdiv");
280  Features.AddFeature("hwdiv-arm");
281  break;
282  }
283  }
284 
285  return Features;
286 }
287 
288 SubtargetFeatures ELFObjectFileBase::getRISCVFeatures() const {
289  SubtargetFeatures Features;
290  unsigned PlatformFlags = getPlatformFlags();
291 
292  if (PlatformFlags & ELF::EF_RISCV_RVC) {
293  Features.AddFeature("c");
294  }
295 
296  // Add features according to the ELF attribute section.
297  // If there are any unrecognized features, ignore them.
300  // TODO Propagate Error.
302  return Features; // Keep "c" feature if there is one in PlatformFlags.
303  }
304 
305  Optional<StringRef> Attr = Attributes.getAttributeString(RISCVAttrs::ARCH);
306  if (Attr) {
307  // The Arch pattern is [rv32|rv64][i|e]version(_[m|a|f|d|c]version)*
308  // Version string pattern is (major)p(minor). Major and minor are optional.
309  // For example, a version number could be 2p0, 2, or p92.
310  StringRef Arch = *Attr;
311  if (Arch.consume_front("rv32"))
312  Features.AddFeature("64bit", false);
313  else if (Arch.consume_front("rv64"))
314  Features.AddFeature("64bit");
315 
316  while (!Arch.empty()) {
317  switch (Arch[0]) {
318  default:
319  break; // Ignore unexpected features.
320  case 'i':
321  Features.AddFeature("e", false);
322  break;
323  case 'd':
324  Features.AddFeature("f"); // D-ext will imply F-ext.
326  case 'e':
327  case 'm':
328  case 'a':
329  case 'f':
330  case 'c':
331  Features.AddFeature(Arch.take_front());
332  break;
333  }
334 
335  // FIXME: Handle version numbers.
336  Arch = Arch.drop_until([](char c) { return c == '_' || c == '\0'; });
337  Arch = Arch.drop_while([](char c) { return c == '_'; });
338  }
339  }
340 
341  return Features;
342 }
343 
345  switch (getEMachine()) {
346  case ELF::EM_MIPS:
347  return getMIPSFeatures();
348  case ELF::EM_ARM:
349  return getARMFeatures();
350  case ELF::EM_RISCV:
351  return getRISCVFeatures();
352  default:
353  return SubtargetFeatures();
354  }
355 }
356 
358  switch (getEMachine()) {
359  case ELF::EM_AMDGPU:
360  return getAMDGPUCPUName();
361  case ELF::EM_PPC64:
362  return StringRef("future");
363  default:
364  return None;
365  }
366 }
367 
368 StringRef ELFObjectFileBase::getAMDGPUCPUName() const {
370  unsigned CPU = getPlatformFlags() & ELF::EF_AMDGPU_MACH;
371 
372  switch (CPU) {
373  // Radeon HD 2000/3000 Series (R600).
375  return "r600";
377  return "r630";
379  return "rs880";
381  return "rv670";
382 
383  // Radeon HD 4000 Series (R700).
385  return "rv710";
387  return "rv730";
389  return "rv770";
390 
391  // Radeon HD 5000 Series (Evergreen).
393  return "cedar";
395  return "cypress";
397  return "juniper";
399  return "redwood";
401  return "sumo";
402 
403  // Radeon HD 6000 Series (Northern Islands).
405  return "barts";
407  return "caicos";
409  return "cayman";
411  return "turks";
412 
413  // AMDGCN GFX6.
415  return "gfx600";
417  return "gfx601";
419  return "gfx602";
420 
421  // AMDGCN GFX7.
423  return "gfx700";
425  return "gfx701";
427  return "gfx702";
429  return "gfx703";
431  return "gfx704";
433  return "gfx705";
434 
435  // AMDGCN GFX8.
437  return "gfx801";
439  return "gfx802";
441  return "gfx803";
443  return "gfx805";
445  return "gfx810";
446 
447  // AMDGCN GFX9.
449  return "gfx900";
451  return "gfx902";
453  return "gfx904";
455  return "gfx906";
457  return "gfx908";
459  return "gfx909";
461  return "gfx90a";
463  return "gfx90c";
465  return "gfx940";
466 
467  // AMDGCN GFX10.
469  return "gfx1010";
471  return "gfx1011";
473  return "gfx1012";
475  return "gfx1013";
477  return "gfx1030";
479  return "gfx1031";
481  return "gfx1032";
483  return "gfx1033";
485  return "gfx1034";
487  return "gfx1035";
489  return "gfx1036";
490 
491  // AMDGCN GFX11.
493  return "gfx1100";
495  return "gfx1101";
497  return "gfx1102";
499  return "gfx1103";
500  default:
501  llvm_unreachable("Unknown EF_AMDGPU_MACH value");
502  }
503 }
504 
505 // FIXME Encode from a tablegen description or target parser.
506 void ELFObjectFileBase::setARMSubArch(Triple &TheTriple) const {
507  if (TheTriple.getSubArch() != Triple::NoSubArch)
508  return;
509 
512  // TODO Propagate Error.
514  return;
515  }
516 
517  std::string Triple;
518  // Default to ARM, but use the triple if it's been set.
519  if (TheTriple.isThumb())
520  Triple = "thumb";
521  else
522  Triple = "arm";
523 
524  Optional<unsigned> Attr =
525  Attributes.getAttributeValue(ARMBuildAttrs::CPU_arch);
526  if (Attr) {
527  switch (Attr.getValue()) {
528  case ARMBuildAttrs::v4:
529  Triple += "v4";
530  break;
531  case ARMBuildAttrs::v4T:
532  Triple += "v4t";
533  break;
534  case ARMBuildAttrs::v5T:
535  Triple += "v5t";
536  break;
537  case ARMBuildAttrs::v5TE:
538  Triple += "v5te";
539  break;
541  Triple += "v5tej";
542  break;
543  case ARMBuildAttrs::v6:
544  Triple += "v6";
545  break;
546  case ARMBuildAttrs::v6KZ:
547  Triple += "v6kz";
548  break;
549  case ARMBuildAttrs::v6T2:
550  Triple += "v6t2";
551  break;
552  case ARMBuildAttrs::v6K:
553  Triple += "v6k";
554  break;
555  case ARMBuildAttrs::v7: {
556  Optional<unsigned> ArchProfileAttr =
557  Attributes.getAttributeValue(ARMBuildAttrs::CPU_arch_profile);
558  if (ArchProfileAttr &&
559  ArchProfileAttr.getValue() == ARMBuildAttrs::MicroControllerProfile)
560  Triple += "v7m";
561  else
562  Triple += "v7";
563  break;
564  }
565  case ARMBuildAttrs::v6_M:
566  Triple += "v6m";
567  break;
569  Triple += "v6sm";
570  break;
572  Triple += "v7em";
573  break;
574  case ARMBuildAttrs::v8_A:
575  Triple += "v8a";
576  break;
577  case ARMBuildAttrs::v8_R:
578  Triple += "v8r";
579  break;
581  Triple += "v8m.base";
582  break;
584  Triple += "v8m.main";
585  break;
587  Triple += "v8.1m.main";
588  break;
589  case ARMBuildAttrs::v9_A:
590  Triple += "v9a";
591  break;
592  }
593  }
594  if (!isLittleEndian())
595  Triple += "eb";
596 
597  TheTriple.setArchName(Triple);
598 }
599 
600 std::vector<std::pair<Optional<DataRefImpl>, uint64_t>>
602  std::string Err;
603  const auto Triple = makeTriple();
604  const auto *T = TargetRegistry::lookupTarget(Triple.str(), Err);
605  if (!T)
606  return {};
607  uint64_t JumpSlotReloc = 0;
608  switch (Triple.getArch()) {
609  case Triple::x86:
610  JumpSlotReloc = ELF::R_386_JUMP_SLOT;
611  break;
612  case Triple::x86_64:
613  JumpSlotReloc = ELF::R_X86_64_JUMP_SLOT;
614  break;
615  case Triple::aarch64:
616  case Triple::aarch64_be:
617  JumpSlotReloc = ELF::R_AARCH64_JUMP_SLOT;
618  break;
619  default:
620  return {};
621  }
622  std::unique_ptr<const MCInstrInfo> MII(T->createMCInstrInfo());
623  std::unique_ptr<const MCInstrAnalysis> MIA(
624  T->createMCInstrAnalysis(MII.get()));
625  if (!MIA)
626  return {};
627  Optional<SectionRef> Plt = None, RelaPlt = None, GotPlt = None;
628  for (const SectionRef &Section : sections()) {
629  Expected<StringRef> NameOrErr = Section.getName();
630  if (!NameOrErr) {
631  consumeError(NameOrErr.takeError());
632  continue;
633  }
634  StringRef Name = *NameOrErr;
635 
636  if (Name == ".plt")
637  Plt = Section;
638  else if (Name == ".rela.plt" || Name == ".rel.plt")
639  RelaPlt = Section;
640  else if (Name == ".got.plt")
641  GotPlt = Section;
642  }
643  if (!Plt || !RelaPlt || !GotPlt)
644  return {};
645  Expected<StringRef> PltContents = Plt->getContents();
646  if (!PltContents) {
647  consumeError(PltContents.takeError());
648  return {};
649  }
650  auto PltEntries = MIA->findPltEntries(Plt->getAddress(),
651  arrayRefFromStringRef(*PltContents),
652  GotPlt->getAddress(), Triple);
653  // Build a map from GOT entry virtual address to PLT entry virtual address.
655  for (const auto &Entry : PltEntries)
656  GotToPlt.insert(std::make_pair(Entry.second, Entry.first));
657  // Find the relocations in the dynamic relocation table that point to
658  // locations in the GOT for which we know the corresponding PLT entry.
659  std::vector<std::pair<Optional<DataRefImpl>, uint64_t>> Result;
660  for (const auto &Relocation : RelaPlt->relocations()) {
661  if (Relocation.getType() != JumpSlotReloc)
662  continue;
663  auto PltEntryIter = GotToPlt.find(Relocation.getOffset());
664  if (PltEntryIter != GotToPlt.end()) {
665  symbol_iterator Sym = Relocation.getSymbol();
666  if (Sym == symbol_end())
667  Result.emplace_back(None, PltEntryIter->second);
668  else
669  Result.emplace_back(Sym->getRawDataRefImpl(), PltEntryIter->second);
670  }
671  }
672  return Result;
673 }
674 
675 template <class ELFT>
677 readBBAddrMapImpl(const ELFFile<ELFT> &EF,
678  Optional<unsigned> TextSectionIndex) {
679  using Elf_Shdr = typename ELFT::Shdr;
680  std::vector<BBAddrMap> BBAddrMaps;
681  const auto &Sections = cantFail(EF.sections());
682  for (const Elf_Shdr &Sec : Sections) {
683  if (Sec.sh_type != ELF::SHT_LLVM_BB_ADDR_MAP &&
684  Sec.sh_type != ELF::SHT_LLVM_BB_ADDR_MAP_V0)
685  continue;
686  if (TextSectionIndex) {
687  Expected<const Elf_Shdr *> TextSecOrErr = EF.getSection(Sec.sh_link);
688  if (!TextSecOrErr)
689  return createError("unable to get the linked-to section for " +
690  describe(EF, Sec) + ": " +
691  toString(TextSecOrErr.takeError()));
692  if (*TextSectionIndex != std::distance(Sections.begin(), *TextSecOrErr))
693  continue;
694  }
695  Expected<std::vector<BBAddrMap>> BBAddrMapOrErr = EF.decodeBBAddrMap(Sec);
696  if (!BBAddrMapOrErr)
697  return createError("unable to read " + describe(EF, Sec) + ": " +
698  toString(BBAddrMapOrErr.takeError()));
699  std::move(BBAddrMapOrErr->begin(), BBAddrMapOrErr->end(),
700  std::back_inserter(BBAddrMaps));
701  }
702  return BBAddrMaps;
703 }
704 
705 template <class ELFT>
707 readDynsymVersionsImpl(const ELFFile<ELFT> &EF,
709  using Elf_Shdr = typename ELFT::Shdr;
710  const Elf_Shdr *VerSec = nullptr;
711  const Elf_Shdr *VerNeedSec = nullptr;
712  const Elf_Shdr *VerDefSec = nullptr;
713  // The user should ensure sections() can't fail here.
714  for (const Elf_Shdr &Sec : cantFail(EF.sections())) {
715  if (Sec.sh_type == ELF::SHT_GNU_versym)
716  VerSec = &Sec;
717  else if (Sec.sh_type == ELF::SHT_GNU_verdef)
718  VerDefSec = &Sec;
719  else if (Sec.sh_type == ELF::SHT_GNU_verneed)
720  VerNeedSec = &Sec;
721  }
722  if (!VerSec)
723  return std::vector<VersionEntry>();
724 
726  EF.loadVersionMap(VerNeedSec, VerDefSec);
727  if (!MapOrErr)
728  return MapOrErr.takeError();
729 
730  std::vector<VersionEntry> Ret;
731  size_t I = 0;
732  for (const ELFSymbolRef &Sym : Symbols) {
733  ++I;
735  EF.template getEntry<typename ELFT::Versym>(*VerSec, I);
736  if (!VerEntryOrErr)
737  return createError("unable to read an entry with index " + Twine(I) +
738  " from " + describe(EF, *VerSec) + ": " +
739  toString(VerEntryOrErr.takeError()));
740 
741  Expected<uint32_t> FlagsOrErr = Sym.getFlags();
742  if (!FlagsOrErr)
743  return createError("unable to read flags for symbol with index " +
744  Twine(I) + ": " + toString(FlagsOrErr.takeError()));
745 
746  bool IsDefault;
747  Expected<StringRef> VerOrErr = EF.getSymbolVersionByIndex(
748  (*VerEntryOrErr)->vs_index, IsDefault, *MapOrErr,
749  (*FlagsOrErr) & SymbolRef::SF_Undefined);
750  if (!VerOrErr)
751  return createError("unable to get a version for entry " + Twine(I) +
752  " of " + describe(EF, *VerSec) + ": " +
753  toString(VerOrErr.takeError()));
754 
755  Ret.push_back({(*VerOrErr).str(), IsDefault});
756  }
757 
758  return Ret;
759 }
760 
764  if (const auto *Obj = dyn_cast<ELF32LEObjectFile>(this))
765  return readDynsymVersionsImpl(Obj->getELFFile(), Symbols);
766  if (const auto *Obj = dyn_cast<ELF32BEObjectFile>(this))
767  return readDynsymVersionsImpl(Obj->getELFFile(), Symbols);
768  if (const auto *Obj = dyn_cast<ELF64LEObjectFile>(this))
769  return readDynsymVersionsImpl(Obj->getELFFile(), Symbols);
770  return readDynsymVersionsImpl(cast<ELF64BEObjectFile>(this)->getELFFile(),
771  Symbols);
772 }
773 
776  if (const auto *Obj = dyn_cast<ELF32LEObjectFile>(this))
777  return readBBAddrMapImpl(Obj->getELFFile(), TextSectionIndex);
778  if (const auto *Obj = dyn_cast<ELF64LEObjectFile>(this))
779  return readBBAddrMapImpl(Obj->getELFFile(), TextSectionIndex);
780  if (const auto *Obj = dyn_cast<ELF32BEObjectFile>(this))
781  return readBBAddrMapImpl(Obj->getELFFile(), TextSectionIndex);
782  if (const auto *Obj = cast<ELF64BEObjectFile>(this))
783  return readBBAddrMapImpl(Obj->getELFFile(), TextSectionIndex);
784  else
785  llvm_unreachable("Unsupported binary format");
786 }
llvm::ELF::EF_AMDGPU_MACH_R600_SUMO
@ EF_AMDGPU_MACH_R600_SUMO
Definition: ELF.h:718
llvm::ELF::EF_AMDGPU_MACH
@ EF_AMDGPU_MACH
Definition: ELF.h:697
llvm::ELF::STT_FUNC
@ STT_FUNC
Definition: ELF.h:1205
llvm::object::describe
static std::string describe(const ELFFile< ELFT > &Obj, const typename ELFT::Shdr &Sec)
Definition: ELF.h:141
llvm::ELF::EF_MIPS_ARCH_2
@ EF_MIPS_ARCH_2
Definition: ELF.h:554
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX1031
@ EF_AMDGPU_MACH_AMDGCN_GFX1031
Definition: ELF.h:757
llvm::MemoryBufferRef::getBufferStart
const char * getBufferStart() const
Definition: MemoryBufferRef.h:35
MathExtras.h
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:17
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX1030
@ EF_AMDGPU_MACH_AMDGCN_GFX1030
Definition: ELF.h:756
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX1036
@ EF_AMDGPU_MACH_AMDGCN_GFX1036
Definition: ELF.h:771
llvm::ARMBuildAttrs::Not_Allowed
@ Not_Allowed
Definition: ARMBuildAttributes.h:125
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX703
@ EF_AMDGPU_MACH_AMDGCN_GFX703
Definition: ELF.h:739
llvm::RISCVAttributeParser
Definition: RISCVAttributeParser.h:16
llvm::ELF::EF_AMDGPU_MACH_R600_RV730
@ EF_AMDGPU_MACH_R600_RV730
Definition: ELF.h:711
llvm::ELF::EF_MIPS_ARCH_1
@ EF_MIPS_ARCH_1
Definition: ELF.h:553
llvm::ARMBuildAttrs::v7E_M
@ v7E_M
Definition: ARMBuildAttributes.h:106
llvm::ARMBuildAttrs::Advanced_SIMD_arch
@ Advanced_SIMD_arch
Definition: ARMBuildAttributes.h:45
llvm::ELF::EF_MIPS_ARCH_5
@ EF_MIPS_ARCH_5
Definition: ELF.h:557
T
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX601
@ EF_AMDGPU_MACH_AMDGCN_GFX601
Definition: ELF.h:735
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX1011
@ EF_AMDGPU_MACH_AMDGCN_GFX1011
Definition: ELF.h:754
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX90C
@ EF_AMDGPU_MACH_AMDGCN_GFX90C
Definition: ELF.h:752
llvm::Triple::x86
@ x86
Definition: Triple.h:85
llvm::object::Binary::isLittleEndian
bool isLittleEndian() const
Definition: Binary.h:152
llvm::SubtargetFeatures::AddFeature
void AddFeature(StringRef String, bool Enable=true)
Adds Features.
Definition: SubtargetFeature.cpp:37
llvm::object::ELFObjectFileBase::getPltAddresses
std::vector< std::pair< Optional< DataRefImpl >, uint64_t > > getPltAddresses() const
Definition: ELFObjectFile.cpp:601
llvm::ARMBuildAttrs::ApplicationProfile
@ ApplicationProfile
Definition: ARMBuildAttributes.h:117
llvm::ARMBuildAttrs::CPU_arch_profile
@ CPU_arch_profile
Definition: ARMBuildAttributes.h:40
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX1013
@ EF_AMDGPU_MACH_AMDGCN_GFX1013
Definition: ELF.h:768
llvm::object::ELFObjectFileBase::readDynsymVersions
Expected< std::vector< VersionEntry > > readDynsymVersions() const
Returns a vector containing a symbol version for each dynamic symbol.
Definition: ELFObjectFile.cpp:762
llvm::object::ELFObjectFileBase::getBuildAttributes
virtual Error getBuildAttributes(ELFAttributeParser &Attributes) const =0
ErrorHandling.h
llvm::ELF::EF_MIPS_ARCH_4
@ EF_MIPS_ARCH_4
Definition: ELF.h:556
llvm::ARMBuildAttrs::AllowDIVExt
@ AllowDIVExt
Definition: ARMBuildAttributes.h:238
llvm::ARMBuildAttrs::AllowNeon2
@ AllowNeon2
Definition: ARMBuildAttributes.h:150
llvm::object::ELFObjectFileBase::getEMachine
virtual uint16_t getEMachine() const =0
llvm::ARMBuildAttrs::v8_1_M_Main
@ v8_1_M_Main
Definition: ARMBuildAttributes.h:111
llvm::ELF::STT_GNU_IFUNC
@ STT_GNU_IFUNC
Definition: ELF.h:1210
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX1103
@ EF_AMDGPU_MACH_AMDGCN_GFX1103
Definition: ELF.h:770
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX1100
@ EF_AMDGPU_MACH_AMDGCN_GFX1100
Definition: ELF.h:767
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX805
@ EF_AMDGPU_MACH_AMDGCN_GFX805
Definition: ELF.h:762
llvm::ELF::SHT_GNU_versym
@ SHT_GNU_versym
Definition: ELF.h:1000
llvm::StringRef::consume_front
bool consume_front(StringRef Prefix)
Returns true if this StringRef has the given prefix and removes that prefix.
Definition: StringRef.h:686
llvm::ARMBuildAttrs::v7
@ v7
Definition: ARMBuildAttributes.h:103
llvm::Triple
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:44
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX602
@ EF_AMDGPU_MACH_AMDGCN_GFX602
Definition: ELF.h:760
llvm::Type
The instances of the Type class are immutable: once they are created, they are never changed.
Definition: Type.h:45
llvm::object::NumElfSymbolTypes
constexpr int NumElfSymbolTypes
Definition: ELFObjectFile.h:46
llvm::Triple::x86_64
@ x86_64
Definition: Triple.h:86
readDynsymVersionsImpl
static Expected< std::vector< VersionEntry > > readDynsymVersionsImpl(const ELFFile< ELFT > &EF, ELFObjectFileBase::elf_symbol_iterator_range Symbols)
Definition: ELFObjectFile.cpp:707
llvm::Optional< unsigned >
llvm::ARMAttributeParser
Definition: ARMAttributeParser.h:21
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX802
@ EF_AMDGPU_MACH_AMDGCN_GFX802
Definition: ELF.h:743
llvm::ELF::STT_TLS
@ STT_TLS
Definition: ELF.h:1209
llvm::ELF::EF_AMDGPU_MACH_R600_RS880
@ EF_AMDGPU_MACH_R600_RS880
Definition: ELF.h:707
llvm::MipsISD::Ret
@ Ret
Definition: MipsISelLowering.h:119
RISCVAttributes.h
llvm::Expected
Tagged union holding either a T or a Error.
Definition: APFloat.h:41
createPtr
static Expected< std::unique_ptr< ELFObjectFile< ELFT > > > createPtr(MemoryBufferRef Object, bool InitContent)
Definition: ELFObjectFile.cpp:62
llvm::ELF::EF_AMDGPU_MACH_R600_RV710
@ EF_AMDGPU_MACH_R600_RV710
Definition: ELF.h:710
llvm::TargetRegistry::lookupTarget
static const Target * lookupTarget(const std::string &Triple, std::string &Error)
lookupTarget - Lookup a target based on a target triple.
Definition: TargetRegistry.cpp:62
readBBAddrMapImpl
Expected< std::vector< BBAddrMap > > readBBAddrMapImpl(const ELFFile< ELFT > &EF, Optional< unsigned > TextSectionIndex)
Definition: ELFObjectFile.cpp:677
llvm::consumeError
void consumeError(Error Err)
Consume a Error without doing anything.
Definition: Error.h:1043
llvm::MemoryBufferRef
Definition: MemoryBufferRef.h:22
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX908
@ EF_AMDGPU_MACH_AMDGCN_GFX908
Definition: ELF.h:750
llvm::EnumEntry
Definition: EnumTables.h:18
llvm::object::SymbolicFile::symbol_end
virtual basic_symbol_iterator symbol_end() const =0
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX900
@ EF_AMDGPU_MACH_AMDGCN_GFX900
Definition: ELF.h:746
ARMAttributeParser.h
llvm::object::ELFObjectFileBase::getPlatformFlags
virtual unsigned getPlatformFlags() const =0
Returns platform-specific object flags, if any.
llvm::ARMBuildAttrs::v5TE
@ v5TE
Definition: ARMBuildAttributes.h:97
Error.h
SubtargetFeature.h
ELF.h
llvm::ELF::EM_ARM
@ EM_ARM
Definition: ELF.h:156
llvm::StringRef::take_front
LLVM_NODISCARD StringRef take_front(size_t N=1) const
Return a StringRef equal to 'this' but with only the first N elements remaining.
Definition: StringRef.h:624
llvm::object::BasicSymbolRef::getRawDataRefImpl
DataRefImpl getRawDataRefImpl() const
Definition: SymbolicFile.h:208
llvm::Triple::str
const std::string & str() const
Definition: Triple.h:404
E
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX940
@ EF_AMDGPU_MACH_AMDGCN_GFX940
Definition: ELF.h:766
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX810
@ EF_AMDGPU_MACH_AMDGCN_GFX810
Definition: ELF.h:745
llvm::ARMBuildAttrs::AllowMVEInteger
@ AllowMVEInteger
Definition: ARMBuildAttributes.h:155
llvm::ELF::EF_AMDGPU_MACH_R600_REDWOOD
@ EF_AMDGPU_MACH_R600_REDWOOD
Definition: ELF.h:717
llvm::SubtargetFeatures
Manages the enabling and disabling of subtarget specific features.
Definition: SubtargetFeature.h:183
llvm::ARMBuildAttrs::FP_arch
@ FP_arch
Definition: ARMBuildAttributes.h:43
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX1010
@ EF_AMDGPU_MACH_AMDGCN_GFX1010
Definition: ELF.h:753
llvm::ARMBuildAttrs::v6K
@ v6K
Definition: ARMBuildAttributes.h:102
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX704
@ EF_AMDGPU_MACH_AMDGCN_GFX704
Definition: ELF.h:740
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX1012
@ EF_AMDGPU_MACH_AMDGCN_GFX1012
Definition: ELF.h:755
llvm::ELF::EF_AMDGPU_MACH_R600_JUNIPER
@ EF_AMDGPU_MACH_R600_JUNIPER
Definition: ELF.h:716
llvm::ELF::EF_MIPS_ARCH_64R6
@ EF_MIPS_ARCH_64R6
Definition: ELF.h:563
llvm::ARMBuildAttrs::RealTimeProfile
@ RealTimeProfile
Definition: ARMBuildAttributes.h:118
llvm::ARMBuildAttrs::v8_M_Main
@ v8_M_Main
Definition: ARMBuildAttributes.h:110
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX1034
@ EF_AMDGPU_MACH_AMDGCN_GFX1034
Definition: ELF.h:764
llvm::ELF::EF_MIPS_MACH
@ EF_MIPS_MACH
Definition: ELF.h:544
llvm::StringRef::drop_until
LLVM_NODISCARD StringRef drop_until(function_ref< bool(char)> F) const
Return a StringRef equal to 'this', but with all characters not satisfying the given predicate droppe...
Definition: StringRef.h:680
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX909
@ EF_AMDGPU_MACH_AMDGCN_GFX909
Definition: ELF.h:751
llvm::ELF::EF_MIPS_MACH_NONE
@ EF_MIPS_MACH_NONE
Definition: ELF.h:525
llvm::object::ObjectFile::createELFObjectFile
static Expected< std::unique_ptr< ObjectFile > > createELFObjectFile(MemoryBufferRef Object, bool InitContent=true)
Definition: ELFObjectFile.cpp:70
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX705
@ EF_AMDGPU_MACH_AMDGCN_GFX705
Definition: ELF.h:761
llvm::object::ELFObjectFile::create
static Expected< ELFObjectFile< ELFT > > create(MemoryBufferRef Object, bool InitContent=true)
Definition: ELFObjectFile.h:1089
llvm::Triple::getArch
ArchType getArch() const
Get the parsed architecture type of this triple.
Definition: Triple.h:345
llvm::ELF::EM_RISCV
@ EM_RISCV
Definition: ELF.h:317
llvm::ELF::STT_SECTION
@ STT_SECTION
Definition: ELF.h:1206
c
the resulting code requires compare and branches when and if the revised code is with conditional branches instead of More there is a byte word extend before each where there should be only and the condition codes are not remembered when the same two values are compared twice More LSR enhancements i8 and i32 load store addressing modes are identical int int c
Definition: README.txt:418
llvm::None
const NoneType None
Definition: None.h:24
llvm::ELF::EF_MIPS_ARCH_3
@ EF_MIPS_ARCH_3
Definition: ELF.h:555
llvm::object::ELFObjectFileBase::getDynamicSymbolIterators
virtual elf_symbol_iterator_range getDynamicSymbolIterators() const =0
llvm::ARMBuildAttrs::AllowThumb32
@ AllowThumb32
Definition: ARMBuildAttributes.h:131
llvm::ARMBuildAttrs::v6_M
@ v6_M
Definition: ARMBuildAttributes.h:104
llvm::StringRef::drop_while
LLVM_NODISCARD StringRef drop_while(function_ref< bool(char)> F) const
Return a StringRef equal to 'this', but with all characters satisfying the given predicate dropped fr...
Definition: StringRef.h:673
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::ELF::EF_MIPS_ARCH_32R2
@ EF_MIPS_ARCH_32R2
Definition: ELF.h:560
llvm::ELF::EF_MIPS_ARCH_64
@ EF_MIPS_ARCH_64
Definition: ELF.h:559
llvm::object::ElfSymbolTypes
const llvm::EnumEntry< unsigned > ElfSymbolTypes[NumElfSymbolTypes]
Definition: ELFObjectFile.cpp:38
llvm::Triple::isThumb
bool isThumb() const
Tests whether the target is Thumb (little and big endian).
Definition: Triple.h:751
llvm::ARMBuildAttrs::THUMB_ISA_use
@ THUMB_ISA_use
Definition: ARMBuildAttributes.h:42
object
bar al al movzbl eax ret Missed when stored in a memory object
Definition: README.txt:1411
llvm::ARMBuildAttrs::AllowFPv3A
@ AllowFPv3A
Definition: ARMBuildAttributes.h:136
llvm::StringRef::empty
constexpr LLVM_NODISCARD bool empty() const
empty - Check if the string is empty.
Definition: StringRef.h:153
uint64_t
llvm::ELF::EF_AMDGPU_MACH_R600_R630
@ EF_AMDGPU_MACH_R600_R630
Definition: ELF.h:706
llvm::object::symbol_iterator
Definition: ObjectFile.h:207
ELF.h
llvm::object::ELFObjectFileBase::getFeatures
SubtargetFeatures getFeatures() const override
Definition: ELFObjectFile.cpp:344
llvm::ARMBuildAttrs::AllowFPv4B
@ AllowFPv4B
Definition: ARMBuildAttributes.h:139
llvm::ELF::STT_NOTYPE
@ STT_NOTYPE
Definition: ELF.h:1203
llvm::ELF::EM_PPC64
@ EM_PPC64
Definition: ELF.h:149
llvm::ELF::EF_AMDGPU_MACH_R600_CYPRESS
@ EF_AMDGPU_MACH_R600_CYPRESS
Definition: ELF.h:715
llvm::ARMBuildAttrs::AllowFPv3B
@ AllowFPv3B
Definition: ARMBuildAttributes.h:137
move
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
Definition: README.txt:546
llvm::ELF::EM_MIPS
@ EM_MIPS
Definition: ELF.h:141
llvm::DenseMap
Definition: DenseMap.h:716
llvm::ARMBuildAttrs::v9_A
@ v9_A
Definition: ARMBuildAttributes.h:112
llvm::ELF::EF_AMDGPU_MACH_R600_CAYMAN
@ EF_AMDGPU_MACH_R600_CAYMAN
Definition: ELF.h:722
I
#define I(x, y, z)
Definition: MD5.cpp:58
llvm::object::ELFObjectFileBase::readBBAddrMap
Expected< std::vector< BBAddrMap > > readBBAddrMap(Optional< unsigned > TextSectionIndex=None) const
Returns a vector of all BB address maps in the object file. When.
Definition: ELFObjectFile.cpp:775
llvm::object::BasicSymbolRef::SF_Undefined
@ SF_Undefined
Definition: SymbolicFile.h:110
llvm::ARMBuildAttrs::v6KZ
@ v6KZ
Definition: ARMBuildAttributes.h:100
RISCVAttributeParser.h
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX1032
@ EF_AMDGPU_MACH_AMDGCN_GFX1032
Definition: ELF.h:758
Attributes
AMDGPU Kernel Attributes
Definition: AMDGPULowerKernelAttributes.cpp:244
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX702
@ EF_AMDGPU_MACH_AMDGCN_GFX702
Definition: ELF.h:738
llvm::ELF::EF_MIPS_MICROMIPS
@ EF_MIPS_MICROMIPS
Definition: ELF.h:547
llvm::DenseMapBase< DenseMap< KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >, KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >::find
iterator find(const_arg_type_t< KeyT > Val)
Definition: DenseMap.h:152
llvm::ELF::SHT_LLVM_BB_ADDR_MAP
@ SHT_LLVM_BB_ADDR_MAP
Definition: ELF.h:992
llvm::ELF::EF_MIPS_ARCH_32R6
@ EF_MIPS_ARCH_32R6
Definition: ELF.h:562
assert
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
llvm::Optional::getValue
constexpr const T & getValue() const &
Definition: Optional.h:306
llvm::ARMBuildAttrs::MicroControllerProfile
@ MicroControllerProfile
Definition: ARMBuildAttributes.h:119
llvm::object::ELFObjectFileBase::elf_symbol_iterator_range
iterator_range< elf_symbol_iterator > elf_symbol_iterator_range
Definition: ELFObjectFile.h:78
ELFTypes.h
llvm::MemoryBufferRef::getBuffer
StringRef getBuffer() const
Definition: MemoryBufferRef.h:32
llvm::ARMBuildAttrs::DisallowDIV
@ DisallowDIV
Definition: ARMBuildAttributes.h:237
llvm::ARMBuildAttrs::AllowFPv4A
@ AllowFPv4A
Definition: ARMBuildAttributes.h:138
llvm::ELF::EM_AMDGPU
@ EM_AMDGPU
Definition: ELF.h:316
llvm::ELF::EF_MIPS_MACH_OCTEON
@ EF_MIPS_MACH_OCTEON
Definition: ELF.h:533
llvm::object::ObjectFile::makeTriple
Triple makeTriple() const
Create a triple from the data in this object file.
Definition: ObjectFile.cpp:104
llvm::ELF::EF_AMDGPU_MACH_R600_TURKS
@ EF_AMDGPU_MACH_R600_TURKS
Definition: ELF.h:723
Triple.h
llvm::ELF::EF_MIPS_ARCH
@ EF_MIPS_ARCH
Definition: ELF.h:564
llvm::Sched::Source
@ Source
Definition: TargetLowering.h:99
llvm::ARMBuildAttrs::v6
@ v6
Definition: ARMBuildAttributes.h:99
MCInstrAnalysis.h
llvm::ARMBuildAttrs::v6T2
@ v6T2
Definition: ARMBuildAttributes.h:101
llvm::countTrailingZeros
unsigned countTrailingZeros(T Val, ZeroBehavior ZB=ZB_Width)
Count number of 0's from the least significant bit to the most stopping at the first 1.
Definition: MathExtras.h:156
llvm::Triple::aarch64_be
@ aarch64_be
Definition: Triple.h:52
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:58
llvm::object::ObjectFile
This class is the base class for all object file types.
Definition: ObjectFile.h:228
llvm::ELF::EF_MIPS_ARCH_32
@ EF_MIPS_ARCH_32
Definition: ELF.h:558
llvm::ELF::ELFDATA2LSB
@ ELFDATA2LSB
Definition: ELF.h:335
llvm_unreachable
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Definition: ErrorHandling.h:143
llvm::ARMBuildAttrs::v4
@ v4
Definition: ARMBuildAttributes.h:94
llvm::ARMBuildAttrs::DIV_use
@ DIV_use
Definition: ARMBuildAttributes.h:70
llvm::cantFail
void cantFail(Error Err, const char *Msg=nullptr)
Report a fatal error if Err is a failure value.
Definition: Error.h:745
llvm::RISCVAttrs::ARCH
@ ARCH
Definition: RISCVAttributes.h:30
llvm::ARMBuildAttrs::AllowMVEIntegerAndFloat
@ AllowMVEIntegerAndFloat
Definition: ARMBuildAttributes.h:156
llvm::ARMBuildAttrs::AllowFPv2
@ AllowFPv2
Definition: ARMBuildAttributes.h:135
LLVM_FALLTHROUGH
#define LLVM_FALLTHROUGH
LLVM_FALLTHROUGH - Mark fallthrough cases in switch statements.
Definition: Compiler.h:280
llvm::DenseMapBase< DenseMap< KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >, KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >::insert
std::pair< iterator, bool > insert(const std::pair< KeyT, ValueT > &KV)
Definition: DenseMap.h:209
llvm::ARMBuildAttrs::v8_A
@ v8_A
Definition: ARMBuildAttributes.h:107
llvm::ELF::EF_MIPS_ARCH_64R2
@ EF_MIPS_ARCH_64R2
Definition: ELF.h:561
llvm::ELF::EF_AMDGPU_MACH_R600_RV770
@ EF_AMDGPU_MACH_R600_RV770
Definition: ELF.h:712
ELFObjectFile.h
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX1035
@ EF_AMDGPU_MACH_AMDGCN_GFX1035
Definition: ELF.h:763
llvm::ARMBuildAttrs::MVE_arch
@ MVE_arch
Definition: ARMBuildAttributes.h:72
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX801
@ EF_AMDGPU_MACH_AMDGCN_GFX801
Definition: ELF.h:742
llvm::Twine
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition: Twine.h:83
llvm::ELF::SHT_GNU_verdef
@ SHT_GNU_verdef
Definition: ELF.h:998
llvm::GraphProgram::Name
Name
Definition: GraphWriter.h:50
llvm::ELF::EF_AMDGPU_MACH_R600_CAICOS
@ EF_AMDGPU_MACH_R600_CAICOS
Definition: ELF.h:721
llvm::ARMBuildAttrs::v8_R
@ v8_R
Definition: ARMBuildAttributes.h:108
llvm::Triple::getSubArch
SubArchType getSubArch() const
get the parsed subarchitecture type for this triple.
Definition: Triple.h:348
llvm::DenseMapBase< DenseMap< KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >, KeyT, ValueT, DenseMapInfo< KeyT >, llvm::detail::DenseMapPair< KeyT, ValueT > >::end
iterator end()
Definition: DenseMap.h:84
llvm::toString
const char * toString(DWARFSectionKind Kind)
Definition: DWARFUnitIndex.h:67
llvm::object::ELFObjectFileBase::setARMSubArch
void setARMSubArch(Triple &TheTriple) const override
Definition: ELFObjectFile.cpp:506
llvm::Error
Lightweight error class with error context and mandatory checking.
Definition: Error.h:155
llvm::ELF::STT_OBJECT
@ STT_OBJECT
Definition: ELF.h:1204
llvm::ARMBuildAttrs::v5T
@ v5T
Definition: ARMBuildAttributes.h:96
llvm::ELF::ELFDATA2MSB
@ ELFDATA2MSB
Definition: ELF.h:336
llvm::ELF::SHT_GNU_verneed
@ SHT_GNU_verneed
Definition: ELF.h:999
llvm::ELF::EF_AMDGPU_MACH_R600_RV670
@ EF_AMDGPU_MACH_R600_RV670
Definition: ELF.h:708
llvm::ELF::SHT_LLVM_BB_ADDR_MAP_V0
@ SHT_LLVM_BB_ADDR_MAP_V0
Definition: ELF.h:988
llvm::ARMBuildAttrs::CPU_arch
@ CPU_arch
Definition: ARMBuildAttributes.h:39
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX803
@ EF_AMDGPU_MACH_AMDGCN_GFX803
Definition: ELF.h:744
llvm::ARMBuildAttrs::v8_M_Base
@ v8_M_Base
Definition: ARMBuildAttributes.h:109
ARMBuildAttributes.h
llvm::ELF::EF_MIPS_ARCH_ASE_M16
@ EF_MIPS_ARCH_ASE_M16
Definition: ELF.h:548
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX906
@ EF_AMDGPU_MACH_AMDGCN_GFX906
Definition: ELF.h:749
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX701
@ EF_AMDGPU_MACH_AMDGCN_GFX701
Definition: ELF.h:737
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX600
@ EF_AMDGPU_MACH_AMDGCN_GFX600
Definition: ELF.h:734
llvm::Expected::takeError
Error takeError()
Take ownership of the stored error.
Definition: Error.h:597
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX1102
@ EF_AMDGPU_MACH_AMDGCN_GFX1102
Definition: ELF.h:773
llvm::Triple::setArchName
void setArchName(StringRef Str)
Set the architecture (first) component of the triple by name.
Definition: Triple.cpp:1339
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX700
@ EF_AMDGPU_MACH_AMDGCN_GFX700
Definition: ELF.h:736
llvm::ARMBuildAttrs::v5TEJ
@ v5TEJ
Definition: ARMBuildAttributes.h:98
llvm::ELF::ELFCLASS64
@ ELFCLASS64
Definition: ELF.h:329
llvm::ARMBuildAttrs::v4T
@ v4T
Definition: ARMBuildAttributes.h:95
llvm::iterator_range
A range adaptor for a pair of iterators.
Definition: iterator_range.h:30
llvm::object::ObjectFile::sections
section_iterator_range sections() const
Definition: ObjectFile.h:327
llvm::ELF::EF_AMDGPU_MACH_R600_BARTS
@ EF_AMDGPU_MACH_R600_BARTS
Definition: ELF.h:720
llvm::ELF::STT_FILE
@ STT_FILE
Definition: ELF.h:1207
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX1033
@ EF_AMDGPU_MACH_AMDGCN_GFX1033
Definition: ELF.h:759
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX1101
@ EF_AMDGPU_MACH_AMDGCN_GFX1101
Definition: ELF.h:772
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX90A
@ EF_AMDGPU_MACH_AMDGCN_GFX90A
Definition: ELF.h:765
llvm::object::createError
Error createError(const Twine &Err)
Definition: Error.h:84
llvm::object::getElfArchType
std::pair< unsigned char, unsigned char > getElfArchType(StringRef Object)
Definition: ELF.h:76
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX902
@ EF_AMDGPU_MACH_AMDGCN_GFX902
Definition: ELF.h:747
llvm::ELF::ELFCLASS32
@ ELFCLASS32
Definition: ELF.h:328
llvm::ELF::EF_AMDGPU_MACH_R600_CEDAR
@ EF_AMDGPU_MACH_R600_CEDAR
Definition: ELF.h:714
llvm::Triple::NoSubArch
@ NoSubArch
Definition: Triple.h:111
llvm::ARMBuildAttrs::AllowNeon
@ AllowNeon
Definition: ARMBuildAttributes.h:149
llvm::ARMBuildAttrs::v6S_M
@ v6S_M
Definition: ARMBuildAttributes.h:105
llvm::object::ELFObjectFileBase::tryGetCPUName
Optional< StringRef > tryGetCPUName() const override
Definition: ELFObjectFile.cpp:357
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX904
@ EF_AMDGPU_MACH_AMDGCN_GFX904
Definition: ELF.h:748
TargetRegistry.h
llvm::ELF::EF_RISCV_RVC
@ EF_RISCV_RVC
Definition: ELF.h:663
llvm::ELF::EF_AMDGPU_MACH_R600_R600
@ EF_AMDGPU_MACH_R600_R600
Definition: ELF.h:705
llvm::ELF::STT_COMMON
@ STT_COMMON
Definition: ELF.h:1208
llvm::object::ELFObjectFileBase::ELFObjectFileBase
ELFObjectFileBase(unsigned int Type, MemoryBufferRef Source)
Definition: ELFObjectFile.cpp:57
llvm::Triple::aarch64
@ aarch64
Definition: Triple.h:51
Shdr
Elf_Shdr Shdr
Definition: ELFObjHandler.cpp:77