LLVM 19.0.0git
Classes | Namespaces | Macros | Functions
ELFYAML.cpp File Reference
#include "llvm/ObjectYAML/ELFYAML.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/MapVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/BinaryFormat/ELF.h"
#include "llvm/Support/ARMEHABI.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/MipsABIFlags.h"
#include "llvm/Support/YAMLTraits.h"
#include "llvm/Support/WithColor.h"
#include <cassert>
#include <cstdint>
#include <optional>
#include "llvm/BinaryFormat/ELFRelocs/x86_64.def"
#include "llvm/BinaryFormat/ELFRelocs/Mips.def"
#include "llvm/BinaryFormat/ELFRelocs/Hexagon.def"
#include "llvm/BinaryFormat/ELFRelocs/i386.def"
#include "llvm/BinaryFormat/ELFRelocs/AArch64.def"
#include "llvm/BinaryFormat/ELFRelocs/ARM.def"
#include "llvm/BinaryFormat/ELFRelocs/ARC.def"
#include "llvm/BinaryFormat/ELFRelocs/RISCV.def"
#include "llvm/BinaryFormat/ELFRelocs/Lanai.def"
#include "llvm/BinaryFormat/ELFRelocs/AMDGPU.def"
#include "llvm/BinaryFormat/ELFRelocs/BPF.def"
#include "llvm/BinaryFormat/ELFRelocs/VE.def"
#include "llvm/BinaryFormat/ELFRelocs/CSKY.def"
#include "llvm/BinaryFormat/ELFRelocs/PowerPC.def"
#include "llvm/BinaryFormat/ELFRelocs/PowerPC64.def"
#include "llvm/BinaryFormat/ELFRelocs/M68k.def"
#include "llvm/BinaryFormat/ELFRelocs/LoongArch.def"
#include "llvm/BinaryFormat/ELFRelocs/Xtensa.def"
#include "llvm/BinaryFormat/DynamicTags.def"

Go to the source code of this file.

Classes

struct  llvm::yaml::ScalarTraits< StOtherPiece >
 
struct  llvm::yaml::SequenceElementTraits< StOtherPiece >
 
struct  llvm::yaml::ScalarTraits< ELFYAML::YAMLFlowString >
 
struct  llvm::yaml::SequenceElementTraits< ELFYAML::YAMLFlowString >
 

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
 
namespace  llvm::ELFYAML
 
namespace  llvm::yaml
 

Macros

#define ECase(X)   IO.enumCase(Value, #X, ELF::X)
 
#define ECase(X)   IO.enumCase(Value, #X, ELF::X)
 
#define ECase(X)   IO.enumCase(Value, #X, ELF::X)
 
#define ECase(X)   IO.enumCase(Value, #X, ELF::X)
 
#define ECase(X)   IO.enumCase(Value, #X, ELF::X)
 
#define ECase(X)   IO.enumCase(Value, #X, ELF::X)
 
#define ECase(X)   IO.enumCase(Value, #X, ELF::X)
 
#define BCase(X)   IO.bitSetCase(Value, #X, ELF::X)
 
#define BCaseMask(X, M)   IO.maskedBitSetCase(Value, #X, ELF::X, ELF::M)
 
#define ECase(X)   IO.enumCase(Value, #X, ELF::X)
 
#define BCase(X)   IO.bitSetCase(Value, #X, ELF::X)
 
#define BCase(X)   IO.bitSetCase(Value, #X, ELF::X)
 
#define ECase(X)   IO.enumCase(Value, #X, ELF::X)
 
#define ECase(X)   IO.enumCase(Value, #X, ELF::X)
 
#define ECase(X)   IO.enumCase(Value, #X, ELF::X)
 
#define ECase(X)   IO.enumCase(Value, #X, ELF::X)
 
#define ELF_RELOC(X, Y)   IO.enumCase(Value, #X, ELF::X);
 
#define AARCH64_DYNAMIC_TAG(name, value)
 
#define MIPS_DYNAMIC_TAG(name, value)
 
#define HEXAGON_DYNAMIC_TAG(name, value)
 
#define PPC_DYNAMIC_TAG(name, value)
 
#define PPC64_DYNAMIC_TAG(name, value)
 
#define DYNAMIC_TAG_MARKER(name, value)
 
#define STRINGIFY(X)   (#X)
 
#define DYNAMIC_TAG(X, Y)   IO.enumCase(Value, STRINGIFY(DT_##X), ELF::DT_##X);
 
