LLVM  14.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  llvm::yaml::Hex64 Address;
167 };
168 
170  llvm::yaml::Hex64 Address;
171  llvm::yaml::Hex64 Size;
172 };
173 
174 struct NoteEntry {
177  ELF_NT Type;
178 };
179 
180 struct Chunk {
181  enum class ChunkKind {
182  Dynamic,
183  Group,
184  RawContent,
185  Relocation,
186  Relr,
187  NoBits,
188  Note,
189  Hash,
190  GnuHash,
191  Verdef,
192  Verneed,
193  StackSizes,
195  Symver,
197  MipsABIFlags,
198  Addrsig,
202  BBAddrMap,
203 
204  // Special chunks.
208  };
209 
213 
214  // Usually chunks are not created implicitly, but rather loaded from YAML.
215  // This flag is used to signal whether this is the case or not.
217 
219  virtual ~Chunk();
220 };
221 
222 struct Section : public Chunk {
223  ELF_SHT Type;
227  llvm::yaml::Hex64 AddressAlign;
229 
232 
233  // Holds the original section index.
234  unsigned OriginalSecNdx;
235 
237 
238  static bool classof(const Chunk *S) {
239  return S->Kind < ChunkKind::SpecialChunksStart;
240  }
241 
242  // Some derived sections might have their own special entries. This method
243  // returns a vector of <entry name, is used> pairs. It is used for section
244  // validation.
245  virtual std::vector<std::pair<StringRef, bool>> getEntries() const {
246  return {};
247  };
248 
249  // The following members are used to override section fields which is
250  // useful for creating invalid objects.
251 
252  // This can be used to override the sh_addralign field.
254 
255  // This can be used to override the offset stored in the sh_name field.
256  // It does not affect the name stored in the string table.
258 
259  // This can be used to override the sh_offset field. It does not place the
260  // section data at the offset specified.
262 
263  // This can be used to override the sh_size field. It does not affect the
264  // content written.
266 
267  // This can be used to override the sh_flags field.
269 
270  // This can be used to override the sh_type field. It is useful when we
271  // want to use specific YAML keys for a section of a particular type to
272  // describe the content, but still want to have a different final type
273  // for the section.
275 };
276 
277 // Fill is a block of data which is placed outside of sections. It is
278 // not present in the sections header table, but it might affect the output file
279 // size and program headers produced.
280 struct Fill : Chunk {
282  llvm::yaml::Hex64 Size;
283 
284  Fill() : Chunk(ChunkKind::Fill, /*Implicit=*/false) {}
285 
286  static bool classof(const Chunk *S) { return S->Kind == ChunkKind::Fill; }
287 };
288 
292 
293  static bool classof(const Chunk *S) {
294  return S->Kind == ChunkKind::SectionHeaderTable;
295  }
296 
300 
301  size_t getNumHeaders(size_t SectionsNum) const {
302  if (IsImplicit || isDefault())
303  return SectionsNum;
304  if (NoHeaders)
305  return (*NoHeaders) ? 0 : SectionsNum;
306  return (Sections ? Sections->size() : 0) + /*Null section*/ 1;
307  }
308 
309  bool isDefault() const { return !Sections && !Excluded && !NoHeaders; }
310 
311  static constexpr StringRef TypeStr = "SectionHeaderTable";
312 };
313 
316 
317  BBAddrMapSection() : Section(ChunkKind::BBAddrMap) {}
318 
319  std::vector<std::pair<StringRef, bool>> getEntries() const override {
320  return {{"Entries", Entries.hasValue()}};
321  };
322 
323  static bool classof(const Chunk *S) {
324  return S->Kind == ChunkKind::BBAddrMap;
325  }
326 };
327 
330 
331  StackSizesSection() : Section(ChunkKind::StackSizes) {}
332 
333  std::vector<std::pair<StringRef, bool>> getEntries() const override {
334  return {{"Entries", Entries.hasValue()}};
335  };
336 
337  static bool classof(const Chunk *S) {
338  return S->Kind == ChunkKind::StackSizes;
339  }
340 
341  static bool nameMatches(StringRef Name) {
342  return Name == ".stack_sizes";
343  }
344 };
345 
348 
350 
351  std::vector<std::pair<StringRef, bool>> getEntries() const override {
352  return {{"Entries", Entries.hasValue()}};
353  };
354 
355  static bool classof(const Chunk *S) { return S->Kind == ChunkKind::Dynamic; }
356 };
357 
360 
361  RawContentSection() : Section(ChunkKind::RawContent) {}
362 
363  static bool classof(const Chunk *S) {
364  return S->Kind == ChunkKind::RawContent;
365  }
366 
367  // Is used when a content is read as an array of bytes.
369 };
370 
373 
374  static bool classof(const Chunk *S) { return S->Kind == ChunkKind::NoBits; }
375 };
376 
379 
381 
382  std::vector<std::pair<StringRef, bool>> getEntries() const override {
383  return {{"Notes", Notes.hasValue()}};
384  };
385 
386  static bool classof(const Chunk *S) { return S->Kind == ChunkKind::Note; }
387 };
388 
392 
393  std::vector<std::pair<StringRef, bool>> getEntries() const override {
394  return {{"Bucket", Bucket.hasValue()}, {"Chain", Chain.hasValue()}};
395  };
396 
397  // The following members are used to override section fields.
398  // This is useful for creating invalid objects.
401 
403 
404  static bool classof(const Chunk *S) { return S->Kind == ChunkKind::Hash; }
405 };
406 
408  // The number of hash buckets.
409  // Not used when dumping the object, but can be used to override
410  // the real number of buckets when emiting an object from a YAML document.
412 
413  // Index of the first symbol in the dynamic symbol table
414  // included in the hash table.
415  llvm::yaml::Hex32 SymNdx;
416 
417  // The number of words in the Bloom filter.
418  // Not used when dumping the object, but can be used to override the real
419  // number of words in the Bloom filter when emiting an object from a YAML
420  // document.
422 
423  // A shift constant used by the Bloom filter.
424  llvm::yaml::Hex32 Shift2;
425 };
426 
432 
434 
435  std::vector<std::pair<StringRef, bool>> getEntries() const override {
436  return {{"Header", Header.hasValue()},
437  {"BloomFilter", BloomFilter.hasValue()},
438  {"HashBuckets", HashBuckets.hasValue()},
439  {"HashValues", HashValues.hasValue()}};
440  };
441 
442  static bool classof(const Chunk *S) { return S->Kind == ChunkKind::GnuHash; }
443 };
444 
445 struct VernauxEntry {
450 };
451 
452 struct VerneedEntry {
455  std::vector<VernauxEntry> AuxV;
456 };
457 
461 
463 
464  std::vector<std::pair<StringRef, bool>> getEntries() const override {
465  return {{"Dependencies", VerneedV.hasValue()}};
466  };
467 
468  static bool classof(const Chunk *S) {
469  return S->Kind == ChunkKind::Verneed;
470  }
471 };
472 
475 
477 
478  std::vector<std::pair<StringRef, bool>> getEntries() const override {
479  return {{"Symbols", Symbols.hasValue()}};
480  };
481 
482  static bool classof(const Chunk *S) { return S->Kind == ChunkKind::Addrsig; }
483 };
484 
485 struct LinkerOption {
488 };
489 
492 
493  LinkerOptionsSection() : Section(ChunkKind::LinkerOptions) {}
494 
495  std::vector<std::pair<StringRef, bool>> getEntries() const override {
496  return {{"Options", Options.hasValue()}};
497  };
498 
499  static bool classof(const Chunk *S) {
500  return S->Kind == ChunkKind::LinkerOptions;
501  }
502 };
503 
506 
507  DependentLibrariesSection() : Section(ChunkKind::DependentLibraries) {}
508 
509  std::vector<std::pair<StringRef, bool>> getEntries() const override {
510  return {{"Libraries", Libs.hasValue()}};
511  };
512 
513  static bool classof(const Chunk *S) {
514  return S->Kind == ChunkKind::DependentLibraries;
515  }
516 };
517 
518 // Represents the call graph profile section entry.
520  // The weight of the edge.
522 };
523 
526 
527  CallGraphProfileSection() : Section(ChunkKind::CallGraphProfile) {}
528 
529  std::vector<std::pair<StringRef, bool>> getEntries() const override {
530  return {{"Entries", Entries.hasValue()}};
531  };
532 
533  static bool classof(const Chunk *S) {
534  return S->Kind == ChunkKind::CallGraphProfile;
535  }
536 };
537 
540 
542 
543  std::vector<std::pair<StringRef, bool>> getEntries() const override {
544  return {{"Entries", Entries.hasValue()}};
545  };
546 
547  static bool classof(const Chunk *S) { return S->Kind == ChunkKind::Symver; }
548 };
549 
550 struct VerdefEntry {
555  std::vector<StringRef> VerNames;
556 };
557 
561 
563 
564  std::vector<std::pair<StringRef, bool>> getEntries() const override {
565  return {{"Entries", Entries.hasValue()}};
566  };
567 
568  static bool classof(const Chunk *S) { return S->Kind == ChunkKind::Verdef; }
569 };
570 
572  // Members of a group contain a flag and a list of section indices
573  // that are part of the group.
576 
578 
579  std::vector<std::pair<StringRef, bool>> getEntries() const override {
580  return {{"Members", Members.hasValue()}};
581  };
582 
583  static bool classof(const Chunk *S) { return S->Kind == ChunkKind::Group; }
584 };
585 
586 struct Relocation {
587  llvm::yaml::Hex64 Offset;
588  YAMLIntUInt Addend;
589  ELF_REL Type;
591 };
592 
596 
598 
599  std::vector<std::pair<StringRef, bool>> getEntries() const override {
600  return {{"Relocations", Relocations.hasValue()}};
601  };
602 
603  static bool classof(const Chunk *S) {
604  return S->Kind == ChunkKind::Relocation;
605  }
606 };
607 
610 
612 
613  std::vector<std::pair<StringRef, bool>> getEntries() const override {
614  return {{"Entries", Entries.hasValue()}};
615  };
616 
617  static bool classof(const Chunk *S) {
618  return S->Kind == ChunkKind::Relr;
619  }
620 };
621 
624 
626 
627  std::vector<std::pair<StringRef, bool>> getEntries() const override {
628  return {{"Entries", Entries.hasValue()}};
629  };
630 
631  static bool classof(const Chunk *S) {
632  return S->Kind == ChunkKind::SymtabShndxSection;
633  }
634 };
635 
637  llvm::yaml::Hex32 Offset;
638  llvm::yaml::Hex32 Value;
639 };
640 
643 
644  ARMIndexTableSection() : Section(ChunkKind::ARMIndexTable) {}
645 
646  std::vector<std::pair<StringRef, bool>> getEntries() const override {
647  return {{"Entries", Entries.hasValue()}};
648  };
649 
650  static bool classof(const Chunk *S) {
651  return S->Kind == ChunkKind::ARMIndexTable;
652  }
653 };
654 
655 // Represents .MIPS.abiflags section
657  llvm::yaml::Hex16 Version;
658  MIPS_ISA ISALevel;
659  llvm::yaml::Hex8 ISARevision;
660  MIPS_AFL_REG GPRSize;
661  MIPS_AFL_REG CPR1Size;
662  MIPS_AFL_REG CPR2Size;
663  MIPS_ABI_FP FpABI;
664  MIPS_AFL_EXT ISAExtension;
665  MIPS_AFL_ASE ASEs;
666  MIPS_AFL_FLAGS1 Flags1;
667  llvm::yaml::Hex32 Flags2;
668 
670 
671  static bool classof(const Chunk *S) {
672  return S->Kind == ChunkKind::MipsABIFlags;
673  }
674 };
675 
677  ELF_PT Type;
678  ELF_PF Flags;
679  llvm::yaml::Hex64 VAddr;
680  llvm::yaml::Hex64 PAddr;
687 
688  // This vector contains all chunks from [FirstSec, LastSec].
689  std::vector<Chunk *> Chunks;
690 };
691 
692 struct Object {
694  std::vector<ProgramHeader> ProgramHeaders;
695 
696  // An object might contain output section descriptions as well as
697  // custom data that does not belong to any section.
698  std::vector<std::unique_ptr<Chunk>> Chunks;
699 
700  // Although in reality the symbols reside in a section, it is a lot
701  // cleaner and nicer if we read them from the YAML as a separate
702  // top-level key, which automatically ensures that invariants like there
703  // being a single SHT_SYMTAB section are upheld.
707 
708  std::vector<Section *> getSections() {
709  std::vector<Section *> Ret;
710  for (const std::unique_ptr<Chunk> &Sec : Chunks)
711  if (auto S = dyn_cast<ELFYAML::Section>(Sec.get()))
712  Ret.push_back(S);
713  return Ret;
714  }
715 
717  for (const std::unique_ptr<Chunk> &C : Chunks)
718  if (auto *S = dyn_cast<ELFYAML::SectionHeaderTable>(C.get()))
719  return *S;
720  llvm_unreachable("the section header table chunk must always be present");
721  }
722 
723  unsigned getMachine() const;
724 };
725 
727  const NoBitsSection &S);
728 
729 } // end namespace ELFYAML
730 } // end namespace llvm
731 
741 LLVM_YAML_IS_SEQUENCE_VECTOR(std::unique_ptr<llvm::ELFYAML::Chunk>)
749 
750 namespace llvm {
751 namespace yaml {
752 
753 template <> struct ScalarTraits<ELFYAML::YAMLIntUInt> {
754  static void output(const ELFYAML::YAMLIntUInt &Val, void *Ctx,
755  raw_ostream &Out);
756  static StringRef input(StringRef Scalar, void *Ctx,
757  ELFYAML::YAMLIntUInt &Val);
758  static QuotingType mustQuote(StringRef) { return QuotingType::None; }
759 };
760 
761 template <>
762 struct ScalarEnumerationTraits<ELFYAML::ELF_ET> {
763  static void enumeration(IO &IO, ELFYAML::ELF_ET &Value);
764 };
765 
766 template <> struct ScalarEnumerationTraits<ELFYAML::ELF_PT> {
767  static void enumeration(IO &IO, ELFYAML::ELF_PT &Value);
768 };
769 
770 template <> struct ScalarEnumerationTraits<ELFYAML::ELF_NT> {
771  static void enumeration(IO &IO, ELFYAML::ELF_NT &Value);
772 };
773 
774 template <>
775 struct ScalarEnumerationTraits<ELFYAML::ELF_EM> {
776  static void enumeration(IO &IO, ELFYAML::ELF_EM &Value);
777 };
778 
779 template <>
780 struct ScalarEnumerationTraits<ELFYAML::ELF_ELFCLASS> {
781  static void enumeration(IO &IO, ELFYAML::ELF_ELFCLASS &Value);
782 };
783 
784 template <>
785 struct ScalarEnumerationTraits<ELFYAML::ELF_ELFDATA> {
786  static void enumeration(IO &IO, ELFYAML::ELF_ELFDATA &Value);
787 };
788 
789 template <>
790 struct ScalarEnumerationTraits<ELFYAML::ELF_ELFOSABI> {
791  static void enumeration(IO &IO, ELFYAML::ELF_ELFOSABI &Value);
792 };
793 
794 template <>
795 struct ScalarBitSetTraits<ELFYAML::ELF_EF> {
796  static void bitset(IO &IO, ELFYAML::ELF_EF &Value);
797 };
798 
799 template <> struct ScalarBitSetTraits<ELFYAML::ELF_PF> {
800  static void bitset(IO &IO, ELFYAML::ELF_PF &Value);
801 };
802 
803 template <>
804 struct ScalarEnumerationTraits<ELFYAML::ELF_SHT> {
805  static void enumeration(IO &IO, ELFYAML::ELF_SHT &Value);
806 };
807 
808 template <>
809 struct ScalarBitSetTraits<ELFYAML::ELF_SHF> {
810  static void bitset(IO &IO, ELFYAML::ELF_SHF &Value);
811 };
812 
813 template <> struct ScalarEnumerationTraits<ELFYAML::ELF_SHN> {
814  static void enumeration(IO &IO, ELFYAML::ELF_SHN &Value);
815 };
816 
817 template <> struct ScalarEnumerationTraits<ELFYAML::ELF_STB> {
818  static void enumeration(IO &IO, ELFYAML::ELF_STB &Value);
819 };
820 
821 template <>
822 struct ScalarEnumerationTraits<ELFYAML::ELF_STT> {
823  static void enumeration(IO &IO, ELFYAML::ELF_STT &Value);
824 };
825 
826 template <>
827 struct ScalarEnumerationTraits<ELFYAML::ELF_REL> {
828  static void enumeration(IO &IO, ELFYAML::ELF_REL &Value);
829 };
830 
831 template <>
832 struct ScalarEnumerationTraits<ELFYAML::ELF_DYNTAG> {
833  static void enumeration(IO &IO, ELFYAML::ELF_DYNTAG &Value);
834 };
835 
836 template <>
837 struct ScalarEnumerationTraits<ELFYAML::ELF_RSS> {
838  static void enumeration(IO &IO, ELFYAML::ELF_RSS &Value);
839 };
840 
841 template <>
842 struct ScalarEnumerationTraits<ELFYAML::MIPS_AFL_REG> {
843  static void enumeration(IO &IO, ELFYAML::MIPS_AFL_REG &Value);
844 };
845 
846 template <>
847 struct ScalarEnumerationTraits<ELFYAML::MIPS_ABI_FP> {
848  static void enumeration(IO &IO, ELFYAML::MIPS_ABI_FP &Value);
849 };
850 
851 template <>
852 struct ScalarEnumerationTraits<ELFYAML::MIPS_AFL_EXT> {
853  static void enumeration(IO &IO, ELFYAML::MIPS_AFL_EXT &Value);
854 };
855 
856 template <>
857 struct ScalarEnumerationTraits<ELFYAML::MIPS_ISA> {
858  static void enumeration(IO &IO, ELFYAML::MIPS_ISA &Value);
859 };
860 
861 template <>
862 struct ScalarBitSetTraits<ELFYAML::MIPS_AFL_ASE> {
863  static void bitset(IO &IO, ELFYAML::MIPS_AFL_ASE &Value);
864 };
865 
866 template <>
867 struct ScalarBitSetTraits<ELFYAML::MIPS_AFL_FLAGS1> {
868  static void bitset(IO &IO, ELFYAML::MIPS_AFL_FLAGS1 &Value);
869 };
870 
871 template <>
872 struct MappingTraits<ELFYAML::FileHeader> {
873  static void mapping(IO &IO, ELFYAML::FileHeader &FileHdr);
874 };
875 
876 template <> struct MappingTraits<ELFYAML::SectionHeader> {
877  static void mapping(IO &IO, ELFYAML::SectionHeader &SHdr);
878 };
879 
880 template <> struct MappingTraits<ELFYAML::ProgramHeader> {
881  static void mapping(IO &IO, ELFYAML::ProgramHeader &FileHdr);
882  static std::string validate(IO &IO, ELFYAML::ProgramHeader &FileHdr);
883 };
884 
885 template <>
886 struct MappingTraits<ELFYAML::Symbol> {
887  static void mapping(IO &IO, ELFYAML::Symbol &Symbol);
888  static std::string validate(IO &IO, ELFYAML::Symbol &Symbol);
889 };
890 
891 template <> struct MappingTraits<ELFYAML::StackSizeEntry> {
892  static void mapping(IO &IO, ELFYAML::StackSizeEntry &Rel);
893 };
894 
895 template <> struct MappingTraits<ELFYAML::BBAddrMapEntry> {
896  static void mapping(IO &IO, ELFYAML::BBAddrMapEntry &Rel);
897 };
898 
899 template <> struct MappingTraits<ELFYAML::BBAddrMapEntry::BBEntry> {
900  static void mapping(IO &IO, ELFYAML::BBAddrMapEntry::BBEntry &Rel);
901 };
902 
903 template <> struct MappingTraits<ELFYAML::GnuHashHeader> {
904  static void mapping(IO &IO, ELFYAML::GnuHashHeader &Rel);
905 };
906 
907 template <> struct MappingTraits<ELFYAML::DynamicEntry> {
908  static void mapping(IO &IO, ELFYAML::DynamicEntry &Rel);
909 };
910 
911 template <> struct MappingTraits<ELFYAML::NoteEntry> {
912  static void mapping(IO &IO, ELFYAML::NoteEntry &N);
913 };
914 
915 template <> struct MappingTraits<ELFYAML::VerdefEntry> {
916  static void mapping(IO &IO, ELFYAML::VerdefEntry &E);
917 };
918 
919 template <> struct MappingTraits<ELFYAML::VerneedEntry> {
920  static void mapping(IO &IO, ELFYAML::VerneedEntry &E);
921 };
922 
923 template <> struct MappingTraits<ELFYAML::VernauxEntry> {
924  static void mapping(IO &IO, ELFYAML::VernauxEntry &E);
925 };
926 
927 template <> struct MappingTraits<ELFYAML::LinkerOption> {
928  static void mapping(IO &IO, ELFYAML::LinkerOption &Sym);
929 };
930 
931 template <> struct MappingTraits<ELFYAML::CallGraphEntryWeight> {
932  static void mapping(IO &IO, ELFYAML::CallGraphEntryWeight &E);
933 };
934 
935 template <> struct MappingTraits<ELFYAML::Relocation> {
936  static void mapping(IO &IO, ELFYAML::Relocation &Rel);
937 };
938 
939 template <> struct MappingTraits<ELFYAML::ARMIndexTableEntry> {
940  static void mapping(IO &IO, ELFYAML::ARMIndexTableEntry &E);
941 };
942 
943 template <> struct MappingTraits<std::unique_ptr<ELFYAML::Chunk>> {
944  static void mapping(IO &IO, std::unique_ptr<ELFYAML::Chunk> &C);
945  static std::string validate(IO &io, std::unique_ptr<ELFYAML::Chunk> &C);
946 };
947 
948 template <>
949 struct MappingTraits<ELFYAML::Object> {
950  static void mapping(IO &IO, ELFYAML::Object &Object);
951 };
952 
953 template <> struct MappingTraits<ELFYAML::SectionOrType> {
954  static void mapping(IO &IO, ELFYAML::SectionOrType &sectionOrType);
955 };
956 
957 } // end namespace yaml
958 } // end namespace llvm
959 
960 #endif // LLVM_OBJECTYAML_ELFYAML_H
llvm::ELFYAML::Object::DWARF
Optional< DWARFYAML::Data > DWARF
Definition: ELFYAML.h:706
llvm::ELFYAML::BBAddrMapSection::getEntries
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition: ELFYAML.h:319
llvm::ELFYAML::BBAddrMapEntry::Address
llvm::yaml::Hex64 Address
Definition: ELFYAML.h:164
llvm::ELFYAML::Relocation::Symbol
Optional< StringRef > Symbol
Definition: ELFYAML.h:590
llvm::ELFYAML::Chunk::Chunk
Chunk(ChunkKind K, bool Implicit)
Definition: ELFYAML.h:218
llvm::ELFYAML::StackSizeEntry::Address
llvm::yaml::Hex64 Address
Definition: ELFYAML.h:170
llvm::ELFYAML::BBAddrMapSection::BBAddrMapSection
BBAddrMapSection()
Definition: ELFYAML.h:317
llvm::ELFYAML::LinkerOptionsSection::getEntries
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition: ELFYAML.h:495
llvm::ELFYAML::HashSection::NChain
Optional< llvm::yaml::Hex64 > NChain
Definition: ELFYAML.h:400
llvm::ELFYAML::Section::Flags
Optional< ELF_SHF > Flags
Definition: ELFYAML.h:224
llvm::ELFYAML::Chunk::ChunkKind::SectionHeaderTable
@ SectionHeaderTable
llvm::ELF::SHT_RELA
@ SHT_RELA
Definition: ELF.h:919
llvm
This file implements support for optimizing divisions by a constant.
Definition: AllocatorList.h:23
llvm::ELFYAML::NoteSection
Definition: ELFYAML.h:377
llvm::ELFYAML::Object::Symbols
Optional< std::vector< Symbol > > Symbols
Definition: ELFYAML.h:704
llvm::ELFYAML::AddrsigSection::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:482
llvm::ELFYAML::shouldAllocateFileSpace
bool shouldAllocateFileSpace(ArrayRef< ProgramHeader > Phdrs, const NoBitsSection &S)
Definition: ELFEmitter.cpp:1222
llvm::ELFYAML::StackSizesSection::Entries
Optional< std::vector< StackSizeEntry > > Entries
Definition: ELFYAML.h:329
llvm::ELFYAML::SectionHeaderTable::Sections
Optional< std::vector< SectionHeader > > Sections
Definition: ELFYAML.h:297
llvm::ELF::SHT_GNU_versym
@ SHT_GNU_versym
Definition: ELF.h:958
llvm::ELFYAML::Symbol::Section
Optional< StringRef > Section
Definition: ELFYAML.h:139
llvm::ELF::SHT_MIPS_ABIFLAGS
@ SHT_MIPS_ABIFLAGS
Definition: ELF.h:977
llvm::ELFYAML::ProgramHeader::Chunks
std::vector< Chunk * > Chunks
Definition: ELFYAML.h:689
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:280
llvm::ELFYAML::GroupSection::GroupSection
GroupSection()
Definition: ELFYAML.h:577
llvm::ELFYAML::CallGraphProfileSection::Entries
Optional< std::vector< CallGraphEntryWeight > > Entries
Definition: ELFYAML.h:525
llvm::ELFYAML::NoteSection::getEntries
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition: ELFYAML.h:382
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:642
llvm::ELFYAML::Object::DynamicSymbols
Optional< std::vector< Symbol > > DynamicSymbols
Definition: ELFYAML.h:705
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:587
llvm::RegState::Implicit
@ Implicit
Not emitted register (e.g. carry, or temporary result).
Definition: MachineInstrBuilder.h:46
llvm::ELFYAML::RawContentSection::RawContentSection
RawContentSection()
Definition: ELFYAML.h:361
llvm::ELFYAML::MipsABIFlags::ASEs
MIPS_AFL_ASE ASEs
Definition: ELFYAML.h:665
llvm::ELFYAML::CallGraphProfileSection
Definition: ELFYAML.h:524
llvm::ELFYAML::FileHeader::Type
ELF_ET Type
Definition: ELFYAML.h:117
llvm::ELFYAML::LinkerOption
Definition: ELFYAML.h:485
output
Current output
Definition: README.txt:1350
llvm::ELFYAML::VerdefEntry
Definition: ELFYAML.h:550
llvm::ELFYAML::VernauxEntry::Name
StringRef Name
Definition: ELFYAML.h:449
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:393
llvm::ELFYAML::Chunk::ChunkKind::GnuHash
@ GnuHash
llvm::ELFYAML::GroupSection
Definition: ELFYAML.h:571
llvm::ELFYAML::FileHeader
Definition: ELFYAML.h:112
llvm::ELFYAML::Symbol::Name
StringRef Name
Definition: ELFYAML.h:137
llvm::ELFYAML::NoBitsSection
Definition: ELFYAML.h:371
llvm::ELFYAML::GroupSection::getEntries
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition: ELFYAML.h:579
llvm::ELFYAML::VerdefSection::Info
Optional< llvm::yaml::Hex64 > Info
Definition: ELFYAML.h:560
LLVM_YAML_IS_SEQUENCE_VECTOR
#define LLVM_YAML_IS_SEQUENCE_VECTOR(type)
llvm::ELFYAML::GnuHashHeader::MaskWords
Optional< llvm::yaml::Hex32 > MaskWords
Definition: ELFYAML.h:421
llvm::ELFYAML::ProgramHeader
Definition: ELFYAML.h:676
llvm::ELFYAML::Section::ShAddrAlign
Optional< llvm::yaml::Hex64 > ShAddrAlign
Definition: ELFYAML.h:247
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:613
llvm::ELFYAML::FileHeader::EPhOff
Optional< llvm::yaml::Hex64 > EPhOff
Definition: ELFYAML.h:123
llvm::ELFYAML::HashSection::NBucket
Optional< llvm::yaml::Hex64 > NBucket
Definition: ELFYAML.h:395
llvm::ELFYAML::GnuHashHeader::Shift2
llvm::yaml::Hex32 Shift2
Definition: ELFYAML.h:424
llvm::ELFYAML::Chunk::Offset
Optional< llvm::yaml::Hex64 > Offset
Definition: ELFYAML.h:212
llvm::ELFYAML::RelocationSection::RelocatableSec
StringRef RelocatableSec
Definition: ELFYAML.h:595
llvm::ELFYAML::Section::Address
Optional< llvm::yaml::Hex64 > Address
Definition: ELFYAML.h:225
llvm::object::Elf_Mips_ABIFlags
Definition: ELFTypes.h:784
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:499
llvm::ELFYAML::HashSection::HashSection
HashSection()
Definition: ELFYAML.h:402
llvm::Optional< ELF_EM >
llvm::ELFYAML::AddrsigSection
Definition: ELFYAML.h:473
llvm::ELFYAML::Fill::Size
llvm::yaml::Hex64 Size
Definition: ELFYAML.h:282
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::MipsISD::Ret
@ Ret
Definition: MipsISelLowering.h:116
llvm::ELFYAML::RelrSection::Entries
Optional< std::vector< llvm::yaml::Hex64 > > Entries
Definition: ELFYAML.h:609
llvm::ELFYAML::SymverSection::getEntries
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition: ELFYAML.h:543
llvm::ELFYAML::VerdefSection::Entries
Optional< std::vector< VerdefEntry > > Entries
Definition: ELFYAML.h:559
llvm::ELFYAML::GnuHashSection::Header
Optional< GnuHashHeader > Header
Definition: ELFYAML.h:428
llvm::ELFYAML::Chunk::ChunkKind::DependentLibraries
@ DependentLibraries
llvm::yaml::MappingTraits
Definition: ModuleSummaryIndex.h:52
llvm::ELFYAML::Chunk::Kind
ChunkKind Kind
Definition: ELFYAML.h:210
llvm::ELFYAML::SymtabShndxSection::getEntries
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition: ELFYAML.h:627
llvm::RISCVFeatures::validate
void validate(const Triple &TT, const FeatureBitset &FeatureBits)
Definition: RISCVBaseInfo.cpp:90
llvm::ELFYAML::Symbol::Other
Optional< uint8_t > Other
Definition: ELFYAML.h:144
llvm::ELFYAML::RawContentSection
Definition: ELFYAML.h:358
llvm::ELFYAML::VerdefSection::getEntries
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition: ELFYAML.h:564
llvm::ELFYAML::FileHeader::SectionHeaderStringTable
Optional< StringRef > SectionHeaderStringTable
Definition: ELFYAML.h:121
llvm::ELFYAML::MipsABIFlags::CPR2Size
MIPS_AFL_REG CPR2Size
Definition: ELFYAML.h:662
llvm::ELFYAML::DynamicSection::getEntries
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition: ELFYAML.h:351
llvm::ELFYAML::NoteSection::NoteSection
NoteSection()
Definition: ELFYAML.h:380
llvm::ELFYAML::RawContentSection::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:363
llvm::ELFYAML::SectionHeader
Definition: ELFYAML.h:132
llvm::ELFYAML::VernauxEntry::Hash
uint32_t Hash
Definition: ELFYAML.h:446
llvm::ELFYAML::DependentLibrariesSection::Libs
Optional< std::vector< YAMLFlowString > > Libs
Definition: ELFYAML.h:505
llvm::ELFYAML::VerneedSection::VerneedSection
VerneedSection()
Definition: ELFYAML.h:462
llvm::ELFYAML::VerdefEntry::Version
Optional< uint16_t > Version
Definition: ELFYAML.h:551
llvm::ELFYAML::Chunk::ChunkKind
ChunkKind
Definition: ELFYAML.h:181
llvm::yaml::ScalarTraits< ELFYAML::YAMLIntUInt >::mustQuote
static QuotingType mustQuote(StringRef)
Definition: ELFYAML.h:758
llvm::Optional::hasValue
constexpr bool hasValue() const
Definition: Optional.h:288
llvm::ELFYAML::SectionHeaderTable::getNumHeaders
size_t getNumHeaders(size_t SectionsNum) const
Definition: ELFYAML.h:301
llvm::ELFYAML::RelocationSection::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:603
llvm::ELF::SHT_SYMTAB
@ SHT_SYMTAB
Definition: ELF.h:917
llvm::ELFYAML::VerdefEntry::VerNames
std::vector< StringRef > VerNames
Definition: ELFYAML.h:555
llvm::ELFYAML::BBAddrMapEntry::BBEntries
Optional< std::vector< BBEntry > > BBEntries
Definition: ELFYAML.h:166
llvm::ELFYAML::GnuHashSection::GnuHashSection
GnuHashSection()
Definition: ELFYAML.h:433
llvm::ELFYAML::Chunk::ChunkKind::RawContent
@ RawContent
llvm::ELFYAML::RelocationSection::getEntries
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition: ELFYAML.h:599
llvm::ELFYAML::Object::getSections
std::vector< Section * > getSections()
Definition: ELFYAML.h:708
ELF.h
llvm::ELFYAML::NoteEntry::Type
ELF_NT Type
Definition: ELFYAML.h:177
llvm::ELFYAML::Chunk::ChunkKind::Verdef
@ Verdef
llvm::ELFYAML::MipsABIFlags::MipsABIFlags
MipsABIFlags()
Definition: ELFYAML.h:669
llvm::ELFYAML::SectionHeaderTable::isDefault
bool isDefault() const
Definition: ELFYAML.h:309
llvm::ELFYAML::Section::EntSize
Optional< llvm::yaml::Hex64 > EntSize
Definition: ELFYAML.h:228
llvm::ELFYAML::Relocation
Definition: ELFYAML.h:586
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:442
llvm::ELFYAML::VerneedSection::Info
Optional< llvm::yaml::Hex64 > Info
Definition: ELFYAML.h:460
E
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
llvm::ELF::SHT_DYNSYM
@ SHT_DYNSYM
Definition: ELF.h:926
llvm::ELFYAML::LinkerOptionsSection::Options
Optional< std::vector< LinkerOption > > Options
Definition: ELFYAML.h:491
llvm::ELF::SHT_GROUP
@ SHT_GROUP
Definition: ELF.h:930
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:533
llvm::ELFYAML::GnuHashSection::BloomFilter
Optional< std::vector< llvm::yaml::Hex64 > > BloomFilter
Definition: ELFYAML.h:429
llvm::ELFYAML::Section::ShName
Optional< llvm::yaml::Hex64 > ShName
Definition: ELFYAML.h:257
llvm::ELFYAML::VerneedEntry
Definition: ELFYAML.h:452
llvm::ELFYAML::ARMIndexTableSection::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:650
llvm::ELF::EM_MIPS
@ EM_MIPS
Definition: ELF.h:142
llvm::ELFYAML::Chunk::ChunkKind::Symver
@ Symver
llvm::ELFYAML::VerneedEntry::File
StringRef File
Definition: ELFYAML.h:454
llvm::ELFYAML::AddrsigSection::AddrsigSection
AddrsigSection()
Definition: ELFYAML.h:476
llvm::ELF::SHT_RELR
@ SHT_RELR
Definition: ELF.h:934
llvm::ELF::SHT_SYMTAB_SHNDX
@ SHT_SYMTAB_SHNDX
Definition: ELF.h:931
llvm::ELFYAML::Section::ShFlags
Optional< llvm::yaml::Hex64 > ShFlags
Definition: ELFYAML.h:268
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:142
YAML.h
llvm::ELFYAML::MipsABIFlags::Flags2
llvm::yaml::Hex32 Flags2
Definition: ELFYAML.h:667
llvm::ELFYAML::GnuHashSection
Definition: ELFYAML.h:427
llvm::ELFYAML::RawContentSection::ContentBuf
Optional< std::vector< uint8_t > > ContentBuf
Definition: ELFYAML.h:368
llvm::ELFYAML::LinkerOption::Key
StringRef Key
Definition: ELFYAML.h:486
llvm::ELFYAML::GnuHashSection::HashValues
Optional< std::vector< llvm::yaml::Hex32 > > HashValues
Definition: ELFYAML.h:431
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:593
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:378
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::ELFYAML::VerneedSection::VerneedV
Optional< std::vector< VerneedEntry > > VerneedV
Definition: ELFYAML.h:459
llvm::ELFYAML::GnuHashHeader::NBuckets
Optional< llvm::yaml::Hex32 > NBuckets
Definition: ELFYAML.h:411
llvm::ELFYAML::BBAddrMapSection::Entries
Optional< std::vector< BBAddrMapEntry > > Entries
Definition: ELFYAML.h:315
llvm::None
const NoneType None
Definition: None.h:23
llvm::ELFYAML::Section::ShSize
Optional< llvm::yaml::Hex64 > ShSize
Definition: ELFYAML.h:265
llvm::ELFYAML::StackSizesSection::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:337
llvm::ELFYAML::NoBitsSection::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:374
llvm::ELFYAML::DependentLibrariesSection::getEntries
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition: ELFYAML.h:509
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::ELF::SHT_DYNAMIC
@ SHT_DYNAMIC
Definition: ELF.h:921
llvm::ELFYAML::SymverSection
Definition: ELFYAML.h:538
llvm::ELFYAML::VerdefSection::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:568
llvm::ELFYAML::dropUniqueSuffix
StringRef dropUniqueSuffix(StringRef S)
Definition: ELFEmitter.cpp:695
llvm::ELFYAML::ProgramHeader::LastSec
Optional< StringRef > LastSec
Definition: ELFYAML.h:686
llvm::OutputFileType::Object
@ Object
DWARFYAML.h
llvm::ELFYAML::Object
Definition: ELFYAML.h:692
llvm::ELFYAML::SectionHeaderTable::NoHeaders
Optional< bool > NoHeaders
Definition: ELFYAML.h:299
llvm::ELFYAML::Fill::Pattern
Optional< yaml::BinaryRef > Pattern
Definition: ELFYAML.h:281
llvm::ELFYAML::SectionOrType::sectionNameOrType
StringRef sectionNameOrType
Definition: ELFYAML.h:150
llvm::ELFYAML::GroupSection::Members
Optional< std::vector< SectionOrType > > Members
Definition: ELFYAML.h:574
llvm::ELFYAML::Object::getMachine
unsigned getMachine() const
Definition: ELFYAML.cpp:32
llvm::ELFYAML::appendUniqueSuffix
std::string appendUniqueSuffix(StringRef Name, const Twine &Msg)
Definition: ELFEmitter.cpp:688
llvm::ELFYAML::CallGraphProfileSection::getEntries
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition: ELFYAML.h:529
llvm::ELFYAML::SymtabShndxSection::Entries
Optional< std::vector< uint32_t > > Entries
Definition: ELFYAML.h:623
llvm::ELFYAML::SectionOrType
Definition: ELFYAML.h:149
llvm::ELFYAML::ARMIndexTableEntry::Value
llvm::yaml::Hex32 Value
Definition: ELFYAML.h:638
llvm::ELFYAML::SymtabShndxSection::SymtabShndxSection
SymtabShndxSection()
Definition: ELFYAML.h:625
uint64_t
llvm::ELFYAML::SectionHeaderTable::TypeStr
static constexpr StringRef TypeStr
Definition: ELFYAML.h:311
llvm::ELFYAML::DynamicSection::DynamicSection
DynamicSection()
Definition: ELFYAML.h:349
llvm::ELFYAML::Chunk::ChunkKind::ARMIndexTable
@ ARMIndexTable
llvm::ELFYAML::ProgramHeader::Align
Optional< llvm::yaml::Hex64 > Align
Definition: ELFYAML.h:681
llvm::ELFYAML::SymtabShndxSection
Definition: ELFYAML.h:622
llvm::ELFYAML::ProgramHeader::FirstSec
Optional< StringRef > FirstSec
Definition: ELFYAML.h:685
llvm::ELFYAML::RawContentSection::Info
Optional< llvm::yaml::Hex64 > Info
Definition: ELFYAML.h:359
llvm::ELFYAML::FileHeader::Flags
ELF_EF Flags
Definition: ELFYAML.h:119
llvm::ELF::SHT_REL
@ SHT_REL
Definition: ELF.h:924
llvm::ELFYAML::ProgramHeader::Type
ELF_PT Type
Definition: ELFYAML.h:677
llvm::ELFYAML::BBAddrMapSection
Definition: ELFYAML.h:314
LLVM_YAML_STRONG_TYPEDEF
#define LLVM_YAML_STRONG_TYPEDEF(_base, _type)
llvm::ELFYAML::SymverSection::SymverSection
SymverSection()
Definition: ELFYAML.h:541
llvm::ELFYAML::Object::Header
FileHeader Header
Definition: ELFYAML.h:693
llvm::ELFYAML::LinkerOptionsSection
Definition: ELFYAML.h:490
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:286
llvm::ELFYAML::CallGraphProfileSection::CallGraphProfileSection
CallGraphProfileSection()
Definition: ELFYAML.h:527
llvm::ELFYAML::StackSizesSection
Definition: ELFYAML.h:328
llvm::ELFYAML::Symbol
Definition: ELFYAML.h:136
llvm::ELFYAML::GnuHashHeader
Definition: ELFYAML.h:407
llvm::ELFYAML::Chunk::Name
StringRef Name
Definition: ELFYAML.h:211
llvm::ELFYAML::HashSection::Bucket
Optional< std::vector< uint32_t > > Bucket
Definition: ELFYAML.h:390
llvm::ELFYAML::Section::Type
ELF_SHT Type
Definition: ELFYAML.h:223
llvm::ELFYAML::VernauxEntry::Other
uint16_t Other
Definition: ELFYAML.h:448
llvm::ELFYAML::ARMIndexTableEntry::Offset
llvm::yaml::Hex32 Offset
Definition: ELFYAML.h:637
llvm::ELFYAML::MipsABIFlags::ISARevision
llvm::yaml::Hex8 ISARevision
Definition: ELFYAML.h:659
llvm::ELFYAML::VernauxEntry::Flags
uint16_t Flags
Definition: ELFYAML.h:447
llvm::ELFYAML::Chunk::ChunkKind::SymtabShndxSection
@ SymtabShndxSection
llvm::ELFYAML::BBAddrMapEntry
Definition: ELFYAML.h:158
llvm::ELFYAML::MipsABIFlags
Definition: ELFYAML.h:656
ELFTypes.h
llvm::ELFYAML::Chunk::ChunkKind::Group
@ Group
NoBits
bool NoBits
Definition: ELFObjHandler.cpp:85
llvm::ELFYAML::ARMIndexTableSection
Definition: ELFYAML.h:641
llvm::ELFYAML::Section::Section
Section(ChunkKind Kind, bool IsImplicit=false)
Definition: ELFYAML.h:236
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:478
llvm::ELF::SHT_HASH
@ SHT_HASH
Definition: ELF.h:920
llvm::ELFYAML::BBAddrMapEntry::NumBlocks
Optional< uint64_t > NumBlocks
Definition: ELFYAML.h:165
llvm::ELFYAML::VerdefSection::VerdefSection
VerdefSection()
Definition: ELFYAML.h:562
llvm::ELFYAML::Section::Link
Optional< StringRef > Link
Definition: ELFYAML.h:226
llvm::ELFYAML::RelocationSection::RelocationSection
RelocationSection()
Definition: ELFYAML.h:597
llvm::irsymtab::storage::Word
support::ulittle32_t Word
Definition: IRSymtab.h:52
llvm::ELFYAML::DynamicSection
Definition: ELFYAML.h:346
llvm::ELFYAML::Chunk::ChunkKind::SpecialChunksStart
@ SpecialChunksStart
llvm::ELFYAML::SectionHeaderTable::Excluded
Optional< std::vector< SectionHeader > > Excluded
Definition: ELFYAML.h:298
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:430
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:176
llvm::ELFYAML::Object::ProgramHeaders
std::vector< ProgramHeader > ProgramHeaders
Definition: ELFYAML.h:694
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:58
llvm::ELFYAML::SymverSection::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:547
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:134
llvm::ELFYAML::NoteEntry
Definition: ELFYAML.h:174
llvm::RoundingMode::Dynamic
@ Dynamic
Denotes mode unknown at compile time.
llvm::ELFYAML::SectionHeaderTable::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:293
uint32_t
llvm::ELFYAML::Chunk::ChunkKind::Dynamic
@ Dynamic
llvm::ELFYAML::ProgramHeader::PAddr
llvm::yaml::Hex64 PAddr
Definition: ELFYAML.h:680
llvm::ELFYAML::FileHeader::Data
ELF_ELFDATA Data
Definition: ELFYAML.h:114
llvm::ELFYAML::NoteEntry::Name
StringRef Name
Definition: ELFYAML.h:175
llvm::ELFYAML::MipsABIFlags::CPR1Size
MIPS_AFL_REG CPR1Size
Definition: ELFYAML.h:661
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::ELFYAML::DynamicSection::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:355
llvm::ELFYAML::VerneedSection::getEntries
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition: ELFYAML.h:464
llvm::ELFYAML::Section::OriginalSecNdx
unsigned OriginalSecNdx
Definition: ELFYAML.h:234
llvm::ELFYAML::Relocation::Type
ELF_REL Type
Definition: ELFYAML.h:589
llvm::ELFYAML::HashSection::Chain
Optional< std::vector< uint32_t > > Chain
Definition: ELFYAML.h:391
llvm::ELFYAML::ARMIndexTableSection::ARMIndexTableSection
ARMIndexTableSection()
Definition: ELFYAML.h:644
llvm::ELFYAML::SectionHeaderTable
Definition: ELFYAML.h:289
llvm::ELFYAML::VerdefEntry::VersionNdx
Optional< uint16_t > VersionNdx
Definition: ELFYAML.h:553
llvm::ELFYAML::Section::ShType
Optional< ELF_SHT > ShType
Definition: ELFYAML.h:274
llvm::ELFYAML::Chunk::ChunkKind::Fill
@ Fill
llvm::Twine
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition: Twine.h:83
llvm::ELFYAML::MipsABIFlags::Flags1
MIPS_AFL_FLAGS1 Flags1
Definition: ELFYAML.h:666
llvm::ELFYAML::GnuHashSection::getEntries
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition: ELFYAML.h:435
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:671
llvm::GraphProgram::Name
Name
Definition: GraphWriter.h:52
std
Definition: BitVector.h:838
llvm::ELFYAML::ARMIndexTableSection::getEntries
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition: ELFYAML.h:646
llvm::ELFYAML::ARMIndexTableEntry
Definition: ELFYAML.h:636
llvm::ELFYAML::LinkerOptionsSection::LinkerOptionsSection
LinkerOptionsSection()
Definition: ELFYAML.h:493
llvm::ELFYAML::VerneedSection::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:468
uint16_t
llvm::ELFYAML::Chunk::ChunkKind::Hash
@ Hash
llvm::ELFYAML::DependentLibrariesSection::DependentLibrariesSection
DependentLibrariesSection()
Definition: ELFYAML.h:507
llvm::ELFYAML::VerneedEntry::Version
uint16_t Version
Definition: ELFYAML.h:453
llvm::ELFYAML::RelrSection
Definition: ELFYAML.h:608
llvm::ELFYAML::MipsABIFlags::ISAExtension
MIPS_AFL_EXT ISAExtension
Definition: ELFYAML.h:664
llvm::ELFYAML::DynamicEntry::Val
llvm::yaml::Hex64 Val
Definition: ELFYAML.h:155
llvm::ELFYAML::LinkerOption::Value
StringRef Value
Definition: ELFYAML.h:487
llvm::ELFYAML::Chunk::ChunkKind::StackSizes
@ StackSizes
llvm::ELFYAML::DependentLibrariesSection::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:513
llvm::ELFYAML::CallGraphEntryWeight
Definition: ELFYAML.h:519
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:227
llvm::ELFYAML::VerneedEntry::AuxV
std::vector< VernauxEntry > AuxV
Definition: ELFYAML.h:455
llvm::ELFYAML::SymtabShndxSection::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:631
llvm::ELFYAML::Section::Content
Optional< yaml::BinaryRef > Content
Definition: ELFYAML.h:230
llvm::ELFYAML::GroupSection::Signature
Optional< StringRef > Signature
Definition: ELFYAML.h:575
llvm::ELFYAML::RelrSection::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:617
llvm::ELFYAML::Relocation::Addend
YAMLIntUInt Addend
Definition: ELFYAML.h:588
llvm::ELFYAML::GnuHashHeader::SymNdx
llvm::yaml::Hex32 SymNdx
Definition: ELFYAML.h:415
llvm::ELFYAML::Section::ShOffset
Optional< llvm::yaml::Hex64 > ShOffset
Definition: ELFYAML.h:261
llvm::ELFYAML::SymverSection::Entries
Optional< std::vector< uint16_t > > Entries
Definition: ELFYAML.h:539
llvm::ARMBuildAttrs::Symbol
@ Symbol
Definition: ARMBuildAttributes.h:79
llvm::ELFYAML::Section::Size
Optional< llvm::yaml::Hex64 > Size
Definition: ELFYAML.h:231
llvm::ELFYAML::ProgramHeader::Offset
Optional< llvm::yaml::Hex64 > Offset
Definition: ELFYAML.h:684
llvm::ELF::SHT_LLVM_CALL_GRAPH_PROFILE
@ SHT_LLVM_CALL_GRAPH_PROFILE
Definition: ELF.h:950
llvm::ELFYAML::StackSizesSection::nameMatches
static bool nameMatches(StringRef Name)
Definition: ELFYAML.h:341
llvm::ELFYAML::Fill::Fill
Fill()
Definition: ELFYAML.h:284
llvm::ELFYAML::DynamicSection::Entries
Optional< std::vector< DynamicEntry > > Entries
Definition: ELFYAML.h:347
llvm::ELFYAML::RelocationSection::Relocations
Optional< std::vector< Relocation > > Relocations
Definition: ELFYAML.h:594
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:682
llvm::ELFYAML::Section
Definition: ELFYAML.h:222
llvm::ELFYAML::DynamicEntry
Definition: ELFYAML.h:153
llvm::ELFYAML::VerdefSection
Definition: ELFYAML.h:558
llvm::ELFYAML::Object::getSectionHeaderTable
const SectionHeaderTable & getSectionHeaderTable() const
Definition: ELFYAML.h:716
N
#define N
llvm::ELFYAML::BBAddrMapEntry::BBEntry
Definition: ELFYAML.h:159
llvm::ELFYAML::MipsABIFlags::FpABI
MIPS_ABI_FP FpABI
Definition: ELFYAML.h:663
llvm::ELFYAML::MipsABIFlags::Version
llvm::yaml::Hex16 Version
Definition: ELFYAML.h:657
llvm::ELFYAML::HashSection
Definition: ELFYAML.h:389
llvm::ELFYAML::AddrsigSection::Symbols
Optional< std::vector< YAMLFlowString > > Symbols
Definition: ELFYAML.h:474
llvm::ELFYAML::StackSizeEntry::Size
llvm::yaml::Hex64 Size
Definition: ELFYAML.h:171
llvm::ELFYAML::VerneedSection
Definition: ELFYAML.h:458
llvm::ELFYAML::DependentLibrariesSection
Definition: ELFYAML.h:504
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:683
llvm::ELFYAML::Section::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:238
llvm::ELFYAML::SectionHeaderTable::SectionHeaderTable
SectionHeaderTable(bool IsImplicit)
Definition: ELFYAML.h:290
llvm::ELFYAML::MipsABIFlags::ISALevel
MIPS_ISA ISALevel
Definition: ELFYAML.h:658
llvm::ELFYAML::Chunk::ChunkKind::LinkerOptions
@ LinkerOptions
llvm::ELFYAML::StackSizesSection::StackSizesSection
StackSizesSection()
Definition: ELFYAML.h:331
llvm::ELFYAML::BBAddrMapSection::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:323
llvm::ELFYAML::StackSizesSection::getEntries
std::vector< std::pair< StringRef, bool > > getEntries() const override
Definition: ELFYAML.h:333
llvm::ELFYAML::NoteSection::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:386
llvm::ELFYAML::MipsABIFlags::GPRSize
MIPS_AFL_REG GPRSize
Definition: ELFYAML.h:660
llvm::ELFYAML::Object::Chunks
std::vector< std::unique_ptr< Chunk > > Chunks
Definition: ELFYAML.h:698
llvm::ELFYAML::ProgramHeader::VAddr
llvm::yaml::Hex64 VAddr
Definition: ELFYAML.h:679
llvm::ELFYAML::VerdefEntry::Hash
Optional< uint32_t > Hash
Definition: ELFYAML.h:554
llvm::ELFYAML::FileHeader::OSABI
ELF_ELFOSABI OSABI
Definition: ELFYAML.h:115
llvm::ELFYAML::NoBitsSection::NoBitsSection
NoBitsSection()
Definition: ELFYAML.h:372
llvm::ELFYAML::GroupSection::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:583
llvm::ELFYAML::StackSizeEntry
Definition: ELFYAML.h:169
llvm::ELFYAML::HashSection::classof
static bool classof(const Chunk *S)
Definition: ELFYAML.h:404
llvm::Value
LLVM Value Representation.
Definition: Value.h:75
llvm::ELFYAML::VerdefEntry::Flags
Optional< uint16_t > Flags
Definition: ELFYAML.h:552
llvm::ELFYAML::VernauxEntry
Definition: ELFYAML.h:445
llvm::ELFYAML::Section::getEntries
virtual std::vector< std::pair< StringRef, bool > > getEntries() const
Definition: ELFYAML.h:245
llvm::ELFYAML::CallGraphEntryWeight::Weight
uint64_t Weight
Definition: ELFYAML.h:521
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:678
llvm::ELFYAML::FileHeader::EPhNum
Optional< llvm::yaml::Hex16 > EPhNum
Definition: ELFYAML.h:125
llvm::ELFYAML::Chunk
Definition: ELFYAML.h:180
llvm::ELFYAML::RelrSection::RelrSection
RelrSection()
Definition: ELFYAML.h:611
llvm::ELFYAML::Chunk::IsImplicit
bool IsImplicit
Definition: ELFYAML.h:216