LLVM  16.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 <optional>
33 #include <string>
34 #include <utility>
35 
36 using namespace llvm;
37 using namespace object;
38 
40  {"None", "NOTYPE", ELF::STT_NOTYPE},
41  {"Object", "OBJECT", ELF::STT_OBJECT},
42  {"Function", "FUNC", ELF::STT_FUNC},
43  {"Section", "SECTION", ELF::STT_SECTION},
44  {"File", "FILE", ELF::STT_FILE},
45  {"Common", "COMMON", ELF::STT_COMMON},
46  {"TLS", "TLS", ELF::STT_TLS},
47  {"Unknown", "<unknown>: 7", 7},
48  {"Unknown", "<unknown>: 8", 8},
49  {"Unknown", "<unknown>: 9", 9},
50  {"GNU_IFunc", "IFUNC", ELF::STT_GNU_IFUNC},
51  {"OS Specific", "<OS specific>: 11", 11},
52  {"OS Specific", "<OS specific>: 12", 12},
53  {"Proc Specific", "<processor specific>: 13", 13},
54  {"Proc Specific", "<processor specific>: 14", 14},
55  {"Proc Specific", "<processor specific>: 15", 15}
56 };
57 
59  : ObjectFile(Type, Source) {}
60 
61 template <class ELFT>
63 createPtr(MemoryBufferRef Object, bool InitContent) {
64  auto Ret = ELFObjectFile<ELFT>::create(Object, InitContent);
65  if (Error E = Ret.takeError())
66  return std::move(E);
67  return std::make_unique<ELFObjectFile<ELFT>>(std::move(*Ret));
68 }
69 
72  std::pair<unsigned char, unsigned char> Ident =
74  std::size_t MaxAlignment =
75  1ULL << countTrailingZeros(
76  reinterpret_cast<uintptr_t>(Obj.getBufferStart()));
77 
78  if (MaxAlignment < 2)
79  return createError("Insufficient alignment");
80 
81  if (Ident.first == ELF::ELFCLASS32) {
82  if (Ident.second == ELF::ELFDATA2LSB)
83  return createPtr<ELF32LE>(Obj, InitContent);
84  else if (Ident.second == ELF::ELFDATA2MSB)
85  return createPtr<ELF32BE>(Obj, InitContent);
86  else
87  return createError("Invalid ELF data");
88  } else if (Ident.first == ELF::ELFCLASS64) {
89  if (Ident.second == ELF::ELFDATA2LSB)
90  return createPtr<ELF64LE>(Obj, InitContent);
91  else if (Ident.second == ELF::ELFDATA2MSB)
92  return createPtr<ELF64BE>(Obj, InitContent);
93  else
94  return createError("Invalid ELF data");
95  }
96  return createError("Invalid ELF class");
97 }
98 
99 SubtargetFeatures ELFObjectFileBase::getMIPSFeatures() const {
100  SubtargetFeatures Features;
101  unsigned PlatformFlags = getPlatformFlags();
102 
103  switch (PlatformFlags & ELF::EF_MIPS_ARCH) {
104  case ELF::EF_MIPS_ARCH_1:
105  break;
106  case ELF::EF_MIPS_ARCH_2:
107  Features.AddFeature("mips2");
108  break;
109  case ELF::EF_MIPS_ARCH_3:
110  Features.AddFeature("mips3");
111  break;
112  case ELF::EF_MIPS_ARCH_4:
113  Features.AddFeature("mips4");
114  break;
115  case ELF::EF_MIPS_ARCH_5:
116  Features.AddFeature("mips5");
117  break;
119  Features.AddFeature("mips32");
120  break;
122  Features.AddFeature("mips64");
123  break;
125  Features.AddFeature("mips32r2");
126  break;
128  Features.AddFeature("mips64r2");
129  break;
131  Features.AddFeature("mips32r6");
132  break;
134  Features.AddFeature("mips64r6");
135  break;
136  default:
137  llvm_unreachable("Unknown EF_MIPS_ARCH value");
138  }
139 
140  switch (PlatformFlags & ELF::EF_MIPS_MACH) {
142  // No feature associated with this value.
143  break;
145  Features.AddFeature("cnmips");
146  break;
147  default:
148  llvm_unreachable("Unknown EF_MIPS_ARCH value");
149  }
150 
151  if (PlatformFlags & ELF::EF_MIPS_ARCH_ASE_M16)
152  Features.AddFeature("mips16");
153  if (PlatformFlags & ELF::EF_MIPS_MICROMIPS)
154  Features.AddFeature("micromips");
155 
156  return Features;
157 }
158 
159 SubtargetFeatures ELFObjectFileBase::getARMFeatures() const {
160  SubtargetFeatures Features;
164  return SubtargetFeatures();
165  }
166 
167  // both ARMv7-M and R have to support thumb hardware div
168  bool isV7 = false;
169  std::optional<unsigned> Attr =
170  Attributes.getAttributeValue(ARMBuildAttrs::CPU_arch);
171  if (Attr)
172  isV7 = Attr.value() == ARMBuildAttrs::v7;
173 
174  Attr = Attributes.getAttributeValue(ARMBuildAttrs::CPU_arch_profile);
175  if (Attr) {
176  switch (Attr.value()) {
178  Features.AddFeature("aclass");
179  break;
181  Features.AddFeature("rclass");
182  if (isV7)
183  Features.AddFeature("hwdiv");
184  break;
186  Features.AddFeature("mclass");
187  if (isV7)
188  Features.AddFeature("hwdiv");
189  break;
190  }
191  }
192 
193  Attr = Attributes.getAttributeValue(ARMBuildAttrs::THUMB_ISA_use);
194  if (Attr) {
195  switch (Attr.value()) {
196  default:
197  break;
199  Features.AddFeature("thumb", false);
200  Features.AddFeature("thumb2", false);
201  break;
203  Features.AddFeature("thumb2");
204  break;
205  }
206  }
207 
208  Attr = Attributes.getAttributeValue(ARMBuildAttrs::FP_arch);
209  if (Attr) {
210  switch (Attr.value()) {
211  default:
212  break;
214  Features.AddFeature("vfp2sp", false);
215  Features.AddFeature("vfp3d16sp", false);
216  Features.AddFeature("vfp4d16sp", false);
217  break;
219  Features.AddFeature("vfp2");
220  break;
223  Features.AddFeature("vfp3");
224  break;
227  Features.AddFeature("vfp4");
228  break;
229  }
230  }
231 
232  Attr = Attributes.getAttributeValue(ARMBuildAttrs::Advanced_SIMD_arch);
233  if (Attr) {
234  switch (Attr.value()) {
235  default:
236  break;
238  Features.AddFeature("neon", false);
239  Features.AddFeature("fp16", false);
240  break;
242  Features.AddFeature("neon");
243  break;
245  Features.AddFeature("neon");
246  Features.AddFeature("fp16");
247  break;
248  }
249  }
250 
251  Attr = Attributes.getAttributeValue(ARMBuildAttrs::MVE_arch);
252  if (Attr) {
253  switch (Attr.value()) {
254  default:
255  break;
257  Features.AddFeature("mve", false);
258  Features.AddFeature("mve.fp", false);
259  break;
261  Features.AddFeature("mve.fp", false);
262  Features.AddFeature("mve");
263  break;
265  Features.AddFeature("mve.fp");
266  break;
267  }
268  }
269 
270  Attr = Attributes.getAttributeValue(ARMBuildAttrs::DIV_use);
271  if (Attr) {
272  switch (Attr.value()) {
273  default:
274  break;
276  Features.AddFeature("hwdiv", false);
277  Features.AddFeature("hwdiv-arm", false);
278  break;
280  Features.AddFeature("hwdiv");
281  Features.AddFeature("hwdiv-arm");
282  break;
283  }
284  }
285 
286  return Features;
287 }
288 
289 SubtargetFeatures ELFObjectFileBase::getRISCVFeatures() const {
290  SubtargetFeatures Features;
291  unsigned PlatformFlags = getPlatformFlags();
292 
293  if (PlatformFlags & ELF::EF_RISCV_RVC) {
294  Features.AddFeature("c");
295  }
296 
297  // Add features according to the ELF attribute section.
298  // If there are any unrecognized features, ignore them.
301  // TODO Propagate Error.
303  return Features; // Keep "c" feature if there is one in PlatformFlags.
304  }
305 
306  std::optional<StringRef> Attr =
307  Attributes.getAttributeString(RISCVAttrs::ARCH);
308  if (Attr) {
309  // The Arch pattern is [rv32|rv64][i|e]version(_[m|a|f|d|c]version)*
310  // Version string pattern is (major)p(minor). Major and minor are optional.
311  // For example, a version number could be 2p0, 2, or p92.
312  StringRef Arch = *Attr;
313  if (Arch.consume_front("rv32"))
314  Features.AddFeature("64bit", false);
315  else if (Arch.consume_front("rv64"))
316  Features.AddFeature("64bit");
317 
318  while (!Arch.empty()) {
319  switch (Arch[0]) {
320  default:
321  break; // Ignore unexpected features.
322  case 'i':
323  Features.AddFeature("e", false);
324  break;
325  case 'd':
326  Features.AddFeature("f"); // D-ext will imply F-ext.
327  [[fallthrough]];
328  case 'e':
329  case 'm':
330  case 'a':
331  case 'f':
332  case 'c':
333  Features.AddFeature(Arch.take_front());
334  break;
335  }
336 
337  // FIXME: Handle version numbers.
338  Arch = Arch.drop_until([](char c) { return c == '_' || c == '\0'; });
339  Arch = Arch.drop_while([](char c) { return c == '_'; });
340  }
341  }
342 
343  return Features;
344 }
345 
346 SubtargetFeatures ELFObjectFileBase::getLoongArchFeatures() const {
347  SubtargetFeatures Features;
348 
351  break;
353  Features.AddFeature("d");
354  // D implies F according to LoongArch ISA spec.
355  [[fallthrough]];
357  Features.AddFeature("f");
358  break;
359  }
360 
361  return Features;
362 }
363 
365  switch (getEMachine()) {
366  case ELF::EM_MIPS:
367  return getMIPSFeatures();
368  case ELF::EM_ARM:
369  return getARMFeatures();
370  case ELF::EM_RISCV:
371  return getRISCVFeatures();
372  case ELF::EM_LOONGARCH:
373  return getLoongArchFeatures();
374  default:
375  return SubtargetFeatures();
376  }
377 }
378 
379 std::optional<StringRef> ELFObjectFileBase::tryGetCPUName() const {
380  switch (getEMachine()) {
381  case ELF::EM_AMDGPU:
382  return getAMDGPUCPUName();
383  case ELF::EM_PPC64:
384  return StringRef("future");
385  default:
386  return std::nullopt;
387  }
388 }
389 
390 StringRef ELFObjectFileBase::getAMDGPUCPUName() const {
392  unsigned CPU = getPlatformFlags() & ELF::EF_AMDGPU_MACH;
393 
394  switch (CPU) {
395  // Radeon HD 2000/3000 Series (R600).
397  return "r600";
399  return "r630";
401  return "rs880";
403  return "rv670";
404 
405  // Radeon HD 4000 Series (R700).
407  return "rv710";
409  return "rv730";
411  return "rv770";
412 
413  // Radeon HD 5000 Series (Evergreen).
415  return "cedar";
417  return "cypress";
419  return "juniper";
421  return "redwood";
423  return "sumo";
424 
425  // Radeon HD 6000 Series (Northern Islands).
427  return "barts";
429  return "caicos";
431  return "cayman";
433  return "turks";
434 
435  // AMDGCN GFX6.
437  return "gfx600";
439  return "gfx601";
441  return "gfx602";
442 
443  // AMDGCN GFX7.
445  return "gfx700";
447  return "gfx701";
449  return "gfx702";
451  return "gfx703";
453  return "gfx704";
455  return "gfx705";
456 
457  // AMDGCN GFX8.
459  return "gfx801";
461  return "gfx802";
463  return "gfx803";
465  return "gfx805";
467  return "gfx810";
468 
469  // AMDGCN GFX9.
471  return "gfx900";
473  return "gfx902";
475  return "gfx904";
477  return "gfx906";
479  return "gfx908";
481  return "gfx909";
483  return "gfx90a";
485  return "gfx90c";
487  return "gfx940";
488 
489  // AMDGCN GFX10.
491  return "gfx1010";
493  return "gfx1011";
495  return "gfx1012";
497  return "gfx1013";
499  return "gfx1030";
501  return "gfx1031";
503  return "gfx1032";
505  return "gfx1033";
507  return "gfx1034";
509  return "gfx1035";
511  return "gfx1036";
512 
513  // AMDGCN GFX11.
515  return "gfx1100";
517  return "gfx1101";
519  return "gfx1102";
521  return "gfx1103";
522  default:
523  llvm_unreachable("Unknown EF_AMDGPU_MACH value");
524  }
525 }
526 
527 // FIXME Encode from a tablegen description or target parser.
528 void ELFObjectFileBase::setARMSubArch(Triple &TheTriple) const {
529  if (TheTriple.getSubArch() != Triple::NoSubArch)
530  return;
531 
534  // TODO Propagate Error.
536  return;
537  }
538 
539  std::string Triple;
540  // Default to ARM, but use the triple if it's been set.
541  if (TheTriple.isThumb())
542  Triple = "thumb";
543  else
544  Triple = "arm";
545 
546  std::optional<unsigned> Attr =
547  Attributes.getAttributeValue(ARMBuildAttrs::CPU_arch);
548  if (Attr) {
549  switch (Attr.value()) {
550  case ARMBuildAttrs::v4:
551  Triple += "v4";
552  break;
553  case ARMBuildAttrs::v4T:
554  Triple += "v4t";
555  break;
556  case ARMBuildAttrs::v5T:
557  Triple += "v5t";
558  break;
559  case ARMBuildAttrs::v5TE:
560  Triple += "v5te";
561  break;
563  Triple += "v5tej";
564  break;
565  case ARMBuildAttrs::v6:
566  Triple += "v6";
567  break;
568  case ARMBuildAttrs::v6KZ:
569  Triple += "v6kz";
570  break;
571  case ARMBuildAttrs::v6T2:
572  Triple += "v6t2";
573  break;
574  case ARMBuildAttrs::v6K:
575  Triple += "v6k";
576  break;
577  case ARMBuildAttrs::v7: {
578  std::optional<unsigned> ArchProfileAttr =
579  Attributes.getAttributeValue(ARMBuildAttrs::CPU_arch_profile);
580  if (ArchProfileAttr &&
581  ArchProfileAttr.value() == ARMBuildAttrs::MicroControllerProfile)
582  Triple += "v7m";
583  else
584  Triple += "v7";
585  break;
586  }
587  case ARMBuildAttrs::v6_M:
588  Triple += "v6m";
589  break;
591  Triple += "v6sm";
592  break;
594  Triple += "v7em";
595  break;
596  case ARMBuildAttrs::v8_A:
597  Triple += "v8a";
598  break;
599  case ARMBuildAttrs::v8_R:
600  Triple += "v8r";
601  break;
603  Triple += "v8m.base";
604  break;
606  Triple += "v8m.main";
607  break;
609  Triple += "v8.1m.main";
610  break;
611  case ARMBuildAttrs::v9_A:
612  Triple += "v9a";
613  break;
614  }
615  }
616  if (!isLittleEndian())
617  Triple += "eb";
618 
619  TheTriple.setArchName(Triple);
620 }
621 
622 std::vector<std::pair<std::optional<DataRefImpl>, uint64_t>>
624  std::string Err;
625  const auto Triple = makeTriple();
626  const auto *T = TargetRegistry::lookupTarget(Triple.str(), Err);
627  if (!T)
628  return {};
629  uint64_t JumpSlotReloc = 0;
630  switch (Triple.getArch()) {
631  case Triple::x86:
632  JumpSlotReloc = ELF::R_386_JUMP_SLOT;
633  break;
634  case Triple::x86_64:
635  JumpSlotReloc = ELF::R_X86_64_JUMP_SLOT;
636  break;
637  case Triple::aarch64:
638  case Triple::aarch64_be:
639  JumpSlotReloc = ELF::R_AARCH64_JUMP_SLOT;
640  break;
641  default:
642  return {};
643  }
644  std::unique_ptr<const MCInstrInfo> MII(T->createMCInstrInfo());
645  std::unique_ptr<const MCInstrAnalysis> MIA(
646  T->createMCInstrAnalysis(MII.get()));
647  if (!MIA)
648  return {};
649  std::optional<SectionRef> Plt, RelaPlt, GotPlt;
650  for (const SectionRef &Section : sections()) {
651  Expected<StringRef> NameOrErr = Section.getName();
652  if (!NameOrErr) {
653  consumeError(NameOrErr.takeError());
654  continue;
655  }
656  StringRef Name = *NameOrErr;
657 
658  if (Name == ".plt")
659  Plt = Section;
660  else if (Name == ".rela.plt" || Name == ".rel.plt")
661  RelaPlt = Section;
662  else if (Name == ".got.plt")
663  GotPlt = Section;
664  }
665  if (!Plt || !RelaPlt || !GotPlt)
666  return {};
667  Expected<StringRef> PltContents = Plt->getContents();
668  if (!PltContents) {
669  consumeError(PltContents.takeError());
670  return {};
671  }
672  auto PltEntries = MIA->findPltEntries(Plt->getAddress(),
673  arrayRefFromStringRef(*PltContents),
674  GotPlt->getAddress(), Triple);
675  // Build a map from GOT entry virtual address to PLT entry virtual address.
677  for (const auto &Entry : PltEntries)
678  GotToPlt.insert(std::make_pair(Entry.second, Entry.first));
679  // Find the relocations in the dynamic relocation table that point to
680  // locations in the GOT for which we know the corresponding PLT entry.
681  std::vector<std::pair<std::optional<DataRefImpl>, uint64_t>> Result;
682  for (const auto &Relocation : RelaPlt->relocations()) {
683  if (Relocation.getType() != JumpSlotReloc)
684  continue;
685  auto PltEntryIter = GotToPlt.find(Relocation.getOffset());
686  if (PltEntryIter != GotToPlt.end()) {
687  symbol_iterator Sym = Relocation.getSymbol();
688  if (Sym == symbol_end())
689  Result.emplace_back(std::nullopt, PltEntryIter->second);
690  else
691  Result.emplace_back(Sym->getRawDataRefImpl(), PltEntryIter->second);
692  }
693  }
694  return Result;
695 }
696 
697 template <class ELFT>
699  const ELFFile<ELFT> &EF, std::optional<unsigned> TextSectionIndex) {
700  using Elf_Shdr = typename ELFT::Shdr;
701  std::vector<BBAddrMap> BBAddrMaps;
702  const auto &Sections = cantFail(EF.sections());
703  for (const Elf_Shdr &Sec : Sections) {
704  if (Sec.sh_type != ELF::SHT_LLVM_BB_ADDR_MAP &&
705  Sec.sh_type != ELF::SHT_LLVM_BB_ADDR_MAP_V0)
706  continue;
707  if (TextSectionIndex) {
708  Expected<const Elf_Shdr *> TextSecOrErr = EF.getSection(Sec.sh_link);
709  if (!TextSecOrErr)
710  return createError("unable to get the linked-to section for " +
711  describe(EF, Sec) + ": " +
712  toString(TextSecOrErr.takeError()));
713  if (*TextSectionIndex != std::distance(Sections.begin(), *TextSecOrErr))
714  continue;
715  }
716  Expected<std::vector<BBAddrMap>> BBAddrMapOrErr = EF.decodeBBAddrMap(Sec);
717  if (!BBAddrMapOrErr)
718  return createError("unable to read " + describe(EF, Sec) + ": " +
719  toString(BBAddrMapOrErr.takeError()));
720  std::move(BBAddrMapOrErr->begin(), BBAddrMapOrErr->end(),
721  std::back_inserter(BBAddrMaps));
722  }
723  return BBAddrMaps;
724 }
725 
726 template <class ELFT>
728 readDynsymVersionsImpl(const ELFFile<ELFT> &EF,
730  using Elf_Shdr = typename ELFT::Shdr;
731  const Elf_Shdr *VerSec = nullptr;
732  const Elf_Shdr *VerNeedSec = nullptr;
733  const Elf_Shdr *VerDefSec = nullptr;
734  // The user should ensure sections() can't fail here.
735  for (const Elf_Shdr &Sec : cantFail(EF.sections())) {
736  if (Sec.sh_type == ELF::SHT_GNU_versym)
737  VerSec = &Sec;
738  else if (Sec.sh_type == ELF::SHT_GNU_verdef)
739  VerDefSec = &Sec;
740  else if (Sec.sh_type == ELF::SHT_GNU_verneed)
741  VerNeedSec = &Sec;
742  }
743  if (!VerSec)
744  return std::vector<VersionEntry>();
745 
747  EF.loadVersionMap(VerNeedSec, VerDefSec);
748  if (!MapOrErr)
749  return MapOrErr.takeError();
750 
751  std::vector<VersionEntry> Ret;
752  size_t I = 0;
753  for (const ELFSymbolRef &Sym : Symbols) {
754  ++I;
756  EF.template getEntry<typename ELFT::Versym>(*VerSec, I);
757  if (!VerEntryOrErr)
758  return createError("unable to read an entry with index " + Twine(I) +
759  " from " + describe(EF, *VerSec) + ": " +
760  toString(VerEntryOrErr.takeError()));
761 
762  Expected<uint32_t> FlagsOrErr = Sym.getFlags();
763  if (!FlagsOrErr)
764  return createError("unable to read flags for symbol with index " +
765  Twine(I) + ": " + toString(FlagsOrErr.takeError()));
766 
767  bool IsDefault;
768  Expected<StringRef> VerOrErr = EF.getSymbolVersionByIndex(
769  (*VerEntryOrErr)->vs_index, IsDefault, *MapOrErr,
770  (*FlagsOrErr) & SymbolRef::SF_Undefined);
771  if (!VerOrErr)
772  return createError("unable to get a version for entry " + Twine(I) +
773  " of " + describe(EF, *VerSec) + ": " +
774  toString(VerOrErr.takeError()));
775 
776  Ret.push_back({(*VerOrErr).str(), IsDefault});
777  }
778 
779  return Ret;
780 }
781 
785  if (const auto *Obj = dyn_cast<ELF32LEObjectFile>(this))
786  return readDynsymVersionsImpl(Obj->getELFFile(), Symbols);
787  if (const auto *Obj = dyn_cast<ELF32BEObjectFile>(this))
788  return readDynsymVersionsImpl(Obj->getELFFile(), Symbols);
789  if (const auto *Obj = dyn_cast<ELF64LEObjectFile>(this))
790  return readDynsymVersionsImpl(Obj->getELFFile(), Symbols);
791  return readDynsymVersionsImpl(cast<ELF64BEObjectFile>(this)->getELFFile(),
792  Symbols);
793 }
794 
796  std::optional<unsigned> TextSectionIndex) const {
797  if (const auto *Obj = dyn_cast<ELF32LEObjectFile>(this))
798  return readBBAddrMapImpl(Obj->getELFFile(), TextSectionIndex);
799  if (const auto *Obj = dyn_cast<ELF64LEObjectFile>(this))
800  return readBBAddrMapImpl(Obj->getELFFile(), TextSectionIndex);
801  if (const auto *Obj = dyn_cast<ELF32BEObjectFile>(this))
802  return readBBAddrMapImpl(Obj->getELFFile(), TextSectionIndex);
803  if (const auto *Obj = cast<ELF64BEObjectFile>(this))
804  return readBBAddrMapImpl(Obj->getELFFile(), TextSectionIndex);
805  else
806  llvm_unreachable("Unsupported binary format");
807 }
llvm::ELF::EF_AMDGPU_MACH_R600_SUMO
@ EF_AMDGPU_MACH_R600_SUMO
Definition: ELF.h:725
llvm::ELF::EF_AMDGPU_MACH
@ EF_AMDGPU_MACH
Definition: ELF.h:704
llvm::ELF::EF_LOONGARCH_ABI_SINGLE_FLOAT
@ EF_LOONGARCH_ABI_SINGLE_FLOAT
Definition: ELF.h:918
llvm::ELF::STT_TLS
@ STT_TLS
Definition: ELF.h:1239
llvm::object::describe
static std::string describe(const ELFFile< ELFT > &Obj, const typename ELFT::Shdr &Sec)
Definition: ELF.h:142
llvm::ELF::EF_MIPS_ARCH_2
@ EF_MIPS_ARCH_2
Definition: ELF.h:555
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX1031
@ EF_AMDGPU_MACH_AMDGCN_GFX1031
Definition: ELF.h:764
llvm::StringRef::take_front
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:572
llvm::ARMBuildAttrs::AllowNeon
@ AllowNeon
Definition: ARMBuildAttributes.h:149
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:18
llvm::ARMBuildAttrs::DisallowDIV
@ DisallowDIV
Definition: ARMBuildAttributes.h:237
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX1030
@ EF_AMDGPU_MACH_AMDGCN_GFX1030
Definition: ELF.h:763
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX1036
@ EF_AMDGPU_MACH_AMDGCN_GFX1036
Definition: ELF.h:778
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX703
@ EF_AMDGPU_MACH_AMDGCN_GFX703
Definition: ELF.h:746
llvm::RISCVAttributeParser
Definition: RISCVAttributeParser.h:16
llvm::ELF::EF_AMDGPU_MACH_R600_RV730
@ EF_AMDGPU_MACH_R600_RV730
Definition: ELF.h:718
llvm::ELF::EF_MIPS_ARCH_1
@ EF_MIPS_ARCH_1
Definition: ELF.h:554
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:558
T
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX601
@ EF_AMDGPU_MACH_AMDGCN_GFX601
Definition: ELF.h:742
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX1011
@ EF_AMDGPU_MACH_AMDGCN_GFX1011
Definition: ELF.h:761
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX90C
@ EF_AMDGPU_MACH_AMDGCN_GFX90C
Definition: ELF.h:759
llvm::ELF::SHT_GNU_verdef
@ SHT_GNU_verdef
Definition: ELF.h:1024
llvm::Triple::x86
@ x86
Definition: Triple.h:85
llvm::object::Binary::isLittleEndian
bool isLittleEndian() const
Definition: Binary.h:152
llvm::ELF::EF_LOONGARCH_ABI_SOFT_FLOAT
@ EF_LOONGARCH_ABI_SOFT_FLOAT
Definition: ELF.h:917
llvm::SubtargetFeatures::AddFeature
void AddFeature(StringRef String, bool Enable=true)
Adds Features.
Definition: SubtargetFeature.cpp:37
llvm::ARMBuildAttrs::Not_Allowed
@ Not_Allowed
Definition: ARMBuildAttributes.h:125
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:775
llvm::object::ELFObjectFileBase::readDynsymVersions
Expected< std::vector< VersionEntry > > readDynsymVersions() const
Returns a vector containing a symbol version for each dynamic symbol.
Definition: ELFObjectFile.cpp:783
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:557
llvm::object::ELFObjectFileBase::getEMachine
virtual uint16_t getEMachine() const =0
llvm::ELF::EM_LOONGARCH
@ EM_LOONGARCH
Definition: ELF.h:322
llvm::ARMBuildAttrs::v8_1_M_Main
@ v8_1_M_Main
Definition: ARMBuildAttributes.h:111
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX1103
@ EF_AMDGPU_MACH_AMDGCN_GFX1103
Definition: ELF.h:777
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX1100
@ EF_AMDGPU_MACH_AMDGCN_GFX1100
Definition: ELF.h:774
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX805
@ EF_AMDGPU_MACH_AMDGCN_GFX805
Definition: ELF.h:769
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:627
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:767
llvm::ARMBuildAttrs::AllowMVEInteger
@ AllowMVEInteger
Definition: ARMBuildAttributes.h:155
llvm::ELF::STT_NOTYPE
@ STT_NOTYPE
Definition: ELF.h:1233
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:728
llvm::ARMAttributeParser
Definition: ARMAttributeParser.h:21
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX802
@ EF_AMDGPU_MACH_AMDGCN_GFX802
Definition: ELF.h:750
llvm::ELF::SHT_GNU_versym
@ SHT_GNU_versym
Definition: ELF.h:1026
llvm::ELF::EF_AMDGPU_MACH_R600_RS880
@ EF_AMDGPU_MACH_R600_RS880
Definition: ELF.h:714
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:63
llvm::ELF::EF_AMDGPU_MACH_R600_RV710
@ EF_AMDGPU_MACH_R600_RV710
Definition: ELF.h:717
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
llvm::consumeError
void consumeError(Error Err)
Consume a Error without doing anything.
Definition: Error.h:1042
llvm::MemoryBufferRef
Definition: MemoryBufferRef.h:22
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX908
@ EF_AMDGPU_MACH_AMDGCN_GFX908
Definition: ELF.h:757
llvm::EnumEntry
Definition: EnumTables.h:18
llvm::ELF::STT_FUNC
@ STT_FUNC
Definition: ELF.h:1235
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:753
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::ARMBuildAttrs::AllowFPv3B
@ AllowFPv3B
Definition: ARMBuildAttributes.h:137
llvm::object::ELFObjectFileBase::getPltAddresses
std::vector< std::pair< std::optional< DataRefImpl >, uint64_t > > getPltAddresses() const
Definition: ELFObjectFile.cpp:623
llvm::object::BasicSymbolRef::getRawDataRefImpl
DataRefImpl getRawDataRefImpl() const
Definition: SymbolicFile.h:208
llvm::Triple::str
const std::string & str() const
Definition: Triple.h:413
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:773
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX810
@ EF_AMDGPU_MACH_AMDGCN_GFX810
Definition: ELF.h:752
llvm::ELF::EF_AMDGPU_MACH_R600_REDWOOD
@ EF_AMDGPU_MACH_R600_REDWOOD
Definition: ELF.h:724
llvm::SubtargetFeatures
Manages the enabling and disabling of subtarget specific features.
Definition: SubtargetFeature.h:180
llvm::ARMBuildAttrs::FP_arch
@ FP_arch
Definition: ARMBuildAttributes.h:43
llvm::ELF::EF_LOONGARCH_ABI_MODIFIER_MASK
@ EF_LOONGARCH_ABI_MODIFIER_MASK
Definition: ELF.h:920
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX1010
@ EF_AMDGPU_MACH_AMDGCN_GFX1010
Definition: ELF.h:760
llvm::ARMBuildAttrs::v6K
@ v6K
Definition: ARMBuildAttributes.h:102
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX704
@ EF_AMDGPU_MACH_AMDGCN_GFX704
Definition: ELF.h:747
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX1012
@ EF_AMDGPU_MACH_AMDGCN_GFX1012
Definition: ELF.h:762
llvm::ELF::EF_AMDGPU_MACH_R600_JUNIPER
@ EF_AMDGPU_MACH_R600_JUNIPER
Definition: ELF.h:723
llvm::ELF::EF_MIPS_ARCH_64R6
@ EF_MIPS_ARCH_64R6
Definition: ELF.h:564
llvm::ARMBuildAttrs::RealTimeProfile
@ RealTimeProfile
Definition: ARMBuildAttributes.h:118
llvm::ARMBuildAttrs::v8_M_Main
@ v8_M_Main
Definition: ARMBuildAttributes.h:110
llvm::ARMBuildAttrs::AllowNeon2
@ AllowNeon2
Definition: ARMBuildAttributes.h:150
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX1034
@ EF_AMDGPU_MACH_AMDGCN_GFX1034
Definition: ELF.h:771
llvm::ELF::EF_MIPS_MACH
@ EF_MIPS_MACH
Definition: ELF.h:545
llvm::StringRef::drop_until
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:621
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX909
@ EF_AMDGPU_MACH_AMDGCN_GFX909
Definition: ELF.h:758
llvm::ELF::EF_MIPS_MACH_NONE
@ EF_MIPS_MACH_NONE
Definition: ELF.h:526
llvm::object::ObjectFile::createELFObjectFile
static Expected< std::unique_ptr< ObjectFile > > createELFObjectFile(MemoryBufferRef Object, bool InitContent=true)
Definition: ELFObjectFile.cpp:71
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX705
@ EF_AMDGPU_MACH_AMDGCN_GFX705
Definition: ELF.h:768
llvm::object::ELFObjectFile::create
static Expected< ELFObjectFile< ELFT > > create(MemoryBufferRef Object, bool InitContent=true)
Definition: ELFObjectFile.h:1095
llvm::Triple::getArch
ArchType getArch() const
Get the parsed architecture type of this triple.
Definition: Triple.h:354
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::ELF::EF_MIPS_ARCH_3
@ EF_MIPS_ARCH_3
Definition: ELF.h:556
llvm::object::ELFObjectFileBase::getDynamicSymbolIterators
virtual elf_symbol_iterator_range getDynamicSymbolIterators() const =0
llvm::object::ELFObjectFileBase::readBBAddrMap
Expected< std::vector< BBAddrMap > > readBBAddrMap(std::optional< unsigned > TextSectionIndex=std::nullopt) const
Returns a vector of all BB address maps in the object file. When.
Definition: ELFObjectFile.cpp:795
llvm::ARMBuildAttrs::v6_M
@ v6_M
Definition: ARMBuildAttributes.h:104
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::StringRef::empty
constexpr bool empty() const
empty - Check if the string is empty.
Definition: StringRef.h:134
llvm::ELF::EF_MIPS_ARCH_32R2
@ EF_MIPS_ARCH_32R2
Definition: ELF.h:561
llvm::ELF::EF_MIPS_ARCH_64
@ EF_MIPS_ARCH_64
Definition: ELF.h:560
llvm::ELF::STT_GNU_IFUNC
@ STT_GNU_IFUNC
Definition: ELF.h:1240
llvm::ELF::STT_SECTION
@ STT_SECTION
Definition: ELF.h:1236
llvm::object::ElfSymbolTypes
const llvm::EnumEntry< unsigned > ElfSymbolTypes[NumElfSymbolTypes]
Definition: ELFObjectFile.cpp:39
llvm::Triple::isThumb
bool isThumb() const
Tests whether the target is Thumb (little and big endian).
Definition: Triple.h:773
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
uint64_t
llvm::ELF::EF_AMDGPU_MACH_R600_R630
@ EF_AMDGPU_MACH_R600_R630
Definition: ELF.h:713
llvm::object::symbol_iterator
Definition: ObjectFile.h:207
ELF.h
llvm::object::ELFObjectFileBase::getFeatures
SubtargetFeatures getFeatures() const override
Definition: ELFObjectFile.cpp:364
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:722
llvm::ARMBuildAttrs::AllowFPv3A
@ AllowFPv3A
Definition: ARMBuildAttributes.h:136
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:714
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:729
I
#define I(x, y, z)
Definition: MD5.cpp:58
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:765
Attributes
AMDGPU Kernel Attributes
Definition: AMDGPULowerKernelAttributes.cpp:347
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX702
@ EF_AMDGPU_MACH_AMDGCN_GFX702
Definition: ELF.h:745
llvm::ELF::SHT_LLVM_BB_ADDR_MAP
@ SHT_LLVM_BB_ADDR_MAP
Definition: ELF.h:1017
llvm::ELF::EF_MIPS_MICROMIPS
@ EF_MIPS_MICROMIPS
Definition: ELF.h:548
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:150
llvm::ARMBuildAttrs::AllowFPv4A
@ AllowFPv4A
Definition: ARMBuildAttributes.h:138
llvm::ELF::EF_MIPS_ARCH_32R6
@ EF_MIPS_ARCH_32R6
Definition: ELF.h:563
assert
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
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:79
ELFTypes.h
llvm::MemoryBufferRef::getBuffer
StringRef getBuffer() const
Definition: MemoryBufferRef.h:32
llvm::ELF::EM_AMDGPU
@ EM_AMDGPU
Definition: ELF.h:316
llvm::ELF::EF_MIPS_MACH_OCTEON
@ EF_MIPS_MACH_OCTEON
Definition: ELF.h:534
llvm::object::ObjectFile::makeTriple
Triple makeTriple() const
Create a triple from the data in this object file.
Definition: ObjectFile.cpp:109
llvm::ELF::EF_AMDGPU_MACH_R600_TURKS
@ EF_AMDGPU_MACH_R600_TURKS
Definition: ELF.h:730
Triple.h
llvm::ARMBuildAttrs::AllowFPv2
@ AllowFPv2
Definition: ARMBuildAttributes.h:135
llvm::ELF::EF_MIPS_ARCH
@ EF_MIPS_ARCH
Definition: ELF.h:565
llvm::Sched::Source
@ Source
Definition: TargetLowering.h:99
llvm::ARMBuildAttrs::v6
@ v6
Definition: ARMBuildAttributes.h:99
llvm::ELF::EF_LOONGARCH_ABI_DOUBLE_FLOAT
@ EF_LOONGARCH_ABI_DOUBLE_FLOAT
Definition: ELF.h:919
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:152
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:50
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:559
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:744
llvm::RISCVAttrs::ARCH
@ ARCH
Definition: RISCVAttributes.h:30
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:207
llvm::ARMBuildAttrs::v8_A
@ v8_A
Definition: ARMBuildAttributes.h:107
llvm::ELF::EF_MIPS_ARCH_64R2
@ EF_MIPS_ARCH_64R2
Definition: ELF.h:562
llvm::ELF::EF_AMDGPU_MACH_R600_RV770
@ EF_AMDGPU_MACH_R600_RV770
Definition: ELF.h:719
ELFObjectFile.h
llvm::ARMBuildAttrs::AllowFPv4B
@ AllowFPv4B
Definition: ARMBuildAttributes.h:139
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX1035
@ EF_AMDGPU_MACH_AMDGCN_GFX1035
Definition: ELF.h:770
llvm::ARMBuildAttrs::AllowDIVExt
@ AllowDIVExt
Definition: ARMBuildAttributes.h:238
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:749
llvm::Twine
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition: Twine.h:81
llvm::ELF::EF_AMDGPU_MACH_R600_CAICOS
@ EF_AMDGPU_MACH_R600_CAICOS
Definition: ELF.h:728
llvm::ARMBuildAttrs::v8_R
@ v8_R
Definition: ARMBuildAttributes.h:108
llvm::ELF::SHT_GNU_verneed
@ SHT_GNU_verneed
Definition: ELF.h:1025
llvm::Triple::getSubArch
SubArchType getSubArch() const
get the parsed subarchitecture type for this triple.
Definition: Triple.h:357
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:528
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_R600_RV670
@ EF_AMDGPU_MACH_R600_RV670
Definition: ELF.h:715
llvm::ARMBuildAttrs::AllowMVEIntegerAndFloat
@ AllowMVEIntegerAndFloat
Definition: ARMBuildAttributes.h:156
llvm::ARMBuildAttrs::CPU_arch
@ CPU_arch
Definition: ARMBuildAttributes.h:39
llvm::object::ELFObjectFileBase::tryGetCPUName
std::optional< StringRef > tryGetCPUName() const override
Definition: ELFObjectFile.cpp:379
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX803
@ EF_AMDGPU_MACH_AMDGCN_GFX803
Definition: ELF.h:751
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:549
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX906
@ EF_AMDGPU_MACH_AMDGCN_GFX906
Definition: ELF.h:756
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX701
@ EF_AMDGPU_MACH_AMDGCN_GFX701
Definition: ELF.h:744
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX600
@ EF_AMDGPU_MACH_AMDGCN_GFX600
Definition: ELF.h:741
llvm::Expected::takeError
Error takeError()
Take ownership of the stored error.
Definition: Error.h:596
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX1102
@ EF_AMDGPU_MACH_AMDGCN_GFX1102
Definition: ELF.h:780
llvm::Triple::setArchName
void setArchName(StringRef Str)
Set the architecture (first) component of the triple by name.
Definition: Triple.cpp:1357
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX700
@ EF_AMDGPU_MACH_AMDGCN_GFX700
Definition: ELF.h:743
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:727
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX1033
@ EF_AMDGPU_MACH_AMDGCN_GFX1033
Definition: ELF.h:766
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX1101
@ EF_AMDGPU_MACH_AMDGCN_GFX1101
Definition: ELF.h:779
readBBAddrMapImpl
static Expected< std::vector< BBAddrMap > > readBBAddrMapImpl(const ELFFile< ELFT > &EF, std::optional< unsigned > TextSectionIndex)
Definition: ELFObjectFile.cpp:698
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX90A
@ EF_AMDGPU_MACH_AMDGCN_GFX90A
Definition: ELF.h:772
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:77
llvm::ARMBuildAttrs::AllowThumb32
@ AllowThumb32
Definition: ARMBuildAttributes.h:131
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX902
@ EF_AMDGPU_MACH_AMDGCN_GFX902
Definition: ELF.h:754
llvm::ELF::ELFCLASS32
@ ELFCLASS32
Definition: ELF.h:328
llvm::ELF::EF_AMDGPU_MACH_R600_CEDAR
@ EF_AMDGPU_MACH_R600_CEDAR
Definition: ELF.h:721
llvm::Triple::NoSubArch
@ NoSubArch
Definition: Triple.h:111
llvm::ARMBuildAttrs::v6S_M
@ v6S_M
Definition: ARMBuildAttributes.h:105
llvm::ELF::EF_AMDGPU_MACH_AMDGCN_GFX904
@ EF_AMDGPU_MACH_AMDGCN_GFX904
Definition: ELF.h:755
TargetRegistry.h
llvm::ELF::STT_COMMON
@ STT_COMMON
Definition: ELF.h:1238
llvm::ELF::STT_FILE
@ STT_FILE
Definition: ELF.h:1237
llvm::ELF::EF_RISCV_RVC
@ EF_RISCV_RVC
Definition: ELF.h:670
llvm::ELF::STT_OBJECT
@ STT_OBJECT
Definition: ELF.h:1234
llvm::ELF::EF_AMDGPU_MACH_R600_R600
@ EF_AMDGPU_MACH_R600_R600
Definition: ELF.h:712
llvm::StringRef::drop_while
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:615
llvm::object::ELFObjectFileBase::ELFObjectFileBase
ELFObjectFileBase(unsigned int Type, MemoryBufferRef Source)
Definition: ELFObjectFile.cpp:58
llvm::Triple::aarch64
@ aarch64
Definition: Triple.h:51
llvm::ELF::SHT_LLVM_BB_ADDR_MAP_V0
@ SHT_LLVM_BB_ADDR_MAP_V0
Definition: ELF.h:1013
Shdr
Elf_Shdr Shdr
Definition: ELFObjHandler.cpp:78