LLVM 20.0.0git
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
llvm::object::ELFObjectFile< ELFT > Class Template Reference

#include "llvm/Object/ELFObjectFile.h"

Inheritance diagram for llvm::object::ELFObjectFile< ELFT >:
Inheritance graph
[legend]

Public Member Functions

SectionRef toSectionRef (const Elf_Shdr *Sec) const
 
ELFSymbolRef toSymbolRef (const Elf_Shdr *SymTable, unsigned SymbolNum) const
 
bool IsContentValid () const
 
 ELFObjectFile (ELFObjectFile< ELFT > &&Other)
 
const Elf_Rel * getRel (DataRefImpl Rel) const
 
const Elf_Rela * getRela (DataRefImpl Rela) const
 
Elf_Crel getCrel (DataRefImpl Crel) const
 
Expected< const Elf_Sym * > getSymbol (DataRefImpl Sym) const
 
const Elf_Shdr * getRelSection (DataRefImpl Rel) const
 Get the relocation section that contains Rel.
 
const Elf_Shdr * getSection (DataRefImpl Sec) const
 
basic_symbol_iterator symbol_begin () const override
 
basic_symbol_iterator symbol_end () const override
 
bool is64Bit () const override
 
elf_symbol_iterator dynamic_symbol_begin () const
 
elf_symbol_iterator dynamic_symbol_end () const
 
section_iterator section_begin () const override
 
section_iterator section_end () const override
 
Expected< int64_t > getRelocationAddend (DataRefImpl Rel) const override
 
uint8_t getBytesInAddress () const override
 The number of bytes used to represent an address in this object file format.
 
StringRef getFileFormatName () const override
 
Triple::ArchType getArch () const override
 
Triple::OSType getOS () const override
 
Expected< uint64_tgetStartAddress () const override
 
unsigned getPlatformFlags () const override
 Returns platform-specific object flags, if any.
 
const ELFFile< ELFT > & getELFFile () const
 
bool isDyldType () const
 
elf_symbol_iterator_range getDynamicSymbolIterators () const override
 
bool isRelocatableObject () const override
 True if this is a relocatable object (.o/.obj).
 
void createFakeSections ()
 
StringRef getCrelDecodeProblem (DataRefImpl Sec) const
 
- Public Member Functions inherited from llvm::object::ELFObjectFileBase
virtual elf_symbol_iterator_range getDynamicSymbolIterators () const =0
 
virtual unsigned getPlatformFlags () const =0
 Returns platform-specific object flags, if any.
 
elf_symbol_iterator_range symbols () const
 
Expected< SubtargetFeaturesgetFeatures () const override
 
std::optional< StringReftryGetCPUName () const override
 
void setARMSubArch (Triple &TheTriple) const override
 
virtual uint16_t getEType () const =0
 
virtual uint16_t getEMachine () const =0
 
virtual uint8_t getEIdentABIVersion () const =0
 
std::vector< ELFPltEntrygetPltEntries () const
 
Expected< std::vector< VersionEntry > > readDynsymVersions () const
 Returns a vector containing a symbol version for each dynamic symbol.
 
Expected< std::vector< BBAddrMap > > 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.
 
StringRef getCrelDecodeProblem (SectionRef Sec) const
 
- Public Member Functions inherited from llvm::object::ObjectFile
 ObjectFile ()=delete
 
 ObjectFile (const ObjectFile &other)=delete
 
ObjectFileoperator= (const ObjectFile &other)=delete
 
uint64_t getCommonSymbolSize (DataRefImpl Symb) const
 
virtual std::vector< SectionRefdynamic_relocation_sections () const
 
symbol_iterator_range symbols () const
 
virtual section_iterator section_begin () const =0
 
virtual section_iterator section_end () const =0
 
section_iterator_range sections () const
 
virtual bool hasDebugInfo () const
 
virtual uint8_t getBytesInAddress () const =0
 The number of bytes used to represent an address in this object file format.
 
virtual StringRef getFileFormatName () const =0
 
virtual Triple::ArchType getArch () const =0
 
virtual Triple::OSType getOS () const
 
virtual Expected< SubtargetFeaturesgetFeatures () const =0
 
virtual std::optional< StringReftryGetCPUName () const
 
virtual void setARMSubArch (Triple &TheTriple) const
 
virtual Expected< uint64_tgetStartAddress () const
 
Triple makeTriple () const
 Create a triple from the data in this object file.
 
virtual StringRef mapDebugSectionName (StringRef Name) const
 Maps a debug section name to a standard DWARF section name.
 
virtual bool isRelocatableObject () const =0
 True if this is a relocatable object (.o/.obj).
 
bool isReflectionSectionStrippable (llvm::binaryformat::Swift5ReflectionSectionKind ReflectionSectionKind) const
 True if the reflection section can be stripped by the linker.
 
- Public Member Functions inherited from llvm::object::SymbolicFile
 SymbolicFile (unsigned int Type, MemoryBufferRef Source)
 
 ~SymbolicFile () override
 
virtual void moveSymbolNext (DataRefImpl &Symb) const =0
 
virtual Error printSymbolName (raw_ostream &OS, DataRefImpl Symb) const =0
 
virtual Expected< uint32_tgetSymbolFlags (DataRefImpl Symb) const =0
 
virtual basic_symbol_iterator symbol_begin () const =0
 
virtual basic_symbol_iterator symbol_end () const =0
 
