LLVM  16.0.0git
ELFYAML.h
Go to the documentation of this file.
1 //===- ELFYAML.h - ELF YAMLIO implementation --------------------*- C++ -*-===//
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 /// \file
10 /// This file declares classes for handling the YAML representation
11 /// of ELF.
12 ///
13 //===----------------------------------------------------------------------===//
14 
15 #ifndef LLVM_OBJECTYAML_ELFYAML_H
16 #define LLVM_OBJECTYAML_ELFYAML_H
17 
18 #include "llvm/ADT/StringRef.h"
19 #include "llvm/BinaryFormat/ELF.h"
20 #include "llvm/Object/ELFTypes.h"
22 #include "llvm/ObjectYAML/YAML.h"
24 #include <cstdint>
25 #include <memory>
26 #include <vector>
27 
28 namespace llvm {
29 namespace ELFYAML {
30 
32 std::string appendUniqueSuffix(StringRef Name, const Twine& Msg);
33 
34 // These types are invariant across 32/64-bit ELF, so for simplicity just
35 // directly give them their exact sizes. We don't need to worry about
36 // endianness because these are just the types in the YAMLIO structures,
37 // and are appropriately converted to the necessary endianness when
38 // reading/generating binary object files.
39 // The naming of these types is intended to be ELF_PREFIX, where PREFIX is
40 // the common prefix of the respective constants. E.g. ELF_EM corresponds
41 // to the `e_machine` constants, like `EM_X86_64`.
42 // In the future, these would probably be better suited by C++11 enum
43 // class's with appropriate fixed underlying type.
47 LLVM_YAML_STRONG_TYPEDEF(uint8_t, ELF_ELFCLASS)
48 LLVM_YAML_STRONG_TYPEDEF(uint8_t, ELF_ELFDATA)
49 LLVM_YAML_STRONG_TYPEDEF(uint8_t, ELF_ELFOSABI)
50 // Just use 64, since it can hold 32-bit values too.
52 // Just use 64, since it can hold 32-bit values too.
57 LLVM_YAML_STRONG_TYPEDEF(uint8_t, ELF_RSS)
58 // Just use 64, since it can hold 32-bit values too.
61 LLVM_YAML_STRONG_TYPEDEF(uint8_t, ELF_STB)
62 LLVM_YAML_STRONG_TYPEDEF(uint8_t, ELF_STT)
64 
65 LLVM_YAML_STRONG_TYPEDEF(uint8_t, MIPS_AFL_REG)
66 LLVM_YAML_STRONG_TYPEDEF(uint8_t, MIPS_ABI_FP)
69 LLVM_YAML_STRONG_TYPEDEF(uint32_t, MIPS_AFL_FLAGS1)
71 
72 LLVM_YAML_STRONG_TYPEDEF(StringRef, YAMLFlowString)
73 LLVM_YAML_STRONG_TYPEDEF(int64_t, YAMLIntUInt)
74 
75 template <class ELFT>
76 unsigned getDefaultShEntSize(unsigned EMachine, ELF_SHT SecType,
77  StringRef SecName) {
78  if (EMachine == ELF::EM_MIPS && SecType == ELF::SHT_MIPS_ABIFLAGS)
79  return sizeof(object::Elf_Mips_ABIFlags<ELFT>);
80 
81  switch (SecType) {
82  case ELF::SHT_SYMTAB:
83  case ELF::SHT_DYNSYM:
84  return sizeof(typename ELFT::Sym);
85  case ELF::SHT_GROUP:
86  return sizeof(typename ELFT::Word);
87  case ELF::SHT_REL:
88  return sizeof(typename ELFT::Rel);
89  case ELF::SHT_RELA:
90  return sizeof(typename ELFT::Rela);
91  case ELF::SHT_RELR:
92  return sizeof(typename ELFT::Relr);
93  case ELF::SHT_DYNAMIC:
94  return sizeof(typename ELFT::Dyn);
95  case ELF::SHT_HASH:
96  return sizeof(typename ELFT::Word);
98  return sizeof(typename ELFT::Word);
100  return sizeof(typename ELFT::Half);
102  return sizeof(object::Elf_CGProfile_Impl<ELFT>);
103  default:
104  if (SecName == ".debug_str")
105  return 1;
106  return 0;
107  }
108 }
109 
110 // For now, hardcode 64 bits everywhere that 32 or 64 would be needed
111 // since 64-bit can hold 32-bit values too.
112 struct FileHeader {
113  ELF_ELFCLASS Class;
114  ELF_ELFDATA Data;
115  ELF_ELFOSABI OSABI;
116  llvm::yaml::Hex8 ABIVersion;
117  ELF_ET Type;
119  ELF_EF Flags;
120  llvm::yaml::Hex64 Entry;
122 
130 };
131 
134 };
135 
136 struct Symbol {
138  ELF_STT Type;
141  ELF_STB Binding;
145 
147 };
148 
151 };
152 
153 struct DynamicEntry {
154  ELF_DYNTAG Tag;
155  llvm::yaml::Hex64 Val;
156 };
157 
159  struct BBEntry {
160  llvm::yaml::Hex64 AddressOffset;
161  llvm::yaml::Hex64 Size;
162  llvm::yaml::Hex64 Metadata;
163  };
164  uint8_t Version;
165  llvm::yaml::Hex8 Feature;
166  llvm::yaml::Hex64 Address;
169 };
170 
172  llvm::yaml::Hex64 Address;
173  llvm::yaml::Hex64 Size;
174 };
175 
176 struct NoteEntry {
179  ELF_NT Type;
180 };
181 
182 struct Chunk {
183  enum class ChunkKind {
184  Dynamic,
185  Group,
186  RawContent,
187  Relocation,
188  Relr,
189  NoBits,
190  Note,
191  Hash,
192  GnuHash,
193  Verdef,
194  Verneed,
195  StackSizes,
197  Symver,
199  MipsABIFlags,
200  Addrsig,
204  BBAddrMap,
205 
206  // Special chunks.
210  };
211 
215 
216  // Usually chunks are not created implicitly, but rather loaded from YAML.
217  // This flag is used to signal whether this is the case or not.
219 
221  virtual ~Chunk();
222 };
223 
224 struct Section : public Chunk {
225  ELF_SHT Type;
229  llvm::yaml::Hex64 AddressAlign;
231 
234 
235  // Holds the original section index.
236  unsigned OriginalSecNdx;
237 
239 
240  static bool classof(const Chunk *S) {
241  return S->Kind < ChunkKind::SpecialChunksStart;
242  }
243 
244  // Some derived sections might have their own special entries. This method
245  // returns a vector of <entry name, is used> pairs. It is used for section
246  // validation.
247  virtual std::vector<std::pair<StringRef, bool>> getEntries() const {
248  return {};
249  };
250 
251  // The following members are used to override section fields which is
252  // useful for creating invalid objects.
253 
254  // This can be used to override the sh_addralign field.
256 
257  // This can be used to override the offset stored in the sh_name field.
258  // It does not affect the name stored in the string table.
260 
261  // This can be used to override the sh_offset field. It does not place the
262  // section data at the offset specified.
264 
265  // This can be used to override the sh_size field. It does not affect the
266  // content written.
268 
269  // This can be used to override the sh_flags field.
271 
272  // This can be used to override the sh_type field. It is useful when we
273  // want to use specific YAML keys for a section of a particular type to
274  // describe the content, but still want to have a different final type
275  // for the section.
277 };
278 
279 // Fill is a block of data which is placed outside of sections. It is
280 // not present in the sections header table, but it might affect the output file
281 // size and program headers produced.
282 struct Fill : Chunk {
284  llvm::yaml::Hex64 Size;
285 
286  Fill() : Chunk(ChunkKind::Fill, /*Implicit=*/false) {}
287 
288  static bool classof(const Chunk *S) { return S->Kind == ChunkKind::Fill; }
289 };
290 
294 
295  static bool classof(const Chunk *S) {
296  return S->Kind == ChunkKind::SectionHeaderTable;
297  }
298 
302 
303  size_t getNumHeaders(size_t SectionsNum) const {
304  if (IsImplicit || isDefault())
305  return SectionsNum;
306  if (NoHeaders)
307  return (*NoHeaders) ? 0 : SectionsNum;
308  return (Sections ? Sections->size() : 0) + /*Null section*/ 1;
309  }
310 
311  bool isDefault() const { return !Sections && !Excluded && !NoHeaders; }
312 
313  static constexpr StringRef TypeStr = "SectionHeaderTable";
314 };
315 
318 
319  BBAddrMapSection() : Section(ChunkKind::BBAddrMap) {}
320 
321  std::vector<std::pair<StringRef, bool>> getEntries() const override {
322  return {{"Entries", Entries.has_value()}};
323  };
324 
325  static bool classof(const Chunk *S) {
326  return S->Kind == ChunkKind::BBAddrMap;
327  }
328 };
329 
332 
333  StackSizesSection() : Section(ChunkKind::StackSizes) {}
334 
335  std::vector<std::pair<StringRef, bool>> getEntries() const override {
336  return {{"Entries", Entries.has_value()}};
337  };
338 
339  static bool classof(const Chunk *S) {
340  return S->Kind == ChunkKind::StackSizes;
341  }
342 
343  static bool nameMatches(StringRef Name) {
344  return Name == ".stack_sizes";
345  }
346 };
347 
350 
352 
353  std::vector<std::pair<StringRef, bool>> getEntries() const override {
354  return {{"Entries", Entries.has_value()}};
355  };
356 
357  static bool classof(const Chunk *S) { return S->Kind == ChunkKind::Dynamic; }
358 };
359 
362 
363  RawContentSection() : Section(ChunkKind::RawContent) {}
364 
365  static bool classof(const Chunk *S) {
366  return S->Kind == ChunkKind::RawContent;
367  }
368 
369  // Is used when a content is read as an array of bytes.
371 };
372 
375 
376  static bool classof(const Chunk *S) { return S->Kind == ChunkKind::NoBits; }
377 };
378 
381 
383 
384  std::vector<std::pair<StringRef, bool>> getEntries() const override {
385  return {{"Notes", Notes.has_value()}};
386  };
387 
388  static bool classof(const Chunk *S) { return S->Kind == ChunkKind::Note; }
389 };
390 
394 
395  std::vector<std::pair<StringRef, bool>> getEntries() const override {
396  return {{"Bucket", Bucket.has_value()}, {"Chain", Chain.has_value()}};
397  };
398 
399  // The following members are used to override section fields.
400  // This is useful for creating invalid objects.
403 
405 
406  static bool classof(const Chunk *S) { return S->Kind == ChunkKind::Hash; }
407 };
408 
410  // The number of hash buckets.
411  // Not used when dumping the object, but can be used to override
412  // the real number of buckets when emiting an object from a YAML document.
414 
415  // Index of the first symbol in the dynamic symbol table
416  // included in the hash table.
417  llvm::yaml::Hex32 SymNdx;
418 
419  // The number of words in the Bloom filter.
420  // Not used when dumping the object, but can be used to override the real
421  // number of words in the Bloom filter when emiting an object from a YAML
422  // document.
424 
425  // A shift constant used by the Bloom filter.
426  llvm::yaml::Hex32 Shift2;
427 };
428 
434 
436 
437  std::vector<std::pair<StringRef, bool>> getEntries() const override {
438  return {{"Header", Header.has_value()},
439  {"BloomFilter", BloomFilter.has_value()},
440  {"HashBuckets", HashBuckets.has_value()},
441  {"HashValues", HashValues.has_value()}};
442  };
443 
444  static bool classof(const Chunk *S) { return S->Kind == ChunkKind::GnuHash; }
445 };
446 
447 struct VernauxEntry {
452 };
453 
454 struct VerneedEntry {
457  std::vector<VernauxEntry> AuxV;
458 };
459 
463 
465 
466  std::vector<std::pair<StringRef, bool>> getEntries() const override {
467  return {{"Dependencies", VerneedV.has_value()}};
468  };
469 
470  static bool classof(const Chunk *S) {
471  return S->Kind == ChunkKind::Verneed;
472  }
473 };
474 
477 
479 
480  std::vector<std::pair<StringRef, bool>> getEntries() const override {
481  return {{"Symbols", Symbols.has_value()}};
482  };
483 
484  static bool classof(const Chunk *S) { return S->Kind == ChunkKind::Addrsig; }
485 };
486 
487 struct LinkerOption {
490 };
491 
494 
495  LinkerOptionsSection() : Section(ChunkKind::LinkerOptions) {}
496 
497  std::vector<std::pair<StringRef, bool>> getEntries() const override {
498  return {{"Options", Options.has_value()}};
499  };
500 
501  static bool classof(const Chunk *S) {
502  return S->Kind == ChunkKind::LinkerOptions;
503  }
504 };
505 
508 
509  DependentLibrariesSection() : Section(ChunkKind::DependentLibraries) {}
510 
511  std::vector<std::pair<StringRef, bool>> getEntries() const override {
512  return {{"Libraries", Libs.has_value()}};
513  };
514 
515  static bool classof(const Chunk *S) {
516  return S->Kind == ChunkKind::DependentLibraries;
517  }
518 };
519 
520 // Represents the call graph profile section entry.
522  // The weight of the edge.
524 };
525 
528 
529  CallGraphProfileSection() : Section(ChunkKind::CallGraphProfile) {}
530 
531  std::vector<std::pair<StringRef, bool>> getEntries() const override {
532  return {{"Entries", Entries.has_value()}};
533  };
534 
535  static bool classof(const Chunk *S) {
536  return S->Kind == ChunkKind::CallGraphProfile;
537  }
538 };
539 
542 
544 
545  std::vector<std::pair<StringRef, bool>> getEntries() const override {
546  return {{"Entries", Entries.has_value()}};
547  };
548 
549  static bool classof(const Chunk *S) { return S->Kind == ChunkKind::Symver; }
550 };
551 
552 struct VerdefEntry {
557  std::vector<StringRef> VerNames;
558 };
559 
563 
565 
566  std::vector<std::pair<StringRef, bool>> getEntries() const override {
567  return {{"Entries", Entries.has_value()}};
568  };
569 
570  static bool classof(const Chunk *S) { return S->Kind == ChunkKind::Verdef; }
571 };
572 
574  // Members of a group contain a flag and a list of section indices
575  // that are part of the group.
578 
580 
581  std::vector<std::pair<StringRef, bool>> getEntries() const override {
582  return {{"Members", Members.has_value()}};
583  };
584 
585  static bool classof(const Chunk *S) { return S->Kind == ChunkKind::Group; }
586 };
587 
588 struct Relocation {
589  llvm::yaml::Hex64 Offset;
590  YAMLIntUInt Addend;
591  ELF_REL Type;
593 };
594 
598 
600 
601  std::vector<std::pair<StringRef, bool>> getEntries() const override {
602  return {{"Relocations", Relocations.has_value()}};
603  };
604 
605  static bool classof(const Chunk *S) {
606  return S->Kind == ChunkKind::Relocation;
607  }
608 };
609 
612 
614 
615  std::vector<std::pair<StringRef, bool>> getEntries() const override {
616  return {{"Entries", Entries.has_value()}};
617  };
618 
619  static bool classof(const Chunk *S) {
620  return S->Kind == ChunkKind::Relr;
621  }
622 };
623 
626 
628 
629  std::vector<std::pair<StringRef, bool>> getEntries() const override {
630  return {{"Entries", Entries.has_value()}};
631  };
632 
633  static bool classof(const Chunk *S) {
634  return S->Kind == ChunkKind::SymtabShndxSection;
635  }
636 };
637 
639  llvm::yaml::Hex32 Offset;
640  llvm::yaml::Hex32 Value;
641 };
642 
645 
646  ARMIndexTableSection() : Section(ChunkKind::ARMIndexTable) {}
647 
648  std::vector<std::pair<StringRef, bool>> getEntries() const override {
649  return {{"Entries", Entries.has_value()}};
650  };
651 
652  static bool classof(const Chunk *S) {
653  return S->Kind == ChunkKind::ARMIndexTable;
654  }
655 };
656 
657 // Represents .MIPS.abiflags section
659  llvm::yaml::Hex16 Version;
660  MIPS_ISA ISALevel;
661  llvm::yaml::Hex8 ISARevision;
662  MIPS_AFL_REG GPRSize;
663  MIPS_AFL_REG CPR1Size;
664  MIPS_AFL_REG CPR2Size;
665  MIPS_ABI_FP FpABI;
666  MIPS_AFL_EXT ISAExtension;
667  MIPS_AFL_ASE ASEs;
668  MIPS_AFL_FLAGS1 Flags1;
669  llvm::yaml::Hex32 Flags2;
670 
672 
673  static bool classof(const Chunk *S) {
674  return S->Kind == ChunkKind::MipsABIFlags;
675  }
676 };
677 
679  ELF_PT Type;
680  ELF_PF Flags;
681  llvm::yaml::Hex64 VAddr;
682  llvm::yaml::Hex64 PAddr;
689 
690  // This vector contains all chunks from [FirstSec, LastSec].
691  std::vector<Chunk *> Chunks;
692 };
693 
694 struct Object {
696  std::vector<ProgramHeader> ProgramHeaders;
697 
698  // An object might contain output section descriptions as well as
699  // custom data that does not belong to any section.
700  std::vector<std::unique_ptr<Chunk>> Chunks;
701 
702  // Although in reality the symbols reside in a section, it is a lot
703  // cleaner and nicer if we read them from the YAML as a separate
704  // top-level key, which automatically ensures that invariants like there
705  // being a single SHT_SYMTAB section are upheld.
709 
710  std::vector<Section *> getSections() {
711  std::vector<Section *> Ret;
712  for (const std::unique_ptr<Chunk> &Sec : Chunks)
713  if (auto S = dyn_cast<ELFYAML::Section>(Sec.get()))
714  Ret.push_back(S);
715  return Ret;
716  }
717 
719  for (const std::unique_ptr<Chunk> &C : Chunks)
720  if (auto *S = dyn_cast<ELFYAML::SectionHeaderTable>(C.get()))
721  return *S;
722  llvm_unreachable("the section header table chunk must always be present");
723  }
724 
725  ELF_ELFOSABI getOSAbi() const;
726  unsigned getMachine() const;
727 };
728 
730  const NoBitsSection &S);
731 
732 } // end namespace ELFYAML
733 } // end namespace llvm
734 
744 LLVM_YAML_IS_SEQUENCE_VECTOR(std::unique_ptr<llvm::ELFYAML::Chunk>)
752 
753 namespace llvm {
754 namespace yaml {
755 
756 template <> struct ScalarTraits<ELFYAML::YAMLIntUInt> {
757  static void output(const ELFYAML::YAMLIntUInt &Val, void *Ctx,
758  raw_ostream &Out);
759  static StringRef input(StringRef Scalar, void *Ctx,
760  ELFYAML::YAMLIntUInt &Val);
761  static QuotingType mustQuote(StringRef) { return QuotingType::None; }
762 };
763 
764 template <>
765 struct ScalarEnumerationTraits<ELFYAML::ELF_ET> {
766  static void enumeration(IO &IO, ELFYAML::ELF_ET &Value);
767 };
768 
769 template <> struct ScalarEnumerationTraits<ELFYAML::ELF_PT> {
770  static void enumeration(IO &IO, ELFYAML::ELF_PT &Value);
771 };
772 
773 template <> struct ScalarEnumerationTraits<ELFYAML::ELF_NT> {
774  static void enumeration(IO &IO, ELFYAML::ELF_NT &Value);
775 };
776 
777 template <>
778 struct ScalarEnumerationTraits<ELFYAML::ELF_EM> {
779  static void enumeration(IO &IO, ELFYAML::ELF_EM &Value);
780 };
781 
782 template <>
783 struct ScalarEnumerationTraits<ELFYAML::ELF_ELFCLASS> {
784  static void enumeration(IO &IO, ELFYAML::ELF_ELFCLASS &Value);
785 };
786 
787 template <>
788 struct ScalarEnumerationTraits<ELFYAML::ELF_ELFDATA> {
789  static void enumeration(IO &IO, ELFYAML::ELF_ELFDATA &Value);
790 };
791 
792 template <>
793 struct ScalarEnumerationTraits<ELFYAML::ELF_ELFOSABI> {
794  static void enumeration(IO &IO, ELFYAML::ELF_ELFOSABI &Value);
795 };
796 
797 template <>
798 struct ScalarBitSetTraits<ELFYAML::ELF_EF> {
799  static void bitset(IO &IO, ELFYAML::ELF_EF &Value);
800 };
801 
802 template <> struct ScalarBitSetTraits<ELFYAML::ELF_PF> {
803  static void bitset(IO &IO, ELFYAML::ELF_PF &Value);
804 };
805 
806 template <>
807 struct ScalarEnumerationTraits<ELFYAML::ELF_SHT> {
808  static void enumeration(IO &IO, ELFYAML::ELF_SHT &Value);
809 };
810 
811 template <>
812 struct ScalarBitSetTraits<ELFYAML::ELF_SHF> {
813  static void bitset(IO &IO, ELFYAML::ELF_SHF &Value);
814 };
815 
816 template <> struct ScalarEnumerationTraits<ELFYAML::ELF_SHN> {
817  static void enumeration(IO &IO, ELFYAML::ELF_SHN &Value);
818 };
819 
820 template <> struct ScalarEnumerationTraits<ELFYAML::ELF_STB> {
821  static void enumeration(IO &IO, ELFYAML::ELF_STB &Value);
822 };
823 
824 template <>
825 struct ScalarEnumerationTraits<ELFYAML::ELF_STT> {
826  static void enumeration(IO &IO, ELFYAML::ELF_STT &Value);
827 };
828 
829 template <>
830 struct ScalarEnumerationTraits<ELFYAML::ELF_REL> {
831  static void enumeration(IO &IO, ELFYAML::ELF_REL &Value);
832 };
833 
834 template <>
835 struct ScalarEnumerationTraits<ELFYAML::ELF_DYNTAG> {
836  static void enumeration(IO &IO, ELFYAML::ELF_DYNTAG &Value);
837 };
838 
839 template <>
840 struct ScalarEnumerationTraits<ELFYAML::ELF_RSS> {
841  static void enumeration(IO &IO, ELFYAML::ELF_RSS &Value);
842 };
843 
844 template <>
845 struct ScalarEnumerationTraits<ELFYAML::MIPS_AFL_REG> {
846  static void enumeration(IO &IO, ELFYAML::MIPS_AFL_REG &Value);
847 };
848 
849 template <>
850 struct ScalarEnumerationTraits<ELFYAML::MIPS_ABI_FP> {
851  static void enumeration(IO &IO, ELFYAML::MIPS_ABI_FP &Value);
852 };
853 
854 template <>
855 struct ScalarEnumerationTraits<ELFYAML::MIPS_AFL_EXT> {
856  static void enumeration(IO &IO, ELFYAML::MIPS_AFL_EXT &Value);
857 };
858 
859 template <>
860 struct ScalarEnumerationTraits<ELFYAML::MIPS_ISA> {
861  static void enumeration(IO &IO, ELFYAML::MIPS_ISA &Value);
862 };
863 
864 template <>
865 struct ScalarBitSetTraits<ELFYAML::MIPS_AFL_ASE> {
866  static void bitset(IO &IO, ELFYAML::MIPS_AFL_ASE &Value);
867 };
868 
869 template <>
870 struct ScalarBitSetTraits<ELFYAML::MIPS_AFL_FLAGS1> {
871  static void bitset(IO &IO, ELFYAML::MIPS_AFL_FLAGS1 &Value);
872 };
873 
874 template <>
875 struct MappingTraits<ELFYAML::FileHeader> {
876  static void mapping(IO &IO, ELFYAML::FileHeader &FileHdr);
877 };
878 
879 template <> struct MappingTraits<ELFYAML::SectionHeader> {
880  static void mapping(IO &IO, ELFYAML::SectionHeader &SHdr);
881 };
882 
883 template <> struct MappingTraits<ELFYAML::ProgramHeader> {
884  static void mapping(IO &IO, ELFYAML::ProgramHeader &FileHdr);
885  static std::string validate(IO &IO, ELFYAML::ProgramHeader &FileHdr);
886 };
887 
888 template <>
889 struct MappingTraits<ELFYAML::Symbol> {
890  static void mapping(IO &IO, ELFYAML::Symbol &Symbol);
891  static std::string validate(IO &IO, ELFYAML::Symbol &Symbol);
892 };
893 
894 template <> struct MappingTraits<ELFYAML::StackSizeEntry> {
895  static void mapping(IO &IO, ELFYAML::StackSizeEntry &Rel);
896 };
897 
898 template <> struct MappingTraits<ELFYAML::BBAddrMapEntry> {
899  static void mapping(IO &IO, ELFYAML::BBAddrMapEntry &Rel);
900 };
901 
902 template <> struct MappingTraits<ELFYAML::BBAddrMapEntry::BBEntry> {
903  static void mapping(IO &IO, ELFYAML::BBAddrMapEntry::BBEntry &Rel);
904 };
905 
906 template <> struct MappingTraits<ELFYAML::GnuHashHeader> {
907  static void mapping(IO &IO, ELFYAML::GnuHashHeader &Rel);
908 };
909 
910 template <> struct MappingTraits<ELFYAML::DynamicEntry> {
911  static void mapping(IO &IO, ELFYAML::DynamicEntry &Rel);
912 };
913 
914 template <> struct MappingTraits<ELFYAML::NoteEntry> {
915  static void mapping(IO &IO, ELFYAML::NoteEntry &N);
916 };
917 
918 template <> struct MappingTraits<ELFYAML::VerdefEntry> {
919  static void mapping(IO &IO, ELFYAML::VerdefEntry &E);
920 };
921 
922 template <> struct MappingTraits<ELFYAML::VerneedEntry> {
923  static void mapping(IO &IO, ELFYAML::VerneedEntry &E);
924 };
925 
926 template <> struct MappingTraits<ELFYAML::VernauxEntry> {
927  static void mapping(IO &IO, ELFYAML::VernauxEntry &E);
928 };
929 
930 template <> struct MappingTraits<ELFYAML::LinkerOption> {
931  static void mapping(IO &IO, ELFYAML::LinkerOption &Sym);
932 };
933 
934 template <> struct MappingTraits<ELFYAML::CallGraphEntryWeight> {
935  static void mapping(IO &IO, ELFYAML::CallGraphEntryWeight &E);
936 };
937 
938 template <> struct MappingTraits<ELFYAML::Relocation> {
939  static void mapping(IO &IO, ELFYAML::Relocation &Rel);
940 };
941 
942 template <> struct MappingTraits<ELFYAML::ARMIndexTableEntry> {
943  static void mapping(IO &IO, ELFYAML::ARMIndexTableEntry &E);
944 };
945 
946 template <> struct MappingTraits<std::unique_ptr<ELFYAML::Chunk>> {
947  static void mapping(IO &IO, std::unique_ptr<ELFYAML::Chunk> &C);
948  static std::string validate(IO &io, std::unique_ptr<ELFYAML::Chunk> &C);
949 };
950 
951 template <>
952 struct MappingTraits<ELFYAML::Object> {
953  static void mapping(IO &IO, ELFYAML::Object &Object);
954 };
955 
956 template <> struct MappingTraits<ELFYAML::SectionOrType> {
957  static void mapping(IO &IO, ELFYAML::SectionOrType &sectionOrType);
958 };
959 
960 } // end namespace yaml
961 } // end namespace llvm
962 
963 #endif // LLVM_OBJECTYAML_ELFYAML_H
llvm::ELFYAML::Object::DWARF
Optional< DWARFYAML::Data > DWARF
Definition: ELFYAML.h:708
llvm::ELFYAML::BBAddrMapSection::getEntries
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition: ELFYAML.h:321
llvm::ELFYAML::BBAddrMapEntry::Address
llvm::yaml::Hex64 Address
Definition: ELFYAML.h:166
llvm::ELFYAML::Relocation::Symbol
Optional< StringRef > Symbol
Definition: ELFYAML.h:592
llvm::ELFYAML::Chunk::Chunk
Chunk(ChunkKind K, bool Implicit)
Definition: ELFYAML.h:220
llvm::ELFYAML::StackSizeEntry::Address
llvm::yaml::Hex64 Address
Definition: ELFYAML.h:172
llvm::ELFYAML::BBAddrMapSection::BBAddrMapSection
BBAddrMapSection()
Definition: ELFYAML.h:319
llvm::ELFYAML::LinkerOptionsSection::getEntries
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition: ELFYAML.h:497
llvm::ELFYAML::HashSection::NChain
Optional< llvm::yaml::Hex64 > NChain
Definition: ELFYAML.h:402
llvm::ELFYAML::Section::Flags
Optional< ELF_SHF > Flags
Definition: ELFYAML.h:226
llvm::ELFYAML::Chunk::ChunkKind::SectionHeaderTable
@ SectionHeaderTable
llvm::ELF::SHT_GROUP
@ SHT_GROUP
Definition: ELF.h:994
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
llvm::ELFYAML::NoteSection
Definition: ELFYAML.h:379
llvm::ELFYAML::Object::Symbols
Optional< std::vector< Symbol > > Symbols
Definition: ELFYAML.h:706
llvm::ELFYAML::AddrsigSection::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:484
llvm::ELFYAML::shouldAllocateFileSpace
bool shouldAllocateFileSpace(ArrayRef< ProgramHeader > Phdrs, const NoBitsSection &S)
Definition: ELFEmitter.cpp:1221
llvm::ELFYAML::StackSizesSection::Entries
Optional< std::vector< StackSizeEntry > > Entries
Definition: ELFYAML.h:331
llvm::ELFYAML::SectionHeaderTable::Sections
Optional< std::vector< SectionHeader > > Sections
Definition: ELFYAML.h:299
llvm::ELFYAML::Symbol::Section
Optional< StringRef > Section
Definition: ELFYAML.h:139
llvm::ELFYAML::ProgramHeader::Chunks
std::vector< Chunk * > Chunks
Definition: ELFYAML.h:691
llvm::ELFYAML::getDefaultShEntSize
unsigned getDefaultShEntSize(unsigned EMachine, ELF_SHT SecType, StringRef SecName)
Definition: ELFYAML.h:76
llvm::ELFYAML::Chunk::ChunkKind::NoBits
@ NoBits
llvm::ELFYAML::Fill
Definition: ELFYAML.h:282
llvm::ELFYAML::GroupSection::GroupSection
GroupSection()
Definition: ELFYAML.h:579
llvm::ELFYAML::CallGraphProfileSection::Entries
Optional< std::vector< CallGraphEntryWeight > > Entries
Definition: ELFYAML.h:527
llvm::ELFYAML::NoteSection::getEntries
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition: ELFYAML.h:384
llvm::ELFYAML::FileHeader::EShOff
Optional< llvm::yaml::Hex64 > EShOff
Definition: ELFYAML.h:127
llvm::ELFYAML::ARMIndexTableSection::Entries
Optional< std::vector< ARMIndexTableEntry > > Entries
Definition: ELFYAML.h:644
llvm::ELFYAML::Object::DynamicSymbols
Optional< std::vector< Symbol > > DynamicSymbols
Definition: ELFYAML.h:707
Note
We currently emits eax Perhaps this is what we really should generate is Is imull three or four cycles Note
Definition: README.txt:239
StringRef.h
llvm::ELFYAML::Relocation::Offset
llvm::yaml::Hex64 Offset
Definition: ELFYAML.h:589
llvm::ELFYAML::RawContentSection::RawContentSection
RawContentSection()
Definition: ELFYAML.h:363
llvm::ELFYAML::MipsABIFlags::ASEs
MIPS_AFL_ASE ASEs
Definition: ELFYAML.h:667
llvm::ELFYAML::CallGraphProfileSection
Definition: ELFYAML.h:526
llvm::ELFYAML::FileHeader::Type
ELF_ET Type
Definition: ELFYAML.h:117
llvm::ELFYAML::LinkerOption
Definition: ELFYAML.h:487
output
Current output
Definition: README.txt:1350
llvm::ELFYAML::VerdefEntry
Definition: ELFYAML.h:552
llvm::ELFYAML::VernauxEntry::Name
StringRef Name
Definition: ELFYAML.h:451
llvm::ELFYAML::Symbol::Size
Optional< llvm::yaml::Hex64 > Size
Definition: ELFYAML.h:143
llvm::ELFYAML::HashSection::getEntries
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition: ELFYAML.h:395
llvm::ELFYAML::Chunk::ChunkKind::GnuHash
@ GnuHash
llvm::ELFYAML::GroupSection
Definition: ELFYAML.h:573
llvm::ELFYAML::FileHeader
Definition: ELFYAML.h:112
llvm::ELF::SHT_HASH
@ SHT_HASH
Definition: ELF.h:984
llvm::ELFYAML::Symbol::Name
StringRef Name
Definition: ELFYAML.h:137
llvm::ELFYAML::NoBitsSection
Definition: ELFYAML.h:373
llvm::ELFYAML::GroupSection::getEntries
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition: ELFYAML.h:581
llvm::ELFYAML::VerdefSection::Info
Optional< llvm::yaml::Hex64 > Info
Definition: ELFYAML.h:562
LLVM_YAML_IS_SEQUENCE_VECTOR
#define LLVM_YAML_IS_SEQUENCE_VECTOR(type)
llvm::ELF::SHT_DYNSYM
@ SHT_DYNSYM
Definition: ELF.h:990
llvm::ELFYAML::GnuHashHeader::MaskWords
Optional< llvm::yaml::Hex32 > MaskWords
Definition: ELFYAML.h:423
llvm::ELFYAML::ProgramHeader
Definition: ELFYAML.h:678
llvm::ELFYAML::Section::ShAddrAlign
Optional< llvm::yaml::Hex64 > ShAddrAlign
Definition: ELFYAML.h:249
llvm::ELFYAML::Chunk::ChunkKind::MipsABIFlags
@ MipsABIFlags
llvm::ELFYAML::Chunk::~Chunk
virtual ~Chunk()
llvm::ELFYAML::RelrSection::getEntries
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition: ELFYAML.h:615
llvm::ELFYAML::FileHeader::EPhOff
Optional< llvm::yaml::Hex64 > EPhOff
Definition: ELFYAML.h:123
llvm::ELF::SHT_SYMTAB
@ SHT_SYMTAB
Definition: ELF.h:981
llvm::ELFYAML::HashSection::NBucket
Optional< llvm::yaml::Hex64 > NBucket
Definition: ELFYAML.h:397
llvm::ELFYAML::GnuHashHeader::Shift2
llvm::yaml::Hex32 Shift2
Definition: ELFYAML.h:426
llvm::ELFYAML::Chunk::Offset
Optional< llvm::yaml::Hex64 > Offset
Definition: ELFYAML.h:214
llvm::ELFYAML::RelocationSection::RelocatableSec
StringRef RelocatableSec
Definition: ELFYAML.h:597
llvm::ELFYAML::Section::Address
Optional< llvm::yaml::Hex64 > Address
Definition: ELFYAML.h:227
llvm::object::Elf_Mips_ABIFlags
Definition: ELFTypes.h:782
llvm::ELFYAML::FileHeader::Machine
Optional< ELF_EM > Machine
Definition: ELFYAML.h:118
llvm::ELFYAML::LinkerOptionsSection::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:501
llvm::ELFYAML::HashSection::HashSection
HashSection()
Definition: ELFYAML.h:404
llvm::Optional< ELF_EM >
llvm::ELFYAML::AddrsigSection
Definition: ELFYAML.h:475
llvm::ELF::SHT_GNU_versym
@ SHT_GNU_versym
Definition: ELF.h:1026
llvm::ELFYAML::Fill::Size
llvm::yaml::Hex64 Size
Definition: ELFYAML.h:284
llvm::ELFYAML::Symbol::Type
ELF_STT Type
Definition: ELFYAML.h:138
llvm::ELFYAML::SectionHeader::Name
StringRef Name
Definition: ELFYAML.h:133
llvm::ELFYAML::Chunk::ChunkKind::Relocation
@ Relocation
llvm::ELFYAML::FileHeader::EShNum
Optional< llvm::yaml::Hex16 > EShNum
Definition: ELFYAML.h:128
llvm::ELFYAML::Object::getOSAbi
ELF_ELFOSABI getOSAbi() const
Definition: ELFYAML.cpp:32
llvm::MipsISD::Ret
@ Ret
Definition: MipsISelLowering.h:119
llvm::ELFYAML::RelrSection::Entries
Optional< std::vector< llvm::yaml::Hex64 > > Entries
Definition: ELFYAML.h:611
llvm::ELFYAML::SymverSection::getEntries
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition: ELFYAML.h:545
llvm::ELFYAML::VerdefSection::Entries
Optional< std::vector< VerdefEntry > > Entries
Definition: ELFYAML.h:561
llvm::ELFYAML::GnuHashSection::Header
Optional< GnuHashHeader > Header
Definition: ELFYAML.h:430
llvm::ELFYAML::Chunk::ChunkKind::DependentLibraries
@ DependentLibraries
llvm::yaml::MappingTraits
Definition: ModuleSummaryIndex.h:53
llvm::ELFYAML::Chunk::Kind
ChunkKind Kind
Definition: ELFYAML.h:212
llvm::ELFYAML::SymtabShndxSection::getEntries
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition: ELFYAML.h:629
llvm::RISCVFeatures::validate
void validate(const Triple &TT, const FeatureBitset &FeatureBits)
Definition: RISCVBaseInfo.cpp:97
llvm::ELFYAML::Symbol::Other
Optional< uint8_t > Other
Definition: ELFYAML.h:144
llvm::ELFYAML::RawContentSection
Definition: ELFYAML.h:360
llvm::ELFYAML::VerdefSection::getEntries
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition: ELFYAML.h:566
llvm::ELFYAML::FileHeader::SectionHeaderStringTable
Optional< StringRef > SectionHeaderStringTable
Definition: ELFYAML.h:121
llvm::ELFYAML::MipsABIFlags::CPR2Size
MIPS_AFL_REG CPR2Size
Definition: ELFYAML.h:664
llvm::ELFYAML::DynamicSection::getEntries
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition: ELFYAML.h:353
llvm::ELFYAML::NoteSection::NoteSection
NoteSection()
Definition: ELFYAML.h:382
llvm::ELFYAML::RawContentSection::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:365
llvm::ELFYAML::SectionHeader
Definition: ELFYAML.h:132
llvm::ELFYAML::VernauxEntry::Hash
uint32_t Hash
Definition: ELFYAML.h:448
llvm::ELFYAML::DependentLibrariesSection::Libs
Optional< std::vector< YAMLFlowString > > Libs
Definition: ELFYAML.h:507
llvm::ELFYAML::VerneedSection::VerneedSection
VerneedSection()
Definition: ELFYAML.h:464
llvm::ELFYAML::VerdefEntry::Version
Optional< uint16_t > Version
Definition: ELFYAML.h:553
llvm::ELFYAML::Chunk::ChunkKind
ChunkKind
Definition: ELFYAML.h:183
llvm::yaml::ScalarTraits< ELFYAML::YAMLIntUInt >::mustQuote
static QuotingType mustQuote(StringRef)
Definition: ELFYAML.h:761
llvm::ELFYAML::SectionHeaderTable::getNumHeaders
size_t getNumHeaders(size_t SectionsNum) const
Definition: ELFYAML.h:303
llvm::ELFYAML::RelocationSection::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:605
llvm::ELFYAML::VerdefEntry::VerNames
std::vector< StringRef > VerNames
Definition: ELFYAML.h:557
llvm::ELFYAML::BBAddrMapEntry::BBEntries
Optional< std::vector< BBEntry > > BBEntries
Definition: ELFYAML.h:168
llvm::ELFYAML::GnuHashSection::GnuHashSection
GnuHashSection()
Definition: ELFYAML.h:435
llvm::ELFYAML::Chunk::ChunkKind::RawContent
@ RawContent
llvm::ELFYAML::RelocationSection::getEntries
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition: ELFYAML.h:601
llvm::ELFYAML::Object::getSections
std::vector< Section * > getSections()
Definition: ELFYAML.h:710
ELF.h
llvm::ELFYAML::NoteEntry::Type
ELF_NT Type
Definition: ELFYAML.h:179
llvm::ELFYAML::Chunk::ChunkKind::Verdef
@ Verdef
llvm::ELFYAML::MipsABIFlags::MipsABIFlags
MipsABIFlags()
Definition: ELFYAML.h:671
llvm::ELFYAML::SectionHeaderTable::isDefault
bool isDefault() const
Definition: ELFYAML.h:311
llvm::ELFYAML::Section::EntSize
Optional< llvm::yaml::Hex64 > EntSize
Definition: ELFYAML.h:230
llvm::ELFYAML::Relocation
Definition: ELFYAML.h:588
llvm::ELFYAML::Symbol::StName
Optional< uint32_t > StName
Definition: ELFYAML.h:146
llvm::ELFYAML::GnuHashSection::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:444
llvm::ELFYAML::VerneedSection::Info
Optional< llvm::yaml::Hex64 > Info
Definition: ELFYAML.h:462
E
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
llvm::ELFYAML::LinkerOptionsSection::Options
Optional< std::vector< LinkerOption > > Options
Definition: ELFYAML.h:493
C
(vector float) vec_cmpeq(*A, *B) C
Definition: README_ALTIVEC.txt:86
llvm::ELFYAML::CallGraphProfileSection::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:535
llvm::ELFYAML::GnuHashSection::BloomFilter
Optional< std::vector< llvm::yaml::Hex64 > > BloomFilter
Definition: ELFYAML.h:431
llvm::ELFYAML::Section::ShName
Optional< llvm::yaml::Hex64 > ShName
Definition: ELFYAML.h:259
llvm::ELFYAML::VerneedEntry
Definition: ELFYAML.h:454
llvm::ELFYAML::ARMIndexTableSection::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:652
llvm::ELFYAML::Chunk::ChunkKind::Symver
@ Symver
llvm::ELFYAML::VerneedEntry::File
StringRef File
Definition: ELFYAML.h:456
llvm::ELFYAML::AddrsigSection::AddrsigSection
AddrsigSection()
Definition: ELFYAML.h:478
llvm::ELFYAML::Section::ShFlags
Optional< llvm::yaml::Hex64 > ShFlags
Definition: ELFYAML.h:270
llvm::ELFYAML::Symbol::Value
Optional< llvm::yaml::Hex64 > Value
Definition: ELFYAML.h:142
llvm::ELFYAML::FileHeader::EShStrNdx
Optional< llvm::yaml::Hex16 > EShStrNdx
Definition: ELFYAML.h:129
false
Definition: StackSlotColoring.cpp:141
YAML.h
llvm::ELFYAML::MipsABIFlags::Flags2
llvm::yaml::Hex32 Flags2
Definition: ELFYAML.h:669
llvm::ELFYAML::GnuHashSection
Definition: ELFYAML.h:429
llvm::ELFYAML::RawContentSection::ContentBuf
Optional< std::vector< uint8_t > > ContentBuf
Definition: ELFYAML.h:370
llvm::ELFYAML::LinkerOption::Key
StringRef Key
Definition: ELFYAML.h:488
llvm::ELFYAML::GnuHashSection::HashValues
Optional< std::vector< llvm::yaml::Hex32 > > HashValues
Definition: ELFYAML.h:433
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:53
llvm::ELFYAML::RelocationSection
Definition: ELFYAML.h:595
llvm::ELFYAML::Symbol::Index
Optional< ELF_SHN > Index
Definition: ELFYAML.h:140
llvm::ELFYAML::Chunk::ChunkKind::BBAddrMap
@ BBAddrMap
llvm::ELFYAML::NoteSection::Notes
Optional< std::vector< ELFYAML::NoteEntry > > Notes
Definition: ELFYAML.h:380
input
The initial backend is deliberately restricted to z10 We should add support for later architectures at some point If an asm ties an i32 r result to an i64 input
Definition: README.txt:10
llvm::ELF::SHT_MIPS_ABIFLAGS
@ SHT_MIPS_ABIFLAGS
Definition: ELF.h:1049
llvm::ELFYAML::VerneedSection::VerneedV
Optional< std::vector< VerneedEntry > > VerneedV
Definition: ELFYAML.h:461
llvm::ELFYAML::GnuHashHeader::NBuckets
Optional< llvm::yaml::Hex32 > NBuckets
Definition: ELFYAML.h:413
llvm::ELFYAML::BBAddrMapSection::Entries
Optional< std::vector< BBAddrMapEntry > > Entries
Definition: ELFYAML.h:317
llvm::ELFYAML::Section::ShSize
Optional< llvm::yaml::Hex64 > ShSize
Definition: ELFYAML.h:267
llvm::ELFYAML::StackSizesSection::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:339
llvm::ELFYAML::NoBitsSection::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:376
llvm::ELFYAML::DependentLibrariesSection::getEntries
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition: ELFYAML.h:511
llvm::ELFYAML::BBAddrMapEntry::Feature
llvm::yaml::Hex8 Feature
Definition: ELFYAML.h:165
llvm::ELFYAML::DynamicEntry::Tag
ELF_DYNTAG Tag
Definition: ELFYAML.h:154
llvm::ELFYAML::BBAddrMapEntry::BBEntry::Size
llvm::yaml::Hex64 Size
Definition: ELFYAML.h:161
llvm::ELFYAML::SymverSection
Definition: ELFYAML.h:540
llvm::ELFYAML::VerdefSection::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:570
llvm::ELFYAML::dropUniqueSuffix
StringRef dropUniqueSuffix(StringRef S)
Definition: ELFEmitter.cpp:694
llvm::ELFYAML::ProgramHeader::LastSec
Optional< StringRef > LastSec
Definition: ELFYAML.h:688
llvm::OutputFileType::Object
@ Object
DWARFYAML.h
llvm::ELFYAML::Object
Definition: ELFYAML.h:694
llvm::ELFYAML::SectionHeaderTable::NoHeaders
Optional< bool > NoHeaders
Definition: ELFYAML.h:301
llvm::ELFYAML::Fill::Pattern
Optional< yaml::BinaryRef > Pattern
Definition: ELFYAML.h:283
llvm::ELFYAML::SectionOrType::sectionNameOrType
StringRef sectionNameOrType
Definition: ELFYAML.h:150
llvm::ELFYAML::GroupSection::Members
Optional< std::vector< SectionOrType > > Members
Definition: ELFYAML.h:576
llvm::ELFYAML::Object::getMachine
unsigned getMachine() const
Definition: ELFYAML.cpp:34
llvm::ELFYAML::appendUniqueSuffix
std::string appendUniqueSuffix(StringRef Name, const Twine &Msg)
Definition: ELFEmitter.cpp:687
llvm::ELFYAML::CallGraphProfileSection::getEntries
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition: ELFYAML.h:531
llvm::ELFYAML::SymtabShndxSection::Entries
Optional< std::vector< uint32_t > > Entries
Definition: ELFYAML.h:625
llvm::ELFYAML::SectionOrType
Definition: ELFYAML.h:149
llvm::ELFYAML::ARMIndexTableEntry::Value
llvm::yaml::Hex32 Value
Definition: ELFYAML.h:640
llvm::ELFYAML::SymtabShndxSection::SymtabShndxSection
SymtabShndxSection()
Definition: ELFYAML.h:627
uint64_t
llvm::ELFYAML::SectionHeaderTable::TypeStr
static constexpr StringRef TypeStr
Definition: ELFYAML.h:313
llvm::ELFYAML::DynamicSection::DynamicSection
DynamicSection()
Definition: ELFYAML.h:351
llvm::ELFYAML::Chunk::ChunkKind::ARMIndexTable
@ ARMIndexTable
llvm::ELFYAML::ProgramHeader::Align
Optional< llvm::yaml::Hex64 > Align
Definition: ELFYAML.h:683
llvm::ELFYAML::SymtabShndxSection
Definition: ELFYAML.h:624
llvm::ELFYAML::ProgramHeader::FirstSec
Optional< StringRef > FirstSec
Definition: ELFYAML.h:687
llvm::ELFYAML::RawContentSection::Info
Optional< llvm::yaml::Hex64 > Info
Definition: ELFYAML.h:361
llvm::ELFYAML::FileHeader::Flags
ELF_EF Flags
Definition: ELFYAML.h:119
llvm::ELFYAML::ProgramHeader::Type
ELF_PT Type
Definition: ELFYAML.h:679
llvm::ELFYAML::BBAddrMapSection
Definition: ELFYAML.h:316
LLVM_YAML_STRONG_TYPEDEF
#define LLVM_YAML_STRONG_TYPEDEF(_base, _type)
llvm::ELFYAML::SymverSection::SymverSection
SymverSection()
Definition: ELFYAML.h:543
llvm::ELFYAML::Object::Header
FileHeader Header
Definition: ELFYAML.h:695
llvm::ELF::EM_MIPS
@ EM_MIPS
Definition: ELF.h:141
llvm::ELFYAML::LinkerOptionsSection
Definition: ELFYAML.h:492
llvm::ELFYAML::FileHeader::Entry
llvm::yaml::Hex64 Entry
Definition: ELFYAML.h:120
llvm::ELFYAML::Fill::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:288
llvm::ELFYAML::CallGraphProfileSection::CallGraphProfileSection
CallGraphProfileSection()
Definition: ELFYAML.h:529
llvm::ELFYAML::StackSizesSection
Definition: ELFYAML.h:330
llvm::ELFYAML::Symbol
Definition: ELFYAML.h:136
llvm::ELFYAML::GnuHashHeader
Definition: ELFYAML.h:409
llvm::ELFYAML::Chunk::Name
StringRef Name
Definition: ELFYAML.h:213
llvm::ELFYAML::HashSection::Bucket
Optional< std::vector< uint32_t > > Bucket
Definition: ELFYAML.h:392
llvm::ELFYAML::Section::Type
ELF_SHT Type
Definition: ELFYAML.h:225
llvm::ELFYAML::VernauxEntry::Other
uint16_t Other
Definition: ELFYAML.h:450
llvm::ELFYAML::ARMIndexTableEntry::Offset
llvm::yaml::Hex32 Offset
Definition: ELFYAML.h:639
llvm::ELFYAML::MipsABIFlags::ISARevision
llvm::yaml::Hex8 ISARevision
Definition: ELFYAML.h:661
llvm::ELF::SHT_LLVM_CALL_GRAPH_PROFILE
@ SHT_LLVM_CALL_GRAPH_PROFILE
Definition: ELF.h:1016
llvm::ELFYAML::VernauxEntry::Flags
uint16_t Flags
Definition: ELFYAML.h:449
llvm::ELFYAML::Chunk::ChunkKind::SymtabShndxSection
@ SymtabShndxSection
llvm::ELFYAML::BBAddrMapEntry
Definition: ELFYAML.h:158
llvm::ELFYAML::MipsABIFlags
Definition: ELFYAML.h:658
ELFTypes.h
llvm::ELFYAML::Chunk::ChunkKind::Group
@ Group
NoBits
bool NoBits
Definition: ELFObjHandler.cpp:84
llvm::ELFYAML::ARMIndexTableSection
Definition: ELFYAML.h:643
llvm::ELFYAML::Section::Section
Section(ChunkKind Kind, bool IsImplicit=false)
Definition: ELFYAML.h:238
llvm::object::Elf_CGProfile_Impl
Definition: ELFTypes.h:46
llvm::ELFYAML::AddrsigSection::getEntries
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition: ELFYAML.h:480
llvm::ELFYAML::BBAddrMapEntry::NumBlocks
Optional< uint64_t > NumBlocks
Definition: ELFYAML.h:167
llvm::ELFYAML::VerdefSection::VerdefSection
VerdefSection()
Definition: ELFYAML.h:564
llvm::ELFYAML::Section::Link
Optional< StringRef > Link
Definition: ELFYAML.h:228
llvm::ELFYAML::RelocationSection::RelocationSection
RelocationSection()
Definition: ELFYAML.h:599
llvm::irsymtab::storage::Word
support::ulittle32_t Word
Definition: IRSymtab.h:52
llvm::ELFYAML::DynamicSection
Definition: ELFYAML.h:348
llvm::ELFYAML::Chunk::ChunkKind::SpecialChunksStart
@ SpecialChunksStart
llvm::ELFYAML::SectionHeaderTable::Excluded
Optional< std::vector< SectionHeader > > Excluded
Definition: ELFYAML.h:300
YAMLTraits.h
llvm::ELFYAML::Chunk::ChunkKind::Addrsig
@ Addrsig
llvm::ELFYAML::FileHeader::EShEntSize
Optional< llvm::yaml::Hex16 > EShEntSize
Definition: ELFYAML.h:126
llvm::ELFYAML::GnuHashSection::HashBuckets
Optional< std::vector< llvm::yaml::Hex32 > > HashBuckets
Definition: ELFYAML.h:432
llvm::ArrayRef
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: APInt.h:32
llvm::ELFYAML::NoteEntry::Desc
yaml::BinaryRef Desc
Definition: ELFYAML.h:178
llvm::ELFYAML::Object::ProgramHeaders
std::vector< ProgramHeader > ProgramHeaders
Definition: ELFYAML.h:696
llvm::ELFYAML::FileHeader::Class
ELF_ELFCLASS Class
Definition: ELFYAML.h:113
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:50
llvm::ELFYAML::SymverSection::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:549
llvm::yaml::BinaryRef
Specialized YAMLIO scalar type for representing a binary blob.
Definition: YAML.h:63
llvm_unreachable
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Definition: ErrorHandling.h:143
llvm::RegState::Implicit
@ Implicit
Not emitted register (e.g. carry, or temporary result).
Definition: MachineInstrBuilder.h:46
llvm::ELFYAML::NoteEntry
Definition: ELFYAML.h:176
llvm::RoundingMode::Dynamic
@ Dynamic
Denotes mode unknown at compile time.
llvm::ELFYAML::SectionHeaderTable::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:295
uint32_t
llvm::ELFYAML::Chunk::ChunkKind::Dynamic
@ Dynamic
llvm::ELFYAML::ProgramHeader::PAddr
llvm::yaml::Hex64 PAddr
Definition: ELFYAML.h:682
llvm::ELFYAML::FileHeader::Data
ELF_ELFDATA Data
Definition: ELFYAML.h:114
llvm::ELFYAML::BBAddrMapEntry::Version
uint8_t Version
Definition: ELFYAML.h:164
llvm::ELFYAML::NoteEntry::Name
StringRef Name
Definition: ELFYAML.h:177
llvm::ELFYAML::MipsABIFlags::CPR1Size
MIPS_AFL_REG CPR1Size
Definition: ELFYAML.h:663
S
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
Definition: README.txt:210
llvm::Optional::has_value
constexpr bool has_value() const
Definition: Optional.h:285
llvm::ELFYAML::DynamicSection::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:357
llvm::ELFYAML::VerneedSection::getEntries
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition: ELFYAML.h:466
llvm::ELFYAML::Section::OriginalSecNdx
unsigned OriginalSecNdx
Definition: ELFYAML.h:236
llvm::ELFYAML::Relocation::Type
ELF_REL Type
Definition: ELFYAML.h:591
llvm::ELFYAML::HashSection::Chain
Optional< std::vector< uint32_t > > Chain
Definition: ELFYAML.h:393
llvm::AMDGPU::SendMsg::Msg
const CustomOperand< const MCSubtargetInfo & > Msg[]
Definition: AMDGPUAsmUtils.cpp:39
llvm::ELFYAML::ARMIndexTableSection::ARMIndexTableSection
ARMIndexTableSection()
Definition: ELFYAML.h:646
llvm::ELFYAML::SectionHeaderTable
Definition: ELFYAML.h:291
llvm::ELFYAML::VerdefEntry::VersionNdx
Optional< uint16_t > VersionNdx
Definition: ELFYAML.h:555
llvm::ELFYAML::Section::ShType
Optional< ELF_SHT > ShType
Definition: ELFYAML.h:276
llvm::ELFYAML::Chunk::ChunkKind::Fill
@ Fill
llvm::Twine
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition: Twine.h:81
llvm::ELFYAML::MipsABIFlags::Flags1
MIPS_AFL_FLAGS1 Flags1
Definition: ELFYAML.h:668
llvm::ELFYAML::GnuHashSection::getEntries
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition: ELFYAML.h:437
llvm::ELFYAML::FileHeader::EPhEntSize
Optional< llvm::yaml::Hex16 > EPhEntSize
Definition: ELFYAML.h:124
llvm::ELFYAML::MipsABIFlags::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:673
std
Definition: BitVector.h:851
llvm::ELFYAML::ARMIndexTableSection::getEntries
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition: ELFYAML.h:648
llvm::ELFYAML::ARMIndexTableEntry
Definition: ELFYAML.h:638
llvm::ELFYAML::LinkerOptionsSection::LinkerOptionsSection
LinkerOptionsSection()
Definition: ELFYAML.h:495
llvm::ELFYAML::VerneedSection::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:470
llvm::None
constexpr std::nullopt_t None
Definition: None.h:27
uint16_t
llvm::ELFYAML::Chunk::ChunkKind::Hash
@ Hash
llvm::ELFYAML::DependentLibrariesSection::DependentLibrariesSection
DependentLibrariesSection()
Definition: ELFYAML.h:509
llvm::ELFYAML::VerneedEntry::Version
uint16_t Version
Definition: ELFYAML.h:455
llvm::ELFYAML::RelrSection
Definition: ELFYAML.h:610
llvm::ELFYAML::MipsABIFlags::ISAExtension
MIPS_AFL_EXT ISAExtension
Definition: ELFYAML.h:666
llvm::ELFYAML::DynamicEntry::Val
llvm::yaml::Hex64 Val
Definition: ELFYAML.h:155
llvm::ELFYAML::LinkerOption::Value
StringRef Value
Definition: ELFYAML.h:489
llvm::ELFYAML::Chunk::ChunkKind::StackSizes
@ StackSizes
llvm::ELFYAML::DependentLibrariesSection::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:515
llvm::ELFYAML::CallGraphEntryWeight
Definition: ELFYAML.h:521
llvm::ELFYAML::Chunk::ChunkKind::CallGraphProfile
@ CallGraphProfile
llvm::sampleprof::SecType
SecType
Definition: SampleProf.h:121
llvm::ELFYAML::Section::AddressAlign
llvm::yaml::Hex64 AddressAlign
Definition: ELFYAML.h:229
llvm::ELFYAML::VerneedEntry::AuxV
std::vector< VernauxEntry > AuxV
Definition: ELFYAML.h:457
llvm::ELFYAML::SymtabShndxSection::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:633
llvm::ELFYAML::Section::Content
Optional< yaml::BinaryRef > Content
Definition: ELFYAML.h:232
llvm::ELFYAML::GroupSection::Signature
Optional< StringRef > Signature
Definition: ELFYAML.h:577
llvm::ELFYAML::RelrSection::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:619
llvm::ELFYAML::Relocation::Addend
YAMLIntUInt Addend
Definition: ELFYAML.h:590
llvm::ELFYAML::GnuHashHeader::SymNdx
llvm::yaml::Hex32 SymNdx
Definition: ELFYAML.h:417
llvm::ELFYAML::Section::ShOffset
Optional< llvm::yaml::Hex64 > ShOffset
Definition: ELFYAML.h:263
llvm::ELFYAML::SymverSection::Entries
Optional< std::vector< uint16_t > > Entries
Definition: ELFYAML.h:541
llvm::ARMBuildAttrs::Symbol
@ Symbol
Definition: ARMBuildAttributes.h:83
llvm::ELFYAML::Section::Size
Optional< llvm::yaml::Hex64 > Size
Definition: ELFYAML.h:233
llvm::ELFYAML::ProgramHeader::Offset
Optional< llvm::yaml::Hex64 > Offset
Definition: ELFYAML.h:686
llvm::ELFYAML::StackSizesSection::nameMatches
static bool nameMatches(StringRef Name)
Definition: ELFYAML.h:343
llvm::ELFYAML::Fill::Fill
Fill()
Definition: ELFYAML.h:286
llvm::ELFYAML::DynamicSection::Entries
Optional< std::vector< DynamicEntry > > Entries
Definition: ELFYAML.h:349
llvm::ELFYAML::RelocationSection::Relocations
Optional< std::vector< Relocation > > Relocations
Definition: ELFYAML.h:596
llvm::ELFYAML::Chunk::ChunkKind::Verneed
@ Verneed
llvm::ELFYAML::BBAddrMapEntry::BBEntry::AddressOffset
llvm::yaml::Hex64 AddressOffset
Definition: ELFYAML.h:160
llvm::ELFYAML::ProgramHeader::FileSize
Optional< llvm::yaml::Hex64 > FileSize
Definition: ELFYAML.h:684
llvm::ELFYAML::Section
Definition: ELFYAML.h:224
llvm::ELFYAML::DynamicEntry
Definition: ELFYAML.h:153
llvm::ELF::SHT_RELA
@ SHT_RELA
Definition: ELF.h:983
llvm::ELFYAML::VerdefSection
Definition: ELFYAML.h:560
llvm::ELFYAML::Object::getSectionHeaderTable
const SectionHeaderTable & getSectionHeaderTable() const
Definition: ELFYAML.h:718
N
#define N
llvm::ELF::SHT_SYMTAB_SHNDX
@ SHT_SYMTAB_SHNDX
Definition: ELF.h:995
llvm::ELFYAML::BBAddrMapEntry::BBEntry
Definition: ELFYAML.h:159
llvm::ELFYAML::MipsABIFlags::FpABI
MIPS_ABI_FP FpABI
Definition: ELFYAML.h:665
llvm::ELFYAML::MipsABIFlags::Version
llvm::yaml::Hex16 Version
Definition: ELFYAML.h:659
llvm::ELFYAML::HashSection
Definition: ELFYAML.h:391
llvm::ELFYAML::AddrsigSection::Symbols
Optional< std::vector< YAMLFlowString > > Symbols
Definition: ELFYAML.h:476
llvm::ELFYAML::StackSizeEntry::Size
llvm::yaml::Hex64 Size
Definition: ELFYAML.h:173
llvm::ELFYAML::VerneedSection
Definition: ELFYAML.h:460
llvm::ELFYAML::DependentLibrariesSection
Definition: ELFYAML.h:506
llvm::ELFYAML::FileHeader::ABIVersion
llvm::yaml::Hex8 ABIVersion
Definition: ELFYAML.h:116
llvm::ELFYAML::BBAddrMapEntry::BBEntry::Metadata
llvm::yaml::Hex64 Metadata
Definition: ELFYAML.h:162
llvm::ELFYAML::ProgramHeader::MemSize
Optional< llvm::yaml::Hex64 > MemSize
Definition: ELFYAML.h:685
llvm::ELFYAML::Section::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:240
llvm::ELFYAML::SectionHeaderTable::SectionHeaderTable
SectionHeaderTable(bool IsImplicit)
Definition: ELFYAML.h:292
llvm::ELFYAML::MipsABIFlags::ISALevel
MIPS_ISA ISALevel
Definition: ELFYAML.h:660
llvm::ELFYAML::Chunk::ChunkKind::LinkerOptions
@ LinkerOptions
llvm::ELF::SHT_RELR
@ SHT_RELR
Definition: ELF.h:998
llvm::ELFYAML::StackSizesSection::StackSizesSection
StackSizesSection()
Definition: ELFYAML.h:333
llvm::ELFYAML::BBAddrMapSection::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:325
llvm::ELFYAML::StackSizesSection::getEntries
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition: ELFYAML.h:335
llvm::ELFYAML::NoteSection::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:388
llvm::ELFYAML::MipsABIFlags::GPRSize
MIPS_AFL_REG GPRSize
Definition: ELFYAML.h:662
llvm::ELFYAML::Object::Chunks
std::vector< std::unique_ptr< Chunk > > Chunks
Definition: ELFYAML.h:700
llvm::ELFYAML::ProgramHeader::VAddr
llvm::yaml::Hex64 VAddr
Definition: ELFYAML.h:681
llvm::ELFYAML::VerdefEntry::Hash
Optional< uint32_t > Hash
Definition: ELFYAML.h:556
llvm::ELFYAML::FileHeader::OSABI
ELF_ELFOSABI OSABI
Definition: ELFYAML.h:115
llvm::ELFYAML::NoBitsSection::NoBitsSection
NoBitsSection()
Definition: ELFYAML.h:374
llvm::ELFYAML::GroupSection::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:585
llvm::ELFYAML::StackSizeEntry
Definition: ELFYAML.h:171
llvm::ELFYAML::HashSection::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:406
llvm::ELF::SHT_REL
@ SHT_REL
Definition: ELF.h:988
llvm::Value
LLVM Value Representation.
Definition: Value.h:74
llvm::ELF::SHT_DYNAMIC
@ SHT_DYNAMIC
Definition: ELF.h:985
llvm::ELFYAML::VerdefEntry::Flags
Optional< uint16_t > Flags
Definition: ELFYAML.h:554
llvm::ELFYAML::VernauxEntry
Definition: ELFYAML.h:447
llvm::ELFYAML::Section::getEntries
virtual std::vector< std::pair< StringRef, bool > > getEntries() const
Definition: ELFYAML.h:247
llvm::ELFYAML::CallGraphEntryWeight::Weight
uint64_t Weight
Definition: ELFYAML.h:523
llvm::ELFYAML::Symbol::Binding
ELF_STB Binding
Definition: ELFYAML.h:141
llvm::ELFYAML::Chunk::ChunkKind::Relr
@ Relr
llvm::ELFYAML::Chunk::ChunkKind::Note
@ Note
llvm::ELFYAML::ProgramHeader::Flags
ELF_PF Flags
Definition: ELFYAML.h:680
llvm::ELFYAML::FileHeader::EPhNum
Optional< llvm::yaml::Hex16 > EPhNum
Definition: ELFYAML.h:125
llvm::ELFYAML::Chunk
Definition: ELFYAML.h:182
llvm::ELFYAML::RelrSection::RelrSection
RelrSection()
Definition: ELFYAML.h:613
llvm::ELFYAML::Chunk::IsImplicit
bool IsImplicit
Definition: ELFYAML.h:218