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.hasValue())
171  isV7 = Attr.getValue() == ARMBuildAttrs::v7;
172 
173  Attr = Attributes.getAttributeValue(ARMBuildAttrs::CPU_arch_profile);
174  if (Attr.hasValue()) {
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.hasValue()) {
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.hasValue()) {
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.hasValue()) {
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.hasValue()) {
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.hasValue()) {
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.hasValue()) {
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.getValue();
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  default:
362  return None;
363  }
364 }
365 
366 StringRef ELFObjectFileBase::getAMDGPUCPUName() const {
368  unsigned CPU = getPlatformFlags() & ELF::EF_AMDGPU_MACH;
369 
370  switch (CPU) {
371  // Radeon HD 2000/3000 Series (R600).
373  return "r600";
375  return "r630";
377  return "rs880";
379  return "rv670";
380 
381  // Radeon HD 4000 Series (R700).
383  return "rv710";
385  return "rv730";
387  return "rv770";
388 
389  // Radeon HD 5000 Series (Evergreen).
391  return "cedar";
393  return "cypress";
395  return "juniper";
397  return "redwood";
399  return "sumo";
400 
401  // Radeon HD 6000 Series (Northern Islands).
403  return "barts";
405  return "caicos";
407  return "cayman";
409  return "turks";
410 
411  // AMDGCN GFX6.
413  return "gfx600";
415  return "gfx601";
417  return "gfx602";
418 
419  // AMDGCN GFX7.
421  return "gfx700";
423  return "gfx701";
425  return "gfx702";
427  return "gfx703";
429  return "gfx704";
431  return "gfx705";
432 
433  // AMDGCN GFX8.
435  return "gfx801";
437  return "gfx802";
439  return "gfx803";
441  return "gfx805";
443  return "gfx810";
444 
445  // AMDGCN GFX9.
447  return "gfx900";
449  return "gfx902";
451  return "gfx904";
453  return "gfx906";
455  return "gfx908";
457  return "gfx909";
459  return "gfx90a";
461  return "gfx90c";
463  return "gfx940";
464 
465  // AMDGCN GFX10.
467  return "gfx1010";
469  return "gfx1011";
471  return "gfx1012";
473  return "gfx1013";
475  return "gfx1030";
477  return "gfx1031";
479  return "gfx1032";
481  return "gfx1033";
483  return "gfx1034";
485  return "gfx1035";
487  return "gfx1036";
488 
489  // AMDGCN GFX11.
491  return "gfx1100";
493  return "gfx1101";
495  return "gfx1102";
497  return "gfx1103";
498  default:
499  llvm_unreachable("Unknown EF_AMDGPU_MACH value");
500  }
501 }
502 
503 // FIXME Encode from a tablegen description or target parser.
504 void ELFObjectFileBase::setARMSubArch(Triple &TheTriple) const {
505  if (TheTriple.getSubArch() != Triple::NoSubArch)
506  return;
507 
510  // TODO Propagate Error.
512  return;
513  }
514 
515  std::string Triple;
516  // Default to ARM, but use the triple if it's been set.
517  if (TheTriple.isThumb())
518  Triple = "thumb";
519  else
520  Triple = "arm";
521 
522  Optional<unsigned> Attr =
523  Attributes.getAttributeValue(ARMBuildAttrs::CPU_arch);
524  if (Attr.hasValue()) {
525  switch (Attr.getValue()) {
526  case ARMBuildAttrs::v4:
527  Triple += "v4";
528  break;
529  case ARMBuildAttrs::v4T:
530  Triple += "v4t";
531  break;
532  case ARMBuildAttrs::v5T:
533  Triple += "v5t";
534  break;
535  case ARMBuildAttrs::v5TE:
536  Triple += "v5te";
537  break;
539  Triple += "v5tej";
540  break;
541  case ARMBuildAttrs::v6:
542  Triple += "v6";
543  break;
544  case ARMBuildAttrs::v6KZ:
545  Triple += "v6kz";
546  break;
547  case ARMBuildAttrs::v6T2:
548  Triple += "v6t2";
549  break;
550  case ARMBuildAttrs::v6K:
551  Triple += "v6k";
552  break;
553  case ARMBuildAttrs::v7: {
554  Optional<unsigned> ArchProfileAttr =
555  Attributes.getAttributeValue(ARMBuildAttrs::CPU_arch_profile);
556  if (ArchProfileAttr.hasValue() &&
557  ArchProfileAttr.getValue() == ARMBuildAttrs::MicroControllerProfile)
558  Triple += "v7m";
559  else
560  Triple += "v7";
561  break;
562  }
563  case ARMBuildAttrs::v6_M:
564  Triple += "v6m";
565  break;
567  Triple += "v6sm";
568  break;
570  Triple += "v7em";
571  break;
572  case ARMBuildAttrs::v8_A:
573  Triple += "v8a";
574  break;
575  case ARMBuildAttrs::v8_R:
576  Triple += "v8r";
577  break;
579  Triple += "v8m.base";
580  break;
582  Triple += "v8m.main";
583  break;
585  Triple += "v8.1m.main";
586  break;
587  case ARMBuildAttrs::v9_A:
588  Triple += "v9a";
589  break;
590  }
591  }
592  if (!isLittleEndian())
593  Triple += "eb";
594 
595  TheTriple.setArchName(Triple);
596 }
597 
598 std::vector<std::pair<Optional<DataRefImpl>, uint64_t>>
600  std::string Err;
601  const auto Triple = makeTriple();
602  const auto *T = TargetRegistry::lookupTarget(Triple.str(), Err);
603  if (!T)
604  return {};
605  uint64_t JumpSlotReloc = 0;
606  switch (Triple.getArch()) {
607  case Triple::x86:
608  JumpSlotReloc = ELF::R_386_JUMP_SLOT;
609  break;
610  case Triple::x86_64:
611  JumpSlotReloc = ELF::R_X86_64_JUMP_SLOT;
612  break;
613  case Triple::aarch64:
614  case Triple::aarch64_be:
615  JumpSlotReloc = ELF::R_AARCH64_JUMP_SLOT;
616  break;
617  default:
618  return {};
619  }
620  std::unique_ptr<const MCInstrInfo> MII(T->createMCInstrInfo());
621  std::unique_ptr<const MCInstrAnalysis> MIA(
622  T->createMCInstrAnalysis(MII.get()));
623  if (!MIA)
624  return {};
625  Optional<SectionRef> Plt = None, RelaPlt = None, GotPlt = None;
626  for (const SectionRef &Section : sections()) {
627  Expected<StringRef> NameOrErr = Section.getName();
628  if (!NameOrErr) {
629  consumeError(NameOrErr.takeError());
630  continue;
631  }
632  StringRef Name = *NameOrErr;
633 
634  if (Name == ".plt")
635  Plt = Section;
636  else if (Name == ".rela.plt" || Name == ".rel.plt")
637  RelaPlt = Section;
638  else if (Name == ".got.plt")
639  GotPlt = Section;
640  }
641  if (!Plt || !RelaPlt || !GotPlt)
642  return {};
643  Expected<StringRef> PltContents = Plt->getContents();
644  if (!PltContents) {
645  consumeError(PltContents.takeError());
646  return {};
647  }
648  auto PltEntries = MIA->findPltEntries(Plt->getAddress(),
649  arrayRefFromStringRef(*PltContents),
650  GotPlt->getAddress(), Triple);
651  // Build a map from GOT entry virtual address to PLT entry virtual address.
653  for (const auto &Entry : PltEntries)
654  GotToPlt.insert(std::make_pair(Entry.second, Entry.first));
655  // Find the relocations in the dynamic relocation table that point to
656  // locations in the GOT for which we know the corresponding PLT entry.
657  std::vector<std::pair<Optional<DataRefImpl>, uint64_t>> Result;
658  for (const auto &Relocation : RelaPlt->relocations()) {
659  if (Relocation.getType() != JumpSlotReloc)
660  continue;
661  auto PltEntryIter = GotToPlt.find(Relocation.getOffset());
662  if (PltEntryIter != GotToPlt.end()) {
663  symbol_iterator Sym = Relocation.getSymbol();
664  if (Sym == symbol_end())
665  Result.emplace_back(None, PltEntryIter->second);
666  else
667  Result.emplace_back(Sym->getRawDataRefImpl(), PltEntryIter->second);
668  }
669  }
670  return Result;
671 }
672 
673 template <class ELFT>
675 readBBAddrMapImpl(const ELFFile<ELFT> &EF,
676  Optional<unsigned> TextSectionIndex) {
677  using Elf_Shdr = typename ELFT::Shdr;
678  std::vector<BBAddrMap> BBAddrMaps;
679  const auto &Sections = cantFail(EF.sections());
680  for (const Elf_Shdr &Sec : Sections) {
681  if (Sec.sh_type != ELF::SHT_LLVM_BB_ADDR_MAP)
682  continue;
683  if (TextSectionIndex) {
684  Expected<const Elf_Shdr *> TextSecOrErr = EF.getSection(Sec.sh_link);
685  if (!TextSecOrErr)
686  return createError("unable to get the linked-to section for " +
687  describe(EF, Sec) + ": " +
688  toString(TextSecOrErr.takeError()));
689  if (*TextSectionIndex != std::distance(Sections.begin(), *TextSecOrErr))
690  continue;
691  }
692  Expected<std::vector<BBAddrMap>> BBAddrMapOrErr = EF.decodeBBAddrMap(Sec);
693  if (!BBAddrMapOrErr)
694  return createError("unable to read " + describe(EF, Sec) + ": " +
695  toString(BBAddrMapOrErr.takeError()));
696  std::move(BBAddrMapOrErr->begin(), BBAddrMapOrErr->end(),
697  std::back_inserter(BBAddrMaps));
698  }
699  return BBAddrMaps;
700 }
701 
702 template <class ELFT>
704 readDynsymVersionsImpl(const ELFFile<ELFT> &EF,
706  using Elf_Shdr = typename ELFT::Shdr;
707  const Elf_Shdr *VerSec = nullptr;
708  const Elf_Shdr *VerNeedSec = nullptr;
709  const Elf_Shdr *VerDefSec = nullptr;
710  // The user should ensure sections() can't fail here.
711  for (const Elf_Shdr &Sec : cantFail(EF.sections())) {
712  if (Sec.sh_type == ELF::SHT_GNU_versym)
713  VerSec = &Sec;
714  else if (Sec.sh_type == ELF::SHT_GNU_verdef)
715  VerDefSec = &Sec;
716  else if (Sec.sh_type == ELF::SHT_GNU_verneed)
717  VerNeedSec = &Sec;
718  }
719  if (!VerSec)
720  return std::vector<VersionEntry>();
721 
723  EF.loadVersionMap(VerNeedSec, VerDefSec);
724  if (!MapOrErr)
725  return MapOrErr.takeError();
726 
727  std::vector<VersionEntry> Ret;
728  size_t I = 0;
729  for (const ELFSymbolRef &Sym : Symbols) {
730  ++I;
732  EF.template getEntry<typename ELFT::Versym>(*VerSec, I);
733  if (!VerEntryOrErr)
734  return createError("unable to read an entry with index " + Twine(I) +
735  " from " + describe(EF, *VerSec) + ": " +
736  toString(VerEntryOrErr.takeError()));
737 
738  Expected<uint32_t> FlagsOrErr = Sym.getFlags();
739  if (!FlagsOrErr)
740  return createError("unable to read flags for symbol with index " +
741  Twine(I) + ": " + toString(FlagsOrErr.takeError()));
742 
743  bool IsDefault;
744  Expected<StringRef> VerOrErr = EF.getSymbolVersionByIndex(
745  (*VerEntryOrErr)->vs_index, IsDefault, *MapOrErr,
746  (*FlagsOrErr) & SymbolRef::SF_Undefined);
747  if (!VerOrErr)
748  return createError("unable to get a version for entry " + Twine(I) +
749  " of " + describe(EF, *VerSec) + ": " +
750  toString(VerOrErr.takeError()));
751 
752  Ret.push_back({(*VerOrErr).str(), IsDefault});
753  }
754 
755  return Ret;
756 }
757 
761  if (const auto *Obj = dyn_cast<ELF32LEObjectFile>(this))
762  return readDynsymVersionsImpl(Obj->getELFFile(), Symbols);
763  if (const auto *Obj = dyn_cast<ELF32BEObjectFile>(this))
764  return readDynsymVersionsImpl(Obj->getELFFile(), Symbols);
765  if (const auto *Obj = dyn_cast<ELF64LEObjectFile>(this))
766  return readDynsymVersionsImpl(Obj->getELFFile(), Symbols);
767  return readDynsymVersionsImpl(cast<ELF64BEObjectFile>(this)->getELFFile(),
768  Symbols);
769 }
770 
773  if (const auto *Obj = dyn_cast<ELF32LEObjectFile>(this))
774  return readBBAddrMapImpl(Obj->getELFFile(), TextSectionIndex);
775  if (const auto *Obj = dyn_cast<ELF64LEObjectFile>(this))
776  return readBBAddrMapImpl(Obj->getELFFile(), TextSectionIndex);
777  if (const auto *Obj = dyn_cast<ELF32BEObjectFile>(this))
778  return readBBAddrMapImpl(Obj->getELFFile(), TextSectionIndex);
779  if (const auto *Obj = cast<ELF64BEObjectFile>(this))
780  return readBBAddrMapImpl(Obj->getELFFile(), TextSectionIndex);
781  else
782  llvm_unreachable("Unsupported binary format");
783 }
llvm::ARMBuildAttrs::AllowFPv2
@ AllowFPv2
Definition: ARMBuildAttributes.h:135
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX1010
@ EF_AMDGPU_MACH_AMDGCN_GFX1010
Definition: ELF.h:744
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX803
@ EF_AMDGPU_MACH_AMDGCN_GFX803
Definition: ELF.h:735
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_R600_CAYMAN
@ EF_AMDGPU_MACH_R600_CAYMAN
Definition: ELF.h:713
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_GFX1033
@ EF_AMDGPU_MACH_AMDGCN_GFX1033
Definition: ELF.h:750
llvm::ARMBuildAttrs::AllowFPv4B
@ AllowFPv4B
Definition: ARMBuildAttributes.h:139
llvm::ELF::EF_AMDGPU_MACH_R600_CAICOS
@ EF_AMDGPU_MACH_R600_CAICOS
Definition: ELF.h:712
llvm::RISCVAttributeParser
Definition: RISCVAttributeParser.h:16
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
llvm::ELF::EF_AMDGPU_MACH_R600_JUNIPER
@ EF_AMDGPU_MACH_R600_JUNIPER
Definition: ELF.h:707
T
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX1012
@ EF_AMDGPU_MACH_AMDGCN_GFX1012
Definition: ELF.h:746
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX940
@ EF_AMDGPU_MACH_AMDGCN_GFX940
Definition: ELF.h:757
llvm::ELF::STT_GNU_IFUNC
@ STT_GNU_IFUNC
Definition: ELF.h:1198
llvm::Triple::x86
@ x86
Definition: Triple.h:85
llvm::object::Binary::isLittleEndian
bool isLittleEndian() const
Definition: Binary.h:148
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX90C
@ EF_AMDGPU_MACH_AMDGCN_GFX90C
Definition: ELF.h:743
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX1031
@ EF_AMDGPU_MACH_AMDGCN_GFX1031
Definition: ELF.h:748
llvm::SubtargetFeatures::AddFeature
void AddFeature(StringRef String, bool Enable=true)
Adds Features.
Definition: SubtargetFeature.cpp:37
llvm::ELF::EF_AMDGPU_MACH_R600_SUMO
@ EF_AMDGPU_MACH_R600_SUMO
Definition: ELF.h:709
llvm::object::ELFObjectFileBase::getPltAddresses
std::vector< std::pair< Optional< DataRefImpl >, uint64_t > > getPltAddresses() const
Definition: ELFObjectFile.cpp:599
llvm::ARMBuildAttrs::ApplicationProfile
@ ApplicationProfile
Definition: ARMBuildAttributes.h:117
llvm::ELF::EF_AMDGPU_MACH_R600_CEDAR
@ EF_AMDGPU_MACH_R600_CEDAR
Definition: ELF.h:705
llvm::ARMBuildAttrs::CPU_arch_profile
@ CPU_arch_profile
Definition: ARMBuildAttributes.h:40
llvm::object::ELFObjectFileBase::readDynsymVersions
Expected< std::vector< VersionEntry > > readDynsymVersions() const
Returns a vector containing a symbol version for each dynamic symbol.
Definition: ELFObjectFile.cpp:759
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX1034
@ EF_AMDGPU_MACH_AMDGCN_GFX1034
Definition: ELF.h:755
llvm::object::ELFObjectFileBase::getBuildAttributes
virtual Error getBuildAttributes(ELFAttributeParser &Attributes) const =0
ErrorHandling.h
llvm::ELF::EF_AMDGPU_MACH_R600_RS880
@ EF_AMDGPU_MACH_R600_RS880
Definition: ELF.h:698
llvm::ELF::EF_MIPS_ARCH_4
@ EF_MIPS_ARCH_4
Definition: ELF.h:556
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::EF_AMDGPU_MACH_AMDGCN_GFX810
@ EF_AMDGPU_MACH_AMDGCN_GFX810
Definition: ELF.h:736
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:682
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::STT_TLS
@ STT_TLS
Definition: ELF.h:1197
llvm::Type
The instances of the Type class are immutable: once they are created, they are never changed.
Definition: Type.h:45
llvm::ELF::EF_AMDGPU_MACH_R600_REDWOOD
@ EF_AMDGPU_MACH_R600_REDWOOD
Definition: ELF.h:708
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:704
llvm::ELF::STT_NOTYPE
@ STT_NOTYPE
Definition: ELF.h:1191
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX1036
@ EF_AMDGPU_MACH_AMDGCN_GFX1036
Definition: ELF.h:762
llvm::ARMBuildAttrs::DisallowDIV
@ DisallowDIV
Definition: ARMBuildAttributes.h:237
llvm::Optional< unsigned >
llvm::ARMAttributeParser
Definition: ARMAttributeParser.h:21
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
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX602
@ EF_AMDGPU_MACH_AMDGCN_GFX602
Definition: ELF.h:751
createPtr
static Expected< std::unique_ptr< ELFObjectFile< ELFT > > > createPtr(MemoryBufferRef Object, bool InitContent)
Definition: ELFObjectFile.cpp:62
llvm::ELF::SHT_LLVM_BB_ADDR_MAP
@ SHT_LLVM_BB_ADDR_MAP
Definition: ELF.h:979
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:675
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX908
@ EF_AMDGPU_MACH_AMDGCN_GFX908
Definition: ELF.h:741
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_R600_R600
@ EF_AMDGPU_MACH_R600_R600
Definition: ELF.h:696
llvm::EnumEntry
Definition: EnumTables.h:18
llvm::Optional::hasValue
constexpr bool hasValue() const
Definition: Optional.h:283
llvm::object::SymbolicFile::symbol_end
virtual basic_symbol_iterator symbol_end() const =0
ARMAttributeParser.h
llvm::object::ELFObjectFileBase::getPlatformFlags
virtual unsigned getPlatformFlags() const =0
Returns platform-specific object flags, if any.
llvm::ELF::STT_FUNC
@ STT_FUNC
Definition: ELF.h:1193
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::ELF::EF_AMDGPU_MACH_AMDGCN_GFX906
@ EF_AMDGPU_MACH_AMDGCN_GFX906
Definition: ELF.h:740
llvm::ELF::SHT_GNU_verneed
@ SHT_GNU_verneed
Definition: ELF.h:987
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:620
llvm::ELF::EF_AMDGPU_MACH
@ EF_AMDGPU_MACH
Definition: ELF.h:688
llvm::object::BasicSymbolRef::getRawDataRefImpl
DataRefImpl getRawDataRefImpl() const
Definition: SymbolicFile.h:208
llvm::Triple::str
const std::string & str() const
Definition: Triple.h:396
E
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
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::ARMBuildAttrs::v6K
@ v6K
Definition: ARMBuildAttributes.h:102
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX90A
@ EF_AMDGPU_MACH_AMDGCN_GFX90A
Definition: ELF.h:756
llvm::ELF::STT_COMMON
@ STT_COMMON
Definition: ELF.h:1196
llvm::ARMBuildAttrs::AllowThumb32
@ AllowThumb32
Definition: ARMBuildAttributes.h:131
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX900
@ EF_AMDGPU_MACH_AMDGCN_GFX900
Definition: ELF.h:737
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX1030
@ EF_AMDGPU_MACH_AMDGCN_GFX1030
Definition: ELF.h:747
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_GFX909
@ EF_AMDGPU_MACH_AMDGCN_GFX909
Definition: ELF.h:742
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:676
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX1032
@ EF_AMDGPU_MACH_AMDGCN_GFX1032
Definition: ELF.h:749
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::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:337
llvm::ELF::EM_RISCV
@ EM_RISCV
Definition: ELF.h:317
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::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:669
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_AMDGPU_MACH_AMDGCN_GFX1102
@ EF_AMDGPU_MACH_AMDGCN_GFX1102
Definition: ELF.h:764
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::ELF::EF_AMDGPU_MACH_AMDGCN_GFX1101
@ EF_AMDGPU_MACH_AMDGCN_GFX1101
Definition: ELF.h:763
llvm::ELF::EF_RISCV_RVC
@ EF_RISCV_RVC
Definition: ELF.h:654
llvm::Triple::isThumb
bool isThumb() const
Tests whether the target is Thumb (little and big endian).
Definition: Triple.h:743
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::StringRef::empty
constexpr LLVM_NODISCARD bool empty() const
empty - Check if the string is empty.
Definition: StringRef.h:153
uint64_t
llvm::object::symbol_iterator
Definition: ObjectFile.h:207
ELF.h
llvm::object::ELFObjectFileBase::getFeatures
SubtargetFeatures getFeatures() const override
Definition: ELFObjectFile.cpp:344
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX802
@ EF_AMDGPU_MACH_AMDGCN_GFX802
Definition: ELF.h:734
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX805
@ EF_AMDGPU_MACH_AMDGCN_GFX805
Definition: ELF.h:753
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
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:772
llvm::object::BasicSymbolRef::SF_Undefined
@ SF_Undefined
Definition: SymbolicFile.h:110
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX700
@ EF_AMDGPU_MACH_AMDGCN_GFX700
Definition: ELF.h:727
llvm::ARMBuildAttrs::v6KZ
@ v6KZ
Definition: ARMBuildAttributes.h:100
RISCVAttributeParser.h
Attributes
AMDGPU Kernel Attributes
Definition: AMDGPULowerKernelAttributes.cpp:244
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX702
@ EF_AMDGPU_MACH_AMDGCN_GFX702
Definition: ELF.h:729
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::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:279
llvm::ARMBuildAttrs::AllowMVEIntegerAndFloat
@ AllowMVEIntegerAndFloat
Definition: ARMBuildAttributes.h:156
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
llvm::ARMBuildAttrs::AllowNeon
@ AllowNeon
Definition: ARMBuildAttributes.h:149
ELFTypes.h
llvm::MemoryBufferRef::getBuffer
StringRef getBuffer() const
Definition: MemoryBufferRef.h:32
llvm::ARMBuildAttrs::AllowFPv3B
@ AllowFPv3B
Definition: ARMBuildAttributes.h:137
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX704
@ EF_AMDGPU_MACH_AMDGCN_GFX704
Definition: ELF.h:731
llvm::ELF::EF_AMDGPU_MACH_R600_TURKS
@ EF_AMDGPU_MACH_R600_TURKS
Definition: ELF.h:714
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
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::ELF::EF_AMDGPU_MACH_R600_RV730
@ EF_AMDGPU_MACH_R600_RV730
Definition: ELF.h:702
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::ELF::EF_AMDGPU_MACH_AMDGCN_GFX1103
@ EF_AMDGPU_MACH_AMDGCN_GFX1103
Definition: ELF.h:761
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::ELF::EF_AMDGPU_MACH_AMDGCN_GFX600
@ EF_AMDGPU_MACH_AMDGCN_GFX600
Definition: ELF.h:725
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_AMDGPU_MACH_R600_RV670
@ EF_AMDGPU_MACH_R600_RV670
Definition: ELF.h:699
llvm::ELF::EF_AMDGPU_MACH_R600_RV710
@ EF_AMDGPU_MACH_R600_RV710
Definition: ELF.h:701
llvm::ELF::EF_MIPS_ARCH_64R2
@ EF_MIPS_ARCH_64R2
Definition: ELF.h:561
ELFObjectFile.h
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX701
@ EF_AMDGPU_MACH_AMDGCN_GFX701
Definition: ELF.h:728
llvm::ARMBuildAttrs::MVE_arch
@ MVE_arch
Definition: ARMBuildAttributes.h:72
llvm::Twine
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition: Twine.h:83
llvm::ELF::STT_FILE
@ STT_FILE
Definition: ELF.h:1195
llvm::GraphProgram::Name
Name
Definition: GraphWriter.h:50
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:340
llvm::ELF::EF_AMDGPU_MACH_R600_RV770
@ EF_AMDGPU_MACH_R600_RV770
Definition: ELF.h:703
llvm::ELF::SHT_GNU_verdef
@ SHT_GNU_verdef
Definition: ELF.h:986
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:504
llvm::Error
Lightweight error class with error context and mandatory checking.
Definition: Error.h:155
llvm::ARMBuildAttrs::v5T
@ v5T
Definition: ARMBuildAttributes.h:96
llvm::ELF::ELFDATA2MSB
@ ELFDATA2MSB
Definition: ELF.h:336
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX703
@ EF_AMDGPU_MACH_AMDGCN_GFX703
Definition: ELF.h:730
llvm::ARMBuildAttrs::AllowNeon2
@ AllowNeon2
Definition: ARMBuildAttributes.h:150
llvm::ELF::EF_AMDGPU_MACH_R600_CYPRESS
@ EF_AMDGPU_MACH_R600_CYPRESS
Definition: ELF.h:706
llvm::ARMBuildAttrs::AllowMVEInteger
@ AllowMVEInteger
Definition: ARMBuildAttributes.h:155
llvm::ARMBuildAttrs::CPU_arch
@ CPU_arch
Definition: ARMBuildAttributes.h:39
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX601
@ EF_AMDGPU_MACH_AMDGCN_GFX601
Definition: ELF.h:726
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX902
@ EF_AMDGPU_MACH_AMDGCN_GFX902
Definition: ELF.h:738
llvm::ARMBuildAttrs::AllowFPv3A
@ AllowFPv3A
Definition: ARMBuildAttributes.h:136
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX1011
@ EF_AMDGPU_MACH_AMDGCN_GFX1011
Definition: ELF.h:745
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::ARMBuildAttrs::Not_Allowed
@ Not_Allowed
Definition: ARMBuildAttributes.h:125
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX1013
@ EF_AMDGPU_MACH_AMDGCN_GFX1013
Definition: ELF.h:759
llvm::Expected::takeError
Error takeError()
Take ownership of the stored error.
Definition: Error.h:597
llvm::Triple::setArchName
void setArchName(StringRef Str)
Set the architecture (first) component of the triple by name.
Definition: Triple.cpp:1327
llvm::ELF::SHT_GNU_versym
@ SHT_GNU_versym
Definition: ELF.h:988
llvm::ARMBuildAttrs::v5TEJ
@ v5TEJ
Definition: ARMBuildAttributes.h:98
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX904
@ EF_AMDGPU_MACH_AMDGCN_GFX904
Definition: ELF.h:739
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::ARMBuildAttrs::AllowFPv4A
@ AllowFPv4A
Definition: ARMBuildAttributes.h:138
llvm::ELF::STT_OBJECT
@ STT_OBJECT
Definition: ELF.h:1192
llvm::object::createError
Error createError(const Twine &Err)
Definition: Error.h:83
llvm::object::getElfArchType
std::pair< unsigned char, unsigned char > getElfArchType(StringRef Object)
Definition: ELF.h:76
llvm::ELF::STT_SECTION
@ STT_SECTION
Definition: ELF.h:1194
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX705
@ EF_AMDGPU_MACH_AMDGCN_GFX705
Definition: ELF.h:752
llvm::ELF::ELFCLASS32
@ ELFCLASS32
Definition: ELF.h:328
llvm::Triple::NoSubArch
@ NoSubArch
Definition: Triple.h:111
llvm::ARMBuildAttrs::v6S_M
@ v6S_M
Definition: ARMBuildAttributes.h:105
llvm::ARMBuildAttrs::AllowDIVExt
@ AllowDIVExt
Definition: ARMBuildAttributes.h:238
llvm::object::ELFObjectFileBase::tryGetCPUName
Optional< StringRef > tryGetCPUName() const override
Definition: ELFObjectFile.cpp:357
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX1035
@ EF_AMDGPU_MACH_AMDGCN_GFX1035
Definition: ELF.h:754
TargetRegistry.h
llvm::ELF::EF_AMDGPU_MACH_R600_R630
@ EF_AMDGPU_MACH_R600_R630
Definition: ELF.h:697
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX801
@ EF_AMDGPU_MACH_AMDGCN_GFX801
Definition: ELF.h:733
llvm::ELF::EF_AMDGPU_MACH_R600_BARTS
@ EF_AMDGPU_MACH_R600_BARTS
Definition: ELF.h:711
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX1100
@ EF_AMDGPU_MACH_AMDGCN_GFX1100
Definition: ELF.h:758
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