virtual bool is64Bit () const =0
 
basic_symbol_iterator_range symbols () const
 
- Public Member Functions inherited from llvm::object::Binary
 Binary ()=delete
 
 Binary (const Binary &other)=delete
 
virtual ~Binary ()
 
virtual Error initContent ()
 
StringRef getData () const
 
StringRef getFileName () const
 
MemoryBufferRef getMemoryBufferRef () const
 
unsigned int getType () const
 
bool isObject () const
 
bool isSymbolic () const
 
bool isArchive () const
 
bool isMachOUniversalBinary () const
 
bool isTapiUniversal () const
 
bool isELF () const
 
bool isMachO () const
 
bool isCOFF () const
 
bool isXCOFF () const
 
bool isWasm () const
 
bool isOffloadFile () const
 
bool isCOFFImportFile () const
 
bool isIR () const
 
bool isGOFF () const
 
bool isMinidump () const
 
bool isTapiFile () const
 
bool isLittleEndian () const
 
bool isWinRes () const
 
Triple::ObjectFormatType getTripleObjectFormat () const
 

Static Public Member Functions

static Expected< ELFObjectFile< ELFT > > create (MemoryBufferRef Object, bool InitContent=true)
 
static bool classof (const Binary *v)
 
- Static Public Member Functions inherited from llvm::object::ELFObjectFileBase
static bool classof (const Binary *v)
 
- Static Public Member Functions inherited from llvm::object::ObjectFile
static Expected< OwningBinary< ObjectFile > > createObjectFile (StringRef ObjectPath)
 
static Expected< std::unique_ptr< ObjectFile > > createObjectFile (MemoryBufferRef Object, llvm::file_magic Type, bool InitContent=true)
 
static Expected< std::unique_ptr< ObjectFile > > createObjectFile (MemoryBufferRef Object)
 
static bool classof (const Binary *v)
 
static Expected< std::unique_ptr< COFFObjectFile > > createCOFFObjectFile (MemoryBufferRef Object)
 
static Expected< std::unique_ptr< ObjectFile > > createXCOFFObjectFile (MemoryBufferRef Object, unsigned FileType)
 
static Expected< std::unique_ptr< ObjectFile > > createELFObjectFile (MemoryBufferRef Object, bool InitContent=true)
 
static Expected< std::unique_ptr< MachOObjectFile > > createMachOObjectFile (MemoryBufferRef Object, uint32_t UniversalCputype=0, uint32_t UniversalIndex=0, size_t MachOFilesetEntryOffset=0)
 Create a MachOObjectFile instance from a given buffer.
 
static Expected< std::unique_ptr< ObjectFile > > createGOFFObjectFile (MemoryBufferRef Object)
 
static Expected< std::unique_ptr< WasmObjectFile > > createWasmObjectFile (MemoryBufferRef Object)
 
- Static Public Member Functions inherited from llvm::object::SymbolicFile
static Expected< std::unique_ptr< SymbolicFile > > createSymbolicFile (MemoryBufferRef Object, llvm::file_magic Type, LLVMContext *Context, bool InitContent=true)
 
static Expected< std::unique_ptr< SymbolicFile > > createSymbolicFile (MemoryBufferRef Object)
 
static bool classof (const Binary *v)
 
static bool isSymbolicFile (file_magic Type, const LLVMContext *Context)
 
- Static Public Member Functions inherited from llvm::object::Binary
static Error checkOffset (MemoryBufferRef M, uintptr_t Addr, const uint64_t Size)
 

Protected Member Functions

Error initContent () override
 
void moveSymbolNext (DataRefImpl &Symb) const override
 
Expected< StringRefgetSymbolName (DataRefImpl Symb) const override
 
Expected< uint64_tgetSymbolAddress (DataRefImpl Symb) const override
 
uint64_t getSymbolValueImpl (DataRefImpl Symb) const override
 
uint32_t getSymbolAlignment (DataRefImpl Symb) const override
 
uint64_t getCommonSymbolSizeImpl (DataRefImpl Symb) const override
 
Expected< uint32_tgetSymbolFlags (DataRefImpl Symb) const override
 
uint8_t getSymbolBinding (DataRefImpl Symb) const override
 
uint8_t getSymbolOther (DataRefImpl Symb) const override
 
uint8_t getSymbolELFType (DataRefImpl Symb) const override
 
Expected< SymbolRef::TypegetSymbolType (DataRefImpl Symb) const override
 
Expected< section_iteratorgetSymbolSection (const Elf_Sym *Symb, const Elf_Shdr *SymTab) const
 
Expected< section_iteratorgetSymbolSection (DataRefImpl Symb) const override
 
void moveSectionNext (DataRefImpl &Sec) const override
 
Expected< StringRefgetSectionName (DataRefImpl Sec) const override
 
uint64_t getSectionAddress (DataRefImpl Sec) const override
 
uint64_t getSectionIndex (DataRefImpl Sec) const override
 
uint64_t getSectionSize (DataRefImpl Sec) const override
 
Expected< ArrayRef< uint8_t > > getSectionContents (DataRefImpl Sec) const override
 
uint64_t getSectionAlignment (DataRefImpl Sec) const override
 
bool isSectionCompressed (DataRefImpl Sec) const override
 
bool isSectionText (DataRefImpl Sec) const override
 
bool isSectionData (DataRefImpl Sec) const override
 
bool isSectionBSS (DataRefImpl Sec) const override
 