#define AARCH64_DYNAMIC_TAG(name, value)   DYNAMIC_TAG(name, value)
 
#define AARCH64_DYNAMIC_TAG(name, value)
 
#define MIPS_DYNAMIC_TAG(name, value)   DYNAMIC_TAG(name, value)
 
#define MIPS_DYNAMIC_TAG(name, value)
 
#define HEXAGON_DYNAMIC_TAG(name, value)   DYNAMIC_TAG(name, value)
 
#define HEXAGON_DYNAMIC_TAG(name, value)
 
#define PPC_DYNAMIC_TAG(name, value)   DYNAMIC_TAG(name, value)
 
#define PPC_DYNAMIC_TAG(name, value)
 
#define PPC64_DYNAMIC_TAG(name, value)   DYNAMIC_TAG(name, value)
 
#define PPC64_DYNAMIC_TAG(name, value)
 
#define RISCV_DYNAMIC_TAG(name, value)   DYNAMIC_TAG(name, value)
 
#define RISCV_DYNAMIC_TAG(name, value)
 
#define ECase(X)   IO.enumCase(Value, #X, Mips::AFL_##X)
 
#define ECase(X)   IO.enumCase(Value, #X, Mips::Val_GNU_MIPS_ABI_##X)
 
#define ECase(X)   IO.enumCase(Value, #X, Mips::AFL_##X)
 
#define BCase(X)   IO.bitSetCase(Value, #X, Mips::AFL_ASE_##X)
 
#define BCase(X)   IO.bitSetCase(Value, #X, Mips::AFL_FLAGS1_##X)
 

Functions

static void llvm::yaml::commonSectionMapping (IO &IO, ELFYAML::Section &Section)
 
static void llvm::yaml::sectionMapping (IO &IO, ELFYAML::DynamicSection &Section)
 
static void llvm::yaml::sectionMapping (IO &IO, ELFYAML::RawContentSection &Section)
 
static void llvm::yaml::sectionMapping (IO &IO, ELFYAML::BBAddrMapSection &Section)
 
static void llvm::yaml::sectionMapping (IO &IO, ELFYAML::StackSizesSection &Section)
 
static void llvm::yaml::sectionMapping (IO &IO, ELFYAML::HashSection &Section)
 
static void llvm::yaml::sectionMapping (IO &IO, ELFYAML::NoteSection &Section)
 
static void llvm::yaml::sectionMapping (IO &IO, ELFYAML::GnuHashSection &Section)
 
static void llvm::yaml::sectionMapping (IO &IO, ELFYAML::NoBitsSection &Section)
 
static void llvm::yaml::sectionMapping (IO &IO, ELFYAML::VerdefSection &Section)
 
static void llvm::yaml::sectionMapping (IO &IO, ELFYAML::SymverSection &Section)
 
static void llvm::yaml::sectionMapping (IO &IO, ELFYAML::VerneedSection &Section)
 
static void llvm::yaml::sectionMapping (IO &IO, ELFYAML::RelocationSection &Section)
 
static void llvm::yaml::sectionMapping (IO &IO, ELFYAML::RelrSection &Section)
 
static void llvm::yaml::groupSectionMapping (IO &IO, ELFYAML::GroupSection &Group)
 
static void llvm::yaml::sectionMapping (IO &IO, ELFYAML::SymtabShndxSection &Section)
 
static void llvm::yaml::sectionMapping (IO &IO, ELFYAML::AddrsigSection &Section)
 
static void llvm::yaml::fillMapping (IO &IO, ELFYAML::Fill &Fill)
 
static void llvm::yaml::sectionHeaderTableMapping (IO &IO, ELFYAML::SectionHeaderTable &SHT)
 
static void llvm::yaml::sectionMapping (IO &IO, ELFYAML::LinkerOptionsSection &Section)
 
static void llvm::yaml::sectionMapping (IO &IO, ELFYAML::DependentLibrariesSection &Section)
 
static void llvm::yaml::sectionMapping (IO &IO, ELFYAML::CallGraphProfileSection &Section)
 
static void llvm::yaml::sectionMapping (IO &IO, ELFYAML::ARMIndexTableSection &Section)
 
static void llvm::yaml::sectionMapping (IO &IO, ELFYAML::MipsABIFlags &Section)
 
static StringRef llvm::yaml::getStringValue (IO &IO, const char *Key)
 
static void llvm::yaml::setStringValue (IO &IO, const char *Key, StringRef Val)
 
static bool llvm::yaml::isInteger (StringRef Val)
 

