LLVM 20.0.0git
|
#include "llvm/Object/ELFObjectFile.h"
Public Types | |
using | elf_symbol_iterator_range = iterator_range< elf_symbol_iterator > |
Public Types inherited from llvm::object::ObjectFile | |
using | symbol_iterator_range = iterator_range< symbol_iterator > |
using | section_iterator_range = iterator_range< section_iterator > |
Public Types inherited from llvm::object::SymbolicFile | |
using | basic_symbol_iterator_range = iterator_range< basic_symbol_iterator > |
Friends | |
class | ELFRelocationRef |
class | ELFSectionRef |
class | ELFSymbolRef |
Additional Inherited Members | |
Protected Types inherited from llvm::object::Binary | |
enum | { ID_Archive , ID_MachOUniversalBinary , ID_COFFImportFile , ID_IR , ID_TapiUniversal , ID_TapiFile , ID_Minidump , ID_WinRes , ID_Offload , ID_StartObjects , ID_COFF , ID_XCOFF32 , ID_XCOFF64 , ID_ELF32L , ID_ELF32B , ID_ELF64L , ID_ELF64B , ID_MachO32L , ID_MachO32B , ID_MachO64L , ID_MachO64B , ID_GOFF , ID_Wasm , ID_EndObjects } |
Static Protected Member Functions inherited from llvm::object::Binary | |
static unsigned int | getELFType (bool isLE, bool is64Bits) |
static unsigned int | getMachOType (bool isLE, bool is64Bits) |
Protected Attributes inherited from llvm::object::Binary | |
MemoryBufferRef | Data |
Definition at line 57 of file ELFObjectFile.h.
using llvm::object::ELFObjectFileBase::elf_symbol_iterator_range = iterator_range<elf_symbol_iterator> |
Definition at line 87 of file ELFObjectFile.h.
|
protected |
Definition at line 60 of file ELFObjectFile.cpp.
Definition at line 96 of file ELFObjectFile.h.
|
protectedpure virtual |
Implemented in llvm::object::ELFObjectFile< ELFT >.
Referenced by setARMSubArch().
StringRef ELFObjectFileBase::getCrelDecodeProblem | ( | SectionRef | Sec | ) | const |
Definition at line 1019 of file ELFObjectFile.cpp.
References llvm::object::Binary::Data, and llvm::object::SectionRef::getRawDataRefImpl().
|
pure virtual |
Implemented in llvm::object::ELFObjectFile< ELFT >.
Referenced by readDynsymVersions().
|
pure virtual |
|
pure virtual |
Referenced by getFeatures(), getPltEntries(), and tryGetCPUName().
|
pure virtual |
|
overridevirtual |
Implements llvm::object::ObjectFile.
Definition at line 418 of file ELFObjectFile.cpp.
References llvm::ELF::EM_ARM, llvm::ELF::EM_HEXAGON, llvm::ELF::EM_LOONGARCH, llvm::ELF::EM_MIPS, llvm::ELF::EM_RISCV, and getEMachine().
|
pure virtual |
Returns platform-specific object flags, if any.
Implemented in llvm::object::ELFObjectFile< ELFT >.
Referenced by llvm::RuntimeDyldELF::processRelocationRef().
std::vector< ELFPltEntry > ELFObjectFileBase::getPltEntries | ( | ) | const |
Definition at line 778 of file ELFObjectFile.cpp.
References llvm::Triple::aarch64, llvm::Triple::aarch64_be, llvm::append_range(), llvm::consumeError(), llvm::ELF::EM_386, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), llvm::Triple::getArch(), getEMachine(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::insert(), llvm::TargetRegistry::lookupTarget(), llvm::object::ObjectFile::makeTriple(), Name, llvm::object::ObjectFile::sections(), llvm::Triple::str(), Sym, llvm::object::SymbolicFile::symbol_end(), llvm::Expected< T >::takeError(), llvm::Triple::x86, and llvm::Triple::x86_64.
|
protectedpure virtual |
Implemented in llvm::object::ELFObjectFile< ELFT >.
Referenced by llvm::object::ELFRelocationRef::getAddend().
|
protectedpure virtual |
Implemented in llvm::object::ELFObjectFile< ELFT >.
Referenced by llvm::object::ELFSectionRef::getFlags().
|
protectedpure virtual |
Implemented in llvm::object::ELFObjectFile< ELFT >.
Referenced by llvm::object::ELFSectionRef::getOffset().
|
protectedpure virtual |
Implemented in llvm::object::ELFObjectFile< ELFT >.
Referenced by llvm::object::ELFSectionRef::getType().
|
protectedpure virtual |
Implemented in llvm::object::ELFObjectFile< ELFT >.
Referenced by llvm::object::ELFSymbolRef::getBinding().
|
protectedpure virtual |
Implemented in llvm::object::ELFObjectFile< ELFT >.
Referenced by llvm::object::ELFSymbolRef::getELFType().
|
protectedpure virtual |
Implemented in llvm::object::ELFObjectFile< ELFT >.
Referenced by llvm::object::ELFSymbolRef::getOther().
|
protectedpure virtual |
Referenced by llvm::object::ELFSymbolRef::getSize().
Expected< std::vector< BBAddrMap > > ELFObjectFileBase::readBBAddrMap | ( | std::optional< unsigned > | TextSectionIndex = std::nullopt , |
std::vector< PGOAnalysisMap > * | PGOAnalyses = nullptr |
||
) | const |
Returns a vector of all BB address maps in the object file.
When TextSectionIndex
is specified, only returns the BB address maps corresponding to the section with that index. When PGOAnalyses
is specified (PGOAnalyses is not nullptr), the vector is cleared then filled with extra PGO data. PGOAnalyses
will always be the same length as the return value when it is requested assuming no error occurs. Upon failure, PGOAnalyses
will be emptied.
Definition at line 1006 of file ELFObjectFile.cpp.
References readBBAddrMapImpl().
Expected< std::vector< VersionEntry > > ELFObjectFileBase::readDynsymVersions | ( | ) | const |
Returns a vector containing a symbol version for each dynamic symbol.
Returns an empty vector if version sections do not exist.
Definition at line 994 of file ELFObjectFile.cpp.
References getDynamicSymbolIterators(), and readDynsymVersionsImpl().
|
overridevirtual |
Reimplemented from llvm::object::ObjectFile.
Definition at line 684 of file ELFObjectFile.cpp.
References Attributes, llvm::consumeError(), llvm::ARMBuildAttrs::CPU_arch, llvm::ARMBuildAttrs::CPU_arch_profile, getBuildAttributes(), llvm::Triple::getSubArch(), llvm::object::Binary::isLittleEndian(), llvm::Triple::isThumb(), llvm::ARMBuildAttrs::MicroControllerProfile, llvm::Triple::NoSubArch, llvm::Triple::setArchName(), llvm::ARMBuildAttrs::v4, llvm::ARMBuildAttrs::v4T, llvm::ARMBuildAttrs::v5T, llvm::ARMBuildAttrs::v5TE, llvm::ARMBuildAttrs::v5TEJ, llvm::ARMBuildAttrs::v6, llvm::ARMBuildAttrs::v6_M, llvm::ARMBuildAttrs::v6K, llvm::ARMBuildAttrs::v6KZ, llvm::ARMBuildAttrs::v6S_M, llvm::ARMBuildAttrs::v6T2, llvm::ARMBuildAttrs::v7, llvm::ARMBuildAttrs::v7E_M, llvm::ARMBuildAttrs::v8_1_M_Main, llvm::ARMBuildAttrs::v8_A, llvm::ARMBuildAttrs::v8_M_Base, llvm::ARMBuildAttrs::v8_M_Main, llvm::ARMBuildAttrs::v8_R, and llvm::ARMBuildAttrs::v9_A.
|
inline |
Definition at line 261 of file ELFObjectFile.h.
References llvm::object::SymbolicFile::symbol_begin(), and llvm::object::SymbolicFile::symbol_end().
Referenced by llvm::orc::getELFObjectFileSymbolInfo().
|
overridevirtual |
Reimplemented from llvm::object::ObjectFile.
Definition at line 435 of file ELFObjectFile.cpp.
References llvm::ELF::EM_AMDGPU, llvm::ELF::EM_BPF, llvm::ELF::EM_CUDA, llvm::ELF::EM_PPC, llvm::ELF::EM_PPC64, and getEMachine().
|
friend |
Definition at line 58 of file ELFObjectFile.h.
|
friend |
Definition at line 59 of file ELFObjectFile.h.
|
friend |
Definition at line 60 of file ELFObjectFile.h.
Referenced by llvm::object::ELFObjectFile< ELFT >::toSymbolRef().