bool isSectionVirtual (DataRefImpl Sec) const override
 
bool isBerkeleyText (DataRefImpl Sec) const override
 
bool isBerkeleyData (DataRefImpl Sec) const override
 
bool isDebugSection (DataRefImpl Sec) const override
 
relocation_iterator section_rel_begin (DataRefImpl Sec) const override
 
relocation_iterator section_rel_end (DataRefImpl Sec) const override
 
std::vector< SectionRefdynamic_relocation_sections () const override
 
Expected< section_iteratorgetRelocatedSection (DataRefImpl Sec) const override
 
void moveRelocationNext (DataRefImpl &Rel) const override
 
uint64_t getRelocationOffset (DataRefImpl Rel) const override
 
symbol_iterator getRelocationSymbol (DataRefImpl Rel) const override
 
uint64_t getRelocationType (DataRefImpl Rel) const override
 
void getRelocationTypeName (DataRefImpl Rel, SmallVectorImpl< char > &Result) const override
 
uint32_t getSectionType (DataRefImpl Sec) const override
 
uint64_t getSectionFlags (DataRefImpl Sec) const override
 
uint64_t getSectionOffset (DataRefImpl Sec) const override
 
StringRef getRelocationTypeName (uint32_t Type) const
 
DataRefImpl toDRI (const Elf_Shdr *SymTable, unsigned SymbolNum) const
 
const Elf_Shdr * toELFShdrIter (DataRefImpl Sec) const
 
DataRefImpl toDRI (const Elf_Shdr *Sec) const
 
DataRefImpl toDRI (const Elf_Dyn *Dyn) const
 
bool isExportedToOtherDSO (const Elf_Sym *ESym) const
 
Error getBuildAttributes (ELFAttributeParser &Attributes) const override
 
- Protected Member Functions inherited from llvm::object::ELFObjectFileBase
 ELFObjectFileBase (unsigned int Type, MemoryBufferRef Source)
 
virtual uint64_t getSymbolSize (DataRefImpl Symb) const =0
 
virtual uint8_t getSymbolBinding (DataRefImpl Symb) const =0
 
virtual uint8_t getSymbolOther (DataRefImpl Symb) const =0
 
virtual uint8_t getSymbolELFType (DataRefImpl Symb) const =0
 
virtual uint32_t getSectionType (DataRefImpl Sec) const =0
 
virtual uint64_t getSectionFlags (DataRefImpl Sec) const =0
 
virtual uint64_t getSectionOffset (DataRefImpl Sec) const =0
 
virtual Expected< int64_t > getRelocationAddend (DataRefImpl Rel) const =0
 
virtual Error getBuildAttributes (ELFAttributeParser &Attributes) const =0
 
- Protected Member Functions inherited from llvm::object::ObjectFile
 ObjectFile (unsigned int Type, MemoryBufferRef Source)
 
const uint8_tbase () const
 
virtual Expected< StringRefgetSymbolName (DataRefImpl Symb) const =0
 
Error printSymbolName (raw_ostream &OS, DataRefImpl Symb) const override
 
virtual Expected< uint64_tgetSymbolAddress (DataRefImpl Symb) const =0
 
virtual uint64_t getSymbolValueImpl (DataRefImpl Symb) const =0
 
virtual uint32_t getSymbolAlignment (DataRefImpl Symb) const
 
virtual uint64_t getCommonSymbolSizeImpl (DataRefImpl Symb) const =0
 
virtual Expected< SymbolRef::TypegetSymbolType (DataRefImpl Symb) const =0
 
virtual Expected< section_iteratorgetSymbolSection (DataRefImpl Symb) const =0
 
virtual void moveSectionNext (DataRefImpl &Sec) const =0
 
virtual Expected< StringRefgetSectionName (DataRefImpl Sec) const =0
 
virtual uint64_t getSectionAddress (DataRefImpl Sec) const =0
 
virtual uint64_t getSectionIndex (DataRefImpl Sec) const =0
 
virtual uint64_t getSectionSize (DataRefImpl Sec) const =0
 
virtual Expected< ArrayRef< uint8_t > > getSectionContents (DataRefImpl Sec) const =0
 
virtual uint64_t getSectionAlignment (DataRefImpl Sec) const =0
 
virtual bool isSectionCompressed (DataRefImpl Sec) const =0
 
virtual bool isSectionText (DataRefImpl Sec) const =0
 
virtual bool isSectionData (DataRefImpl Sec) const =0
 
virtual bool isSectionBSS (DataRefImpl Sec) const =0
 
virtual bool isSectionVirtual (DataRefImpl Sec) const =0
 
virtual bool isSectionBitcode (DataRefImpl Sec) const
 
virtual bool isSectionStripped (DataRefImpl Sec) const
 
virtual bool isBerkeleyText (DataRefImpl Sec) const
 
virtual bool isBerkeleyData (DataRefImpl Sec) const
 
virtual bool isDebugSection (DataRefImpl Sec) const
 
virtual relocation_iterator section_rel_begin (DataRefImpl Sec) const =0
 
virtual relocation_iterator section_rel_end (DataRefImpl Sec) const =0
 
virtual Expected< section_iteratorgetRelocatedSection (DataRefImpl Sec) const
 
virtual void moveRelocationNext (DataRefImpl &Rel) const =0
 
virtual uint64_t getRelocationOffset (DataRefImpl Rel) const =0
 