Macro Definition Documentation

◆ AARCH64_DYNAMIC_TAG [1/3]

#define AARCH64_DYNAMIC_TAG (   name,
  value 
)

◆ AARCH64_DYNAMIC_TAG [2/3]

#define AARCH64_DYNAMIC_TAG (   name,
  value 
)    DYNAMIC_TAG(name, value)

◆ AARCH64_DYNAMIC_TAG [3/3]

#define AARCH64_DYNAMIC_TAG (   name,
  value 
)

◆ BCase [1/5]

#define BCase (   X)    IO.bitSetCase(Value, #X, ELF::X)

◆ BCase [2/5]

#define BCase (   X)    IO.bitSetCase(Value, #X, ELF::X)

◆ BCase [3/5]

#define BCase (   X)    IO.bitSetCase(Value, #X, ELF::X)

◆ BCase [4/5]

#define BCase (   X)    IO.bitSetCase(Value, #X, Mips::AFL_ASE_##X)

◆ BCase [5/5]

#define BCase (   X)    IO.bitSetCase(Value, #X, Mips::AFL_FLAGS1_##X)

◆ BCaseMask

#define BCaseMask (   X,
 
)    IO.maskedBitSetCase(Value, #X, ELF::X, ELF::M)

◆ DYNAMIC_TAG

#define DYNAMIC_TAG (   X,
  Y 
)    IO.enumCase(Value, STRINGIFY(DT_##X), ELF::DT_##X);

◆ DYNAMIC_TAG_MARKER

#define DYNAMIC_TAG_MARKER (   name,
  value 
)

◆ ECase [1/15]

#define ECase (   X)    IO.enumCase(Value, #X, ELF::X)

◆ ECase [2/15]

#define ECase (   X)    IO.enumCase(Value, #X, ELF::X)

◆ ECase [3/15]

#define ECase (   X)    IO.enumCase(Value, #X, ELF::X)

◆ ECase [4/15]

#define ECase (   X)    IO.enumCase(Value, #X, ELF::X)

◆ ECase [5/15]

#define ECase (   X)    IO.enumCase(Value, #X, ELF::X)

◆ ECase [6/15]

#define ECase (   X)    IO.enumCase(Value, #X, ELF::X)

◆ ECase [7/15]

#define ECase (   X)    IO.enumCase(Value, #X, ELF::X)

◆ ECase [8/15]

#define ECase (   X)    IO.enumCase(Value, #X, ELF::X)

◆ ECase [9/15]

#define ECase (   X)    IO.enumCase(Value, #X, ELF::X)

◆ ECase [10/15]

#define ECase (   X)    IO.enumCase(Value, #X, ELF::X)

◆ ECase [11/15]

#define ECase (   X)    IO.enumCase(Value, #X, ELF::X)

◆ ECase [12/15]

#define ECase (   X)    IO.enumCase(Value, #X, ELF::X)

◆ ECase [13/15]

#define ECase (   X)    IO.enumCase(Value, #X, Mips::AFL_##X)

◆ ECase [14/15]

#define ECase (   X)    IO.enumCase(Value, #X, Mips::Val_GNU_MIPS_ABI_##X)

◆ ECase [15/15]

#define ECase (   X)    IO.enumCase(Value, #X, Mips::AFL_##X)

◆ ELF_RELOC

#define ELF_RELOC (   X,
  Y 
)    IO.enumCase(Value, #X, ELF::X);

◆ HEXAGON_DYNAMIC_TAG [1/3]

#define HEXAGON_DYNAMIC_TAG (   name,
  value 
)

◆ HEXAGON_DYNAMIC_TAG [2/3]

#define HEXAGON_DYNAMIC_TAG (   name,
  value 
)    DYNAMIC_TAG(name, value)

◆ HEXAGON_DYNAMIC_TAG [3/3]

#define HEXAGON_DYNAMIC_TAG (   name,
  value 
)

◆ MIPS_DYNAMIC_TAG [1/3]

#define MIPS_DYNAMIC_TAG (   name,
  value 
)

◆ MIPS_DYNAMIC_TAG [2/3]

#define MIPS_DYNAMIC_TAG (   name,
  value 
)    DYNAMIC_TAG(name, value)

◆ MIPS_DYNAMIC_TAG [3/3]

#define MIPS_DYNAMIC_TAG (   name,
  value 
)

◆ PPC64_DYNAMIC_TAG [1/3]

#define PPC64_DYNAMIC_TAG (   name,
  value 
)

◆ PPC64_DYNAMIC_TAG [2/3]

#define PPC64_DYNAMIC_TAG (   name,
  value 
)    DYNAMIC_TAG(name, value)

◆ PPC64_DYNAMIC_TAG [3/3]

#define PPC64_DYNAMIC_TAG (   name,
  value 
)

◆ PPC_DYNAMIC_TAG [1/3]

#define PPC_DYNAMIC_TAG (   name,
  value 
)

◆ PPC_DYNAMIC_TAG [2/3]

#define PPC_DYNAMIC_TAG (   name,
  value 
)    DYNAMIC_TAG(name, value)

◆ PPC_DYNAMIC_TAG [3/3]

#define PPC_DYNAMIC_TAG (   name,
  value 
)

◆ RISCV_DYNAMIC_TAG [1/2]

#define RISCV_DYNAMIC_TAG (   name,
  value 
)    DYNAMIC_TAG(name, value)

◆ RISCV_DYNAMIC_TAG [2/2]

#define RISCV_DYNAMIC_TAG (   name,
  value 
)

◆ STRINGIFY

#define STRINGIFY (   X)    (#X)

Variable Documentation

◆ Other

std::optional<std::vector<StOtherPiece> > Other

◆ SpecSym

ELFYAML::ELF_RSS SpecSym

Definition at line 1811 of file ELFYAML.cpp.

◆ Type

ELFYAML::ELF_REL Type

Definition at line 1808 of file ELFYAML.cpp.

◆ Type2

ELFYAML::ELF_REL Type2

Definition at line 1809 of file ELFYAML.cpp.

Referenced by llvm::object::ELFFile< ELFT >::getRelocationTypeName().

◆ Type3

ELFYAML::ELF_REL Type3

Definition at line 1810 of file ELFYAML.cpp.

Referenced by llvm::object::ELFFile< ELFT >::getRelocationTypeName().

◆ UnknownFlagsHolder

std::string UnknownFlagsHolder

Definition at line 1291 of file ELFYAML.cpp.

◆ YamlIO

IO& YamlIO

Definition at line 1289 of file ELFYAML.cpp.

Referenced by llvm::yaml::CustomMappingTraits< BBNumberMap >::inputOne(), llvm::yaml::MappingTraits< AArch64FunctionInfo >::mapping(), llvm::yaml::MappingTraits< ARMFunctionInfo >::mapping(), llvm::yaml::MappingTraits< CallSiteInfo >::mapping(), llvm::yaml::MappingTraits< CallSiteInfo::ArgRegPair >::mapping(), llvm::yaml::MappingTraits< DebugValueSubstitution >::mapping(), llvm::yaml::MappingTraits< MachineConstantPoolValue >::mapping(), llvm::yaml::MappingTraits< MachineFrameInfo >::mapping(), llvm::yaml::MappingTraits< MachineFunction >::mapping(), llvm::yaml::MappingTraits< MachineFunctionLiveIn >::mapping(), llvm::yaml::MappingTraits< MachineJumpTable >::mapping(), llvm::yaml::MappingTraits< MachineJumpTable::Entry >::mapping(), llvm::yaml::MappingTraits< RISCVMachineFunctionInfo >::mapping(), llvm::yaml::MappingTraits< SIArgument >::mapping(), llvm::yaml::MappingTraits< SIArgumentInfo >::mapping(), llvm::yaml::MappingTraits< SIMachineFunctionInfo >::mapping(), llvm::yaml::MappingTraits< SIMode >::mapping(), llvm::yaml::MappingTraits< std::unique_ptr< MachineFunctionInfo > >::mapping(), llvm::yaml::MappingTraits< VirtualRegisterDefinition >::mapping(), llvm::yaml::MappingTraits< WebAssemblyFunctionInfo >::mapping(), llvm::yaml::MappingTraits< EntryValueObject >::mapping(), llvm::yaml::MappingTraits< FixedMachineStackObject >::mapping(), llvm::yaml::MappingTraits< MachineStackObject >::mapping(), llvm::yaml::AArch64FunctionInfo::mappingImpl(), llvm::yaml::SIMachineFunctionInfo::mappingImpl(), llvm::yaml::ARMFunctionInfo::mappingImpl(), llvm::yaml::RISCVMachineFunctionInfo::mappingImpl(), llvm::yaml::WebAssemblyFunctionInfo::mappingImpl(), and llvm::yaml::CustomMappingTraits< BBNumberMap >::output().