Go to the documentation of this file.
15 #ifndef LLVM_OBJECTYAML_ELFYAML_H
16 #define LLVM_OBJECTYAML_ELFYAML_H
84 return sizeof(
typename ELFT::Sym);
88 return sizeof(
typename ELFT::Rel);
90 return sizeof(
typename ELFT::Rela);
92 return sizeof(
typename ELFT::Relr);
94 return sizeof(
typename ELFT::Dyn);
100 return sizeof(
typename ELFT::Half);
104 if (SecName ==
".debug_str")
245 virtual std::vector<std::pair<StringRef, bool>>
getEntries()
const {
319 std::vector<std::pair<StringRef, bool>>
getEntries()
const override {
320 return {{
"Entries",
Entries.has_value()}};
333 std::vector<std::pair<StringRef, bool>>
getEntries()
const override {
334 return {{
"Entries",
Entries.has_value()}};
342 return Name ==
".stack_sizes";
351 std::vector<std::pair<StringRef, bool>>
getEntries()
const override {
352 return {{
"Entries",
Entries.has_value()}};
382 std::vector<std::pair<StringRef, bool>>
getEntries()
const override {
383 return {{
"Notes",
Notes.has_value()}};
393 std::vector<std::pair<StringRef, bool>>
getEntries()
const override {
435 std::vector<std::pair<StringRef, bool>>
getEntries()
const override {
436 return {{
"Header",
Header.hasValue()},
455 std::vector<VernauxEntry>
AuxV;
464 std::vector<std::pair<StringRef, bool>>
getEntries()
const override {
465 return {{
"Dependencies",
VerneedV.has_value()}};
478 std::vector<std::pair<StringRef, bool>>
getEntries()
const override {
495 std::vector<std::pair<StringRef, bool>>
getEntries()
const override {
496 return {{
"Options",
Options.has_value()}};
509 std::vector<std::pair<StringRef, bool>>
getEntries()
const override {
529 std::vector<std::pair<StringRef, bool>>
getEntries()
const override {
530 return {{
"Entries",
Entries.has_value()}};
543 std::vector<std::pair<StringRef, bool>>
getEntries()
const override {
564 std::vector<std::pair<StringRef, bool>>
getEntries()
const override {
565 return {{
"Entries",
Entries.has_value()}};
579 std::vector<std::pair<StringRef, bool>>
getEntries()
const override {
580 return {{
"Members",
Members.has_value()}};
599 std::vector<std::pair<StringRef, bool>>
getEntries()
const override {
613 std::vector<std::pair<StringRef, bool>>
getEntries()
const override {
627 std::vector<std::pair<StringRef, bool>>
getEntries()
const override {
646 std::vector<std::pair<StringRef, bool>>
getEntries()
const override {
647 return {{
"Entries",
Entries.has_value()}};
698 std::vector<std::unique_ptr<Chunk>>
Chunks;
709 std::vector<Section *>
Ret;
710 for (
const std::unique_ptr<Chunk> &Sec :
Chunks)
711 if (
auto S = dyn_cast<ELFYAML::Section>(Sec.get()))
717 for (
const std::unique_ptr<Chunk> &
C :
Chunks)
718 if (
auto *
S = dyn_cast<ELFYAML::SectionHeaderTable>(
C.get()))
728 const NoBitsSection &
S);
754 template <>
struct ScalarTraits<ELFYAML::YAMLIntUInt> {
755 static void output(
const ELFYAML::YAMLIntUInt &Val,
void *Ctx,
758 ELFYAML::YAMLIntUInt &Val);
763 struct ScalarEnumerationTraits<ELFYAML::ELF_ET> {
764 static void enumeration(IO &IO, ELFYAML::ELF_ET &
Value);
767 template <>
struct ScalarEnumerationTraits<ELFYAML::ELF_PT> {
768 static void enumeration(IO &IO, ELFYAML::ELF_PT &
Value);
771 template <>
struct ScalarEnumerationTraits<ELFYAML::ELF_NT> {
772 static void enumeration(IO &IO, ELFYAML::ELF_NT &
Value);
776 struct ScalarEnumerationTraits<ELFYAML::ELF_EM> {
777 static void enumeration(IO &IO, ELFYAML::ELF_EM &
Value);
781 struct ScalarEnumerationTraits<ELFYAML::ELF_ELFCLASS> {
782 static void enumeration(IO &IO, ELFYAML::ELF_ELFCLASS &
Value);
786 struct ScalarEnumerationTraits<ELFYAML::ELF_ELFDATA> {
787 static void enumeration(IO &IO, ELFYAML::ELF_ELFDATA &
Value);
791 struct ScalarEnumerationTraits<ELFYAML::ELF_ELFOSABI> {
792 static void enumeration(IO &IO, ELFYAML::ELF_ELFOSABI &
Value);
796 struct ScalarBitSetTraits<ELFYAML::ELF_EF> {
797 static void bitset(IO &IO, ELFYAML::ELF_EF &
Value);
800 template <>
struct ScalarBitSetTraits<ELFYAML::ELF_PF> {
801 static void bitset(IO &IO, ELFYAML::ELF_PF &
Value);
805 struct ScalarEnumerationTraits<ELFYAML::ELF_SHT> {
806 static void enumeration(IO &IO, ELFYAML::ELF_SHT &
Value);
810 struct ScalarBitSetTraits<ELFYAML::ELF_SHF> {
811 static void bitset(IO &IO, ELFYAML::ELF_SHF &
Value);
814 template <>
struct ScalarEnumerationTraits<ELFYAML::ELF_SHN> {
815 static void enumeration(IO &IO, ELFYAML::ELF_SHN &
Value);
818 template <>
struct ScalarEnumerationTraits<ELFYAML::ELF_STB> {
819 static void enumeration(IO &IO, ELFYAML::ELF_STB &
Value);
823 struct ScalarEnumerationTraits<ELFYAML::ELF_STT> {
824 static void enumeration(IO &IO, ELFYAML::ELF_STT &
Value);
828 struct ScalarEnumerationTraits<ELFYAML::ELF_REL> {
829 static void enumeration(IO &IO, ELFYAML::ELF_REL &
Value);
833 struct ScalarEnumerationTraits<ELFYAML::ELF_DYNTAG> {
834 static void enumeration(IO &IO, ELFYAML::ELF_DYNTAG &
Value);
838 struct ScalarEnumerationTraits<ELFYAML::ELF_RSS> {
839 static void enumeration(IO &IO, ELFYAML::ELF_RSS &
Value);
843 struct ScalarEnumerationTraits<ELFYAML::MIPS_AFL_REG> {
844 static void enumeration(IO &IO, ELFYAML::MIPS_AFL_REG &
Value);
848 struct ScalarEnumerationTraits<ELFYAML::MIPS_ABI_FP> {
849 static void enumeration(IO &IO, ELFYAML::MIPS_ABI_FP &
Value);
853 struct ScalarEnumerationTraits<ELFYAML::MIPS_AFL_EXT> {
854 static void enumeration(IO &IO, ELFYAML::MIPS_AFL_EXT &
Value);
858 struct ScalarEnumerationTraits<ELFYAML::MIPS_ISA> {
859 static void enumeration(IO &IO, ELFYAML::MIPS_ISA &
Value);
863 struct ScalarBitSetTraits<ELFYAML::MIPS_AFL_ASE> {
864 static void bitset(IO &IO, ELFYAML::MIPS_AFL_ASE &
Value);
868 struct ScalarBitSetTraits<ELFYAML::MIPS_AFL_FLAGS1> {
869 static void bitset(IO &IO, ELFYAML::MIPS_AFL_FLAGS1 &
Value);
945 static void mapping(IO &IO, std::unique_ptr<ELFYAML::Chunk> &
C);
946 static std::string
validate(IO &io, std::unique_ptr<ELFYAML::Chunk> &
C);
961 #endif // LLVM_OBJECTYAML_ELFYAML_H
Optional< DWARFYAML::Data > DWARF
std::vector< std::pair< StringRef, bool > > getEntries() const override
llvm::yaml::Hex64 Address
Optional< StringRef > Symbol
Chunk(ChunkKind K, bool Implicit)
llvm::yaml::Hex64 Address
std::vector< std::pair< StringRef, bool > > getEntries() const override
Optional< llvm::yaml::Hex64 > NChain
Optional< ELF_SHF > Flags
This is an optimization pass for GlobalISel generic memory operations.
Optional< std::vector< Symbol > > Symbols
static bool classof(const Chunk *S)
bool shouldAllocateFileSpace(ArrayRef< ProgramHeader > Phdrs, const NoBitsSection &S)
Optional< std::vector< StackSizeEntry > > Entries
Optional< StringRef > Section
unsigned getDefaultShEntSize(unsigned EMachine, ELF_SHT SecType, StringRef SecName)
Optional< std::vector< CallGraphEntryWeight > > Entries
std::vector< std::pair< StringRef, bool > > getEntries() const override
Optional< std::vector< ARMIndexTableEntry > > Entries
Optional< std::vector< Symbol > > DynamicSymbols
We currently emits eax Perhaps this is what we really should generate is Is imull three or four cycles Note
Optional< llvm::yaml::Hex64 > Size
std::vector< std::pair< StringRef, bool > > getEntries() const override
std::vector< std::pair< StringRef, bool > > getEntries() const override
Optional< llvm::yaml::Hex64 > Info
#define LLVM_YAML_IS_SEQUENCE_VECTOR(type)
Optional< llvm::yaml::Hex64 > ShAddrAlign
std::vector< std::pair< StringRef, bool > > getEntries() const override
Optional< llvm::yaml::Hex64 > NBucket
Optional< llvm::yaml::Hex64 > Offset
Optional< llvm::yaml::Hex64 > Address
static bool classof(const Chunk *S)
ELF_ELFOSABI getOSAbi() const
Optional< std::vector< llvm::yaml::Hex64 > > Entries
std::vector< std::pair< StringRef, bool > > getEntries() const override
Optional< std::vector< VerdefEntry > > Entries
Optional< GnuHashHeader > Header
std::vector< std::pair< StringRef, bool > > getEntries() const override
void validate(const Triple &TT, const FeatureBitset &FeatureBits)
Optional< uint8_t > Other
std::vector< std::pair< StringRef, bool > > getEntries() const override
std::vector< std::pair< StringRef, bool > > getEntries() const override
static bool classof(const Chunk *S)
Optional< std::vector< YAMLFlowString > > Libs
Optional< uint16_t > Version
static QuotingType mustQuote(StringRef)
constexpr bool hasValue() const
static bool classof(const Chunk *S)
std::vector< StringRef > VerNames
Optional< std::vector< BBEntry > > BBEntries
std::vector< std::pair< StringRef, bool > > getEntries() const override
std::vector< Section * > getSections()
@ SHT_LLVM_CALL_GRAPH_PROFILE
Optional< llvm::yaml::Hex64 > EntSize
Optional< uint32_t > StName
static bool classof(const Chunk *S)
Optional< llvm::yaml::Hex64 > Info
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
Optional< std::vector< LinkerOption > > Options
(vector float) vec_cmpeq(*A, *B) C
static bool classof(const Chunk *S)
Optional< std::vector< llvm::yaml::Hex64 > > BloomFilter
Optional< llvm::yaml::Hex64 > ShName
static bool classof(const Chunk *S)
Optional< llvm::yaml::Hex64 > ShFlags
Optional< llvm::yaml::Hex64 > Value
@ Implicit
Not emitted register (e.g. carry, or temporary result).
Optional< std::vector< uint8_t > > ContentBuf
Optional< std::vector< llvm::yaml::Hex32 > > HashValues
This class implements an extremely fast bulk output stream that can only output to a stream.
Optional< ELF_SHN > Index
Optional< std::vector< ELFYAML::NoteEntry > > Notes
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
Optional< std::vector< VerneedEntry > > VerneedV
Optional< std::vector< BBAddrMapEntry > > Entries
Optional< llvm::yaml::Hex64 > ShSize
static bool classof(const Chunk *S)
static bool classof(const Chunk *S)
std::vector< std::pair< StringRef, bool > > getEntries() const override
static bool classof(const Chunk *S)
StringRef dropUniqueSuffix(StringRef S)
Optional< yaml::BinaryRef > Pattern
StringRef sectionNameOrType
Optional< std::vector< SectionOrType > > Members
unsigned getMachine() const
std::string appendUniqueSuffix(StringRef Name, const Twine &Msg)
std::vector< std::pair< StringRef, bool > > getEntries() const override
Optional< std::vector< uint32_t > > Entries
Optional< llvm::yaml::Hex64 > Info
#define LLVM_YAML_STRONG_TYPEDEF(_base, _type)
static bool classof(const Chunk *S)
CallGraphProfileSection()
Optional< std::vector< uint32_t > > Bucket
llvm::yaml::Hex8 ISARevision
Section(ChunkKind Kind, bool IsImplicit=false)
std::vector< std::pair< StringRef, bool > > getEntries() const override
Optional< uint64_t > NumBlocks
Optional< StringRef > Link
support::ulittle32_t Word
Optional< std::vector< llvm::yaml::Hex32 > > HashBuckets
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
std::vector< ProgramHeader > ProgramHeaders
StringRef - Represent a constant reference to a string, i.e.
static bool classof(const Chunk *S)
Specialized YAMLIO scalar type for representing a binary blob.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
@ Dynamic
Denotes mode unknown at compile time.
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
constexpr bool has_value() const
static bool classof(const Chunk *S)
std::vector< std::pair< StringRef, bool > > getEntries() const override
Optional< std::vector< uint32_t > > Chain
const CustomOperand< const MCSubtargetInfo & > Msg[]
Optional< uint16_t > VersionNdx
Optional< ELF_SHT > ShType
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
std::vector< std::pair< StringRef, bool > > getEntries() const override
static bool classof(const Chunk *S)
std::vector< std::pair< StringRef, bool > > getEntries() const override
static bool classof(const Chunk *S)
DependentLibrariesSection()
MIPS_AFL_EXT ISAExtension
static bool classof(const Chunk *S)
llvm::yaml::Hex64 AddressAlign
std::vector< VernauxEntry > AuxV
static bool classof(const Chunk *S)
Optional< yaml::BinaryRef > Content
Optional< StringRef > Signature
static bool classof(const Chunk *S)
Optional< llvm::yaml::Hex64 > ShOffset
Optional< std::vector< uint16_t > > Entries
Optional< llvm::yaml::Hex64 > Size
static bool nameMatches(StringRef Name)
Optional< std::vector< DynamicEntry > > Entries
Optional< std::vector< Relocation > > Relocations
llvm::yaml::Hex64 AddressOffset
const SectionHeaderTable & getSectionHeaderTable() const
llvm::yaml::Hex16 Version
Optional< std::vector< YAMLFlowString > > Symbols
llvm::yaml::Hex64 Metadata
static bool classof(const Chunk *S)
static bool classof(const Chunk *S)
std::vector< std::pair< StringRef, bool > > getEntries() const override
static bool classof(const Chunk *S)
std::vector< std::unique_ptr< Chunk > > Chunks
Optional< uint32_t > Hash
static bool classof(const Chunk *S)
static bool classof(const Chunk *S)
LLVM Value Representation.
Optional< uint16_t > Flags
virtual std::vector< std::pair< StringRef, bool > > getEntries() const