virtual symbol_iterator getRelocationSymbol (DataRefImpl Rel) const =0
 
virtual uint64_t getRelocationType (DataRefImpl Rel) const =0
 
virtual void getRelocationTypeName (DataRefImpl Rel, SmallVectorImpl< char > &Result) const =0
 
virtual llvm::binaryformat::Swift5ReflectionSectionKind mapReflectionSectionNameToEnumValue (StringRef SectionName) const
 
Expected< uint64_tgetSymbolValue (DataRefImpl Symb) const
 
- Protected Member Functions inherited from llvm::object::Binary
 Binary (unsigned int Type, MemoryBufferRef Source)
 

Protected Attributes

ELFFile< ELFT > EF
 
const Elf_Shdr * DotDynSymSec = nullptr
 
const Elf_Shdr * DotSymtabSec = nullptr
 
const Elf_Shdr * DotSymtabShndxSec = nullptr
 
SmallVector< SmallVector< Elf_Crel, 0 >, 0 > Crels
 
SmallVector< std::string, 0 > CrelDecodeProblems
 
bool isDyldELFObject = false
 
- Protected Attributes inherited from llvm::object::Binary
MemoryBufferRef Data
 

Additional Inherited Members

- Public Types inherited from llvm::object::ELFObjectFileBase
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 >
 
- 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)
 

Detailed Description

template<class ELFT>
class llvm::object::ELFObjectFile< ELFT >

Definition at line 265 of file ELFObjectFile.h.

Constructor & Destructor Documentation

◆ ELFObjectFile()

template<class ELFT >
llvm::object::ELFObjectFile< ELFT >::ELFObjectFile ( ELFObjectFile< ELFT > &&  Other)

Definition at line 1219 of file ELFObjectFile.h.

Member Function Documentation

◆ classof()

template<class ELFT >
static bool llvm::object::ELFObjectFile< ELFT >::classof ( const Binary v)
inlinestatic

Definition at line 499 of file ELFObjectFile.h.

References llvm::object::Binary::getELFType(), and llvm::little.

◆ create()

template<class ELFT >
Expected< ELFObjectFile< ELFT > > llvm::object::ELFObjectFile< ELFT >::create ( MemoryBufferRef  Object,
bool  InitContent = true 
)
static

◆ createFakeSections()

template<class ELFT >
void llvm::object::ELFObjectFile< ELFT >::createFakeSections ( )
inline

Definition at line 509 of file ELFObjectFile.h.

References llvm::object::ELFObjectFile< ELFT >::EF.

◆ dynamic_relocation_sections()

template<class ELFT >
std::vector< SectionRef > llvm::object::ELFObjectFile< ELFT >::dynamic_relocation_sections
overrideprotectedvirtual

Reimplemented from llvm::object::ObjectFile.

Definition at line 965 of file ELFObjectFile.h.

References llvm::Dynamic, llvm::is_contained(), and llvm::ELF::SHT_DYNAMIC.

◆ dynamic_symbol_begin()

template<class ELFT >
elf_symbol_iterator llvm::object::ELFObjectFile< ELFT >::dynamic_symbol_begin

Definition at line 1241 of file ELFObjectFile.h.

◆ dynamic_symbol_end()

template<class ELFT >
elf_symbol_iterator llvm::object::ELFObjectFile< ELFT >::dynamic_symbol_end

Definition at line 1251 of file ELFObjectFile.h.

References Sym.

◆ getArch()

template<class ELFT >
Triple::ArchType llvm::object::ELFObjectFile< ELFT >::getArch
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 1359 of file ELFObjectFile.h.

References llvm::Triple::aarch64, llvm::Triple::aarch64_be, llvm::Triple::amdgcn, llvm::Triple::arm, llvm::Triple::avr, llvm::Triple::bpfeb, llvm::Triple::bpfel, llvm::Triple::csky, llvm::ELF::EF_AMDGPU_MACH, llvm::ELF::EF_AMDGPU_MACH_AMDGCN_FIRST, llvm::ELF::EF_AMDGPU_MACH_AMDGCN_LAST, llvm::ELF::EF_AMDGPU_MACH_R600_FIRST, llvm::ELF::EF_AMDGPU_MACH_R600_LAST, llvm::ELF::EI_CLASS, llvm::ELF::ELFCLASS32, llvm::ELF::ELFCLASS64, llvm::ELF::EM_386, llvm::ELF::EM_68K, llvm::ELF::EM_AARCH64, llvm::ELF::EM_AMDGPU, llvm::ELF::EM_ARM, llvm::ELF::EM_AVR, llvm::ELF::EM_BPF, llvm::ELF::EM_CSKY, llvm::ELF::EM_CUDA, llvm::ELF::EM_HEXAGON, llvm::ELF::EM_IAMCU, llvm::ELF::EM_LANAI, llvm::ELF::EM_LOONGARCH, llvm::ELF::EM_MIPS, llvm::ELF::EM_MSP430, llvm::ELF::EM_PPC, llvm::ELF::EM_PPC64, llvm::ELF::EM_RISCV, llvm::ELF::EM_S390, llvm::ELF::EM_SPARC, llvm::ELF::EM_SPARC32PLUS, llvm::ELF::EM_SPARCV9, llvm::ELF::EM_VE, llvm::ELF::EM_X86_64, llvm::ELF::EM_XTENSA, llvm::Triple::hexagon, llvm::Triple::lanai, llvm::little, llvm::Triple::loongarch32, llvm::Triple::loongarch64, llvm::Triple::m68k, llvm::Triple::mips, llvm::Triple::mips64, llvm::Triple::mips64el, llvm::Triple::mipsel, llvm::Triple::msp430, llvm::Triple::nvptx, llvm::Triple::nvptx64, llvm::Triple::ppc, llvm::Triple::ppc64, llvm::Triple::ppc64le, llvm::Triple::ppcle, llvm::Triple::r600, llvm::report_fatal_error(), llvm::Triple::riscv32, llvm::Triple::riscv64, llvm::Triple::sparc, llvm::Triple::sparcel, llvm::Triple::sparcv9, llvm::Triple::systemz, llvm::Triple::UnknownArch, llvm::Triple::ve, llvm::Triple::x86, llvm::Triple::x86_64, and llvm::Triple::xtensa.

◆ getBuildAttributes()

template<class ELFT >
Error llvm::object::ELFObjectFile< ELFT >::getBuildAttributes ( ELFAttributeParser Attributes) const
inlineoverrideprotectedvirtual

◆ getBytesInAddress()

template<class ELFT >
uint8_t llvm::object::ELFObjectFile< ELFT >::getBytesInAddress ( ) const
overridevirtual

The number of bytes used to represent an address in this object file format.

Implements llvm::object::ObjectFile.

Definition at line 1276 of file ELFObjectFile.h.

Referenced by llvm::object::ELFObjectFile< ELFT >::is64Bit().

◆ getCommonSymbolSizeImpl()

template<class ELFT >
uint64_t llvm::object::ELFObjectFile< ELFT >::getCommonSymbolSizeImpl ( DataRefImpl  Symb) const
overrideprotectedvirtual

Implements llvm::object::ObjectFile.

Definition at line 696 of file ELFObjectFile.h.

◆ getCrel()

template<class ELFT >
ELFObjectFile< ELFT >::Elf_Crel llvm::object::ELFObjectFile< ELFT >::getCrel ( DataRefImpl  Crel) const

◆ getCrelDecodeProblem()

template<class ELFT >
StringRef llvm::object::ELFObjectFile< ELFT >::getCrelDecodeProblem ( DataRefImpl  Sec) const

Definition at line 1504 of file ELFObjectFile.h.

References llvm::cantFail(), I, and llvm::object::DataRefImpl::p.

◆ getDynamicSymbolIterators()

template<class ELFT >
ELFObjectFileBase::elf_symbol_iterator_range llvm::object::ELFObjectFile< ELFT >::getDynamicSymbolIterators
overridevirtual

Implements llvm::object::ELFObjectFileBase.

Definition at line 1495 of file ELFObjectFile.h.

References llvm::make_range().

◆ getELFFile()

template<class ELFT >
const ELFFile< ELFT > & llvm::object::ELFObjectFile< ELFT >::getELFFile ( ) const
inline

Definition at line 496 of file ELFObjectFile.h.

References llvm::object::ELFObjectFile< ELFT >::EF.

Referenced by llvm::ifs::buildStub().

◆ getFileFormatName()

template<class ELFT >
StringRef llvm::object::ELFObjectFile< ELFT >::getFileFormatName
overridevirtual

◆ getOS()

template<class ELFT >
Triple::OSType llvm::object::ELFObjectFile< ELFT >::getOS
overridevirtual

◆ getPlatformFlags()

template<class ELFT >
unsigned llvm::object::ELFObjectFile< ELFT >::getPlatformFlags ( ) const
inlineoverridevirtual

Returns platform-specific object flags, if any.

Implements llvm::object::ELFObjectFileBase.

Definition at line 494 of file ELFObjectFile.h.

References llvm::object::ELFObjectFile< ELFT >::EF.

◆ getRel()

template<class ELFT >
const ELFObjectFile< ELFT >::Elf_Rel * llvm::object::ELFObjectFile< ELFT >::getRel ( DataRefImpl  Rel) const

◆ getRela()

template<class ELFT >
const ELFObjectFile< ELFT >::Elf_Rela * llvm::object::ELFObjectFile< ELFT >::getRela ( DataRefImpl  Rela) const

◆ getRelocatedSection()

template<class ELFT >
Expected< section_iterator > llvm::object::ELFObjectFile< ELFT >::getRelocatedSection ( DataRefImpl  Sec) const
overrideprotectedvirtual

◆ getRelocationAddend()

template<class ELFT >
Expected< int64_t > llvm::object::ELFObjectFile< ELFT >::getRelocationAddend ( DataRefImpl  Rel) const
overridevirtual

◆ getRelocationOffset()

template<class ELFT >
uint64_t llvm::object::ELFObjectFile< ELFT >::getRelocationOffset ( DataRefImpl  Rel) const
overrideprotectedvirtual

Implements llvm::object::ObjectFile.

Definition at line 1121 of file ELFObjectFile.h.

References llvm::ELF::SHT_CREL, and llvm::ELF::SHT_REL.

◆ getRelocationSymbol()

template<class ELFT >
symbol_iterator llvm::object::ELFObjectFile< ELFT >::getRelocationSymbol ( DataRefImpl  Rel) const
overrideprotectedvirtual

◆ getRelocationType()

template<class ELFT >
uint64_t llvm::object::ELFObjectFile< ELFT >::getRelocationType ( DataRefImpl  Rel) const
overrideprotectedvirtual

Implements llvm::object::ObjectFile.

Definition at line 1132 of file ELFObjectFile.h.

References llvm::ELF::SHT_CREL, and llvm::ELF::SHT_REL.

◆ getRelocationTypeName() [1/2]

template<class ELFT >
void llvm::object::ELFObjectFile< ELFT >::getRelocationTypeName ( DataRefImpl  Rel,
SmallVectorImpl< char > &  Result 
) const
overrideprotectedvirtual

Implements llvm::object::ObjectFile.

Definition at line 1148 of file ELFObjectFile.h.

◆ getRelocationTypeName() [2/2]

template<class ELFT >
StringRef llvm::object::ELFObjectFile< ELFT >::getRelocationTypeName ( uint32_t  Type) const
protected

Definition at line 1143 of file ELFObjectFile.h.

References llvm::object::getELFRelocationTypeName().

◆ getRelSection()

template<class ELFT >
const Elf_Shdr * llvm::object::ELFObjectFile< ELFT >::getRelSection ( DataRefImpl  Rel) const
inline

◆ getSection()

template<class ELFT >
const Elf_Shdr * llvm::object::ELFObjectFile< ELFT >::getSection ( DataRefImpl  Sec) const
inline

Definition at line 471 of file ELFObjectFile.h.

References llvm::object::DataRefImpl::p.

◆ getSectionAddress()

template<class ELFT >
uint64_t llvm::object::ELFObjectFile< ELFT >::getSectionAddress ( DataRefImpl  Sec) const
overrideprotectedvirtual

Implements llvm::object::ObjectFile.

Definition at line 901 of file ELFObjectFile.h.

References llvm::object::getSection().

◆ getSectionAlignment()

template<class ELFT >
uint64_t llvm::object::ELFObjectFile< ELFT >::getSectionAlignment ( DataRefImpl  Sec) const
overrideprotectedvirtual

Implements llvm::object::ObjectFile.

Definition at line 935 of file ELFObjectFile.h.

References llvm::object::getSection().

◆ getSectionContents()

template<class ELFT >
Expected< ArrayRef< uint8_t > > llvm::object::ELFObjectFile< ELFT >::getSectionContents ( DataRefImpl  Sec) const
overrideprotectedvirtual

Implements llvm::object::ObjectFile.

Definition at line 923 of file ELFObjectFile.h.

References E, llvm::object::getSection(), and llvm::ELF::SHT_NOBITS.

◆ getSectionFlags()

template<class ELFT >
uint64_t llvm::object::ELFObjectFile< ELFT >::getSectionFlags ( DataRefImpl  Sec) const
overrideprotectedvirtual

Implements llvm::object::ELFObjectFileBase.

Definition at line 584 of file ELFObjectFile.h.

References llvm::object::getSection().

◆ getSectionIndex()

template<class ELFT >
uint64_t llvm::object::ELFObjectFile< ELFT >::getSectionIndex ( DataRefImpl  Sec) const
overrideprotectedvirtual

◆ getSectionName()

template<class ELFT >
Expected< StringRef > llvm::object::ELFObjectFile< ELFT >::getSectionName ( DataRefImpl  Sec) const
overrideprotectedvirtual

Implements llvm::object::ObjectFile.

Definition at line 896 of file ELFObjectFile.h.

References llvm::object::getSection().

◆ getSectionOffset()

template<class ELFT >
uint64_t llvm::object::ELFObjectFile< ELFT >::getSectionOffset ( DataRefImpl  Sec) const
overrideprotectedvirtual

Implements llvm::object::ELFObjectFileBase.

Definition at line 594 of file ELFObjectFile.h.

References llvm::object::getSection().

◆ getSectionSize()

template<class ELFT >
uint64_t llvm::object::ELFObjectFile< ELFT >::getSectionSize ( DataRefImpl  Sec) const
overrideprotectedvirtual

Implements llvm::object::ObjectFile.

Definition at line 917 of file ELFObjectFile.h.

References llvm::object::getSection().

◆ getSectionType()

template<class ELFT >
uint32_t llvm::object::ELFObjectFile< ELFT >::getSectionType ( DataRefImpl  Sec) const
overrideprotectedvirtual

Implements llvm::object::ELFObjectFileBase.

Definition at line 589 of file ELFObjectFile.h.

References llvm::object::getSection().

◆ getStartAddress()

template<class ELFT >
Expected< uint64_t > llvm::object::ELFObjectFile< ELFT >::getStartAddress
overridevirtual

Reimplemented from llvm::object::ObjectFile.

Definition at line 1489 of file ELFObjectFile.h.

◆ getSymbol()

template<class ELFT >
Expected< const Elf_Sym * > llvm::object::ELFObjectFile< ELFT >::getSymbol ( DataRefImpl  Sym) const
inline

Definition at line 458 of file ELFObjectFile.h.

References llvm::object::ELFObjectFile< ELFT >::EF, and Sym.

◆ getSymbolAddress()

template<class ELFT >
Expected< uint64_t > llvm::object::ELFObjectFile< ELFT >::getSymbolAddress ( DataRefImpl  Symb) const
overrideprotectedvirtual

◆ getSymbolAlignment()

template<class ELFT >
uint32_t llvm::object::ELFObjectFile< ELFT >::getSymbolAlignment ( DataRefImpl  Symb) const
overrideprotectedvirtual

◆ getSymbolBinding()

template<class ELFT >
uint8_t llvm::object::ELFObjectFile< ELFT >::getSymbolBinding ( DataRefImpl  Symb) const
overrideprotectedvirtual

◆ getSymbolELFType()

template<class ELFT >
uint8_t llvm::object::ELFObjectFile< ELFT >::getSymbolELFType ( DataRefImpl  Symb) const
overrideprotectedvirtual

◆ getSymbolFlags()

template<class ELFT >
Expected< uint32_t > llvm::object::ELFObjectFile< ELFT >::getSymbolFlags ( DataRefImpl  Symb) const
overrideprotectedvirtual

◆ getSymbolName()

template<class ELFT >
Expected< StringRef > llvm::object::ELFObjectFile< ELFT >::getSymbolName ( DataRefImpl  Symb) const
overrideprotectedvirtual

◆ getSymbolOther()

template<class ELFT >
uint8_t llvm::object::ELFObjectFile< ELFT >::getSymbolOther ( DataRefImpl  Symb) const
overrideprotectedvirtual

◆ getSymbolSection() [1/2]

template<class ELFT >
Expected< section_iterator > llvm::object::ELFObjectFile< ELFT >::getSymbolSection ( const Elf_Sym *  Symb,
const Elf_Shdr *  SymTab 
) const
protected

◆ getSymbolSection() [2/2]

template<class ELFT >
Expected< section_iterator > llvm::object::ELFObjectFile< ELFT >::getSymbolSection ( DataRefImpl  Symb) const
overrideprotectedvirtual

◆ getSymbolType()

template<class ELFT >
Expected< SymbolRef::Type > llvm::object::ELFObjectFile< ELFT >::getSymbolType ( DataRefImpl  Symb) const
overrideprotectedvirtual

◆ getSymbolValueImpl()

template<class ELFT >
uint64_t llvm::object::ELFObjectFile< ELFT >::getSymbolValueImpl ( DataRefImpl  Symb) const
overrideprotectedvirtual

◆ initContent()

template<class ELFT >
Error llvm::object::ELFObjectFile< ELFT >::initContent
overrideprotectedvirtual

◆ is64Bit()

template<class ELFT >
bool llvm::object::ELFObjectFile< ELFT >::is64Bit ( ) const
inlineoverridevirtual

◆ isBerkeleyData()

template<class ELFT >
bool llvm::object::ELFObjectFile< ELFT >::isBerkeleyData ( DataRefImpl  Sec) const
overrideprotectedvirtual

◆ isBerkeleyText()

template<class ELFT >
bool llvm::object::ELFObjectFile< ELFT >::isBerkeleyText ( DataRefImpl  Sec) const
overrideprotectedvirtual

◆ IsContentValid()

template<class ELFT >
bool llvm::object::ELFObjectFile< ELFT >::IsContentValid ( ) const
inline

Definition at line 282 of file ELFObjectFile.h.

◆ isDebugSection()

template<class ELFT >
bool llvm::object::ELFObjectFile< ELFT >::isDebugSection ( DataRefImpl  Sec) const
overrideprotectedvirtual

◆ isDyldType()

template<class ELFT >
bool llvm::object::ELFObjectFile< ELFT >::isDyldType ( ) const
inline

◆ isExportedToOtherDSO()

template<class ELFT >
bool llvm::object::ELFObjectFile< ELFT >::isExportedToOtherDSO ( const Elf_Sym *  ESym) const
inlineprotected

◆ isRelocatableObject()

template<class ELFT >
bool llvm::object::ELFObjectFile< ELFT >::isRelocatableObject ( ) const
overridevirtual

True if this is a relocatable object (.o/.obj).

Implements llvm::object::ObjectFile.

Definition at line 1499 of file ELFObjectFile.h.

References llvm::ELF::ET_REL.

◆ isSectionBSS()

template<class ELFT >
bool llvm::object::ELFObjectFile< ELFT >::isSectionBSS ( DataRefImpl  Sec) const
overrideprotectedvirtual

◆ isSectionCompressed()

template<class ELFT >
bool llvm::object::ELFObjectFile< ELFT >::isSectionCompressed ( DataRefImpl  Sec) const
overrideprotectedvirtual

Implements llvm::object::ObjectFile.

Definition at line 940 of file ELFObjectFile.h.

References llvm::object::getSection(), and llvm::ELF::SHF_COMPRESSED.

◆ isSectionData()

template<class ELFT >
bool llvm::object::ELFObjectFile< ELFT >::isSectionData ( DataRefImpl  Sec) const
overrideprotectedvirtual

◆ isSectionText()

template<class ELFT >
bool llvm::object::ELFObjectFile< ELFT >::isSectionText ( DataRefImpl  Sec) const
overrideprotectedvirtual

Implements llvm::object::ObjectFile.

Definition at line 945 of file ELFObjectFile.h.

References llvm::object::getSection(), and llvm::ELF::SHF_EXECINSTR.

◆ isSectionVirtual()

template<class ELFT >
bool llvm::object::ELFObjectFile< ELFT >::isSectionVirtual ( DataRefImpl  Sec) const
overrideprotectedvirtual

Implements llvm::object::ObjectFile.

Definition at line 993 of file ELFObjectFile.h.

References llvm::object::getSection(), and llvm::ELF::SHT_NOBITS.

◆ moveRelocationNext()

template<class ELFT >
void llvm::object::ELFObjectFile< ELFT >::moveRelocationNext ( DataRefImpl Rel) const
overrideprotectedvirtual

◆ moveSectionNext()

template<class ELFT >
void llvm::object::ELFObjectFile< ELFT >::moveSectionNext ( DataRefImpl Sec) const
overrideprotectedvirtual

Implements llvm::object::ObjectFile.

Definition at line 890 of file ELFObjectFile.h.

References llvm::object::getSection().

◆ moveSymbolNext()

template<class ELFT >
void llvm::object::ELFObjectFile< ELFT >::moveSymbolNext ( DataRefImpl Symb) const
overrideprotectedvirtual

Implements llvm::object::SymbolicFile.

Definition at line 520 of file ELFObjectFile.h.

References Sym.

◆ section_begin()

template<class ELFT >
section_iterator llvm::object::ELFObjectFile< ELFT >::section_begin
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 1260 of file ELFObjectFile.h.

◆ section_end()

template<class ELFT >
section_iterator llvm::object::ELFObjectFile< ELFT >::section_end
overridevirtual

Implements llvm::object::ObjectFile.

Definition at line 1268 of file ELFObjectFile.h.

◆ section_rel_begin()

template<class ELFT >
relocation_iterator llvm::object::ELFObjectFile< ELFT >::section_rel_begin ( DataRefImpl  Sec) const
overrideprotectedvirtual

◆ section_rel_end()

template<class ELFT >
relocation_iterator llvm::object::ELFObjectFile< ELFT >::section_rel_end ( DataRefImpl  Sec) const
overrideprotectedvirtual

◆ symbol_begin()

template<class ELFT >
basic_symbol_iterator llvm::object::ELFObjectFile< ELFT >::symbol_begin
overridevirtual

Implements llvm::object::SymbolicFile.

Definition at line 1224 of file ELFObjectFile.h.

References Sym.

◆ symbol_end()

template<class ELFT >
basic_symbol_iterator llvm::object::ELFObjectFile< ELFT >::symbol_end
overridevirtual

Implements llvm::object::SymbolicFile.

Definition at line 1232 of file ELFObjectFile.h.

References Sym.

◆ toDRI() [1/3]

template<class ELFT >
DataRefImpl llvm::object::ELFObjectFile< ELFT >::toDRI ( const Elf_Dyn *  Dyn) const
inlineprotected

Definition at line 388 of file ELFObjectFile.h.

References llvm::object::DataRefImpl::p.

◆ toDRI() [2/3]

template<class ELFT >
DataRefImpl llvm::object::ELFObjectFile< ELFT >::toDRI ( const Elf_Shdr *  Sec) const
inlineprotected

Definition at line 382 of file ELFObjectFile.h.

References llvm::object::DataRefImpl::p.

◆ toDRI() [3/3]

template<class ELFT >
DataRefImpl llvm::object::ELFObjectFile< ELFT >::toDRI ( const Elf_Shdr *  SymTable,
unsigned  SymbolNum 
) const
inlineprotected

◆ toELFShdrIter()

template<class ELFT >
const Elf_Shdr * llvm::object::ELFObjectFile< ELFT >::toELFShdrIter ( DataRefImpl  Sec) const
inlineprotected

Definition at line 378 of file ELFObjectFile.h.

References llvm::object::DataRefImpl::p.

◆ toSectionRef()

template<class ELFT >
SectionRef llvm::object::ELFObjectFile< ELFT >::toSectionRef ( const Elf_Shdr *  Sec) const
inline

Definition at line 274 of file ELFObjectFile.h.

References llvm::object::ELFObjectFile< ELFT >::toDRI().

◆ toSymbolRef()

template<class ELFT >
ELFSymbolRef llvm::object::ELFObjectFile< ELFT >::toSymbolRef ( const Elf_Shdr *  SymTable,
unsigned  SymbolNum 
) const
inline

Member Data Documentation

◆ CrelDecodeProblems

template<class ELFT >
SmallVector<std::string, 0> llvm::object::ELFObjectFile< ELFT >::CrelDecodeProblems
mutableprotected

Definition at line 300 of file ELFObjectFile.h.

◆ Crels

template<class ELFT >
SmallVector<SmallVector<Elf_Crel, 0>, 0> llvm::object::ELFObjectFile< ELFT >::Crels
mutableprotected

Definition at line 299 of file ELFObjectFile.h.

◆ DotDynSymSec

template<class ELFT >
const Elf_Shdr* llvm::object::ELFObjectFile< ELFT >::DotDynSymSec = nullptr
protected

Definition at line 294 of file ELFObjectFile.h.

◆ DotSymtabSec

template<class ELFT >
const Elf_Shdr* llvm::object::ELFObjectFile< ELFT >::DotSymtabSec = nullptr
protected

Definition at line 295 of file ELFObjectFile.h.

◆ DotSymtabShndxSec

template<class ELFT >
const Elf_Shdr* llvm::object::ELFObjectFile< ELFT >::DotSymtabShndxSec = nullptr
protected

Definition at line 296 of file ELFObjectFile.h.

◆ EF

template<class ELFT >
ELFFile<ELFT> llvm::object::ELFObjectFile< ELFT >::EF
protected

◆ isDyldELFObject

template<class ELFT >
bool llvm::object::ELFObjectFile< ELFT >::isDyldELFObject = false
protected

Definition at line 447 of file ELFObjectFile.h.

Referenced by llvm::object::ELFObjectFile< ELFT >::isDyldType().


The documentation for this class was generated from the following file: