LLVM: ELFObjectFile< ELFT > Class Template Reference (original) (raw)

#include "[llvm/Object/ELFObjectFile.h](ELFObjectFile%5F8h%5Fsource.html)"

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_t > getStartAddress () 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
elf_symbol_iterator_range symbols () const
Expected< SubtargetFeatures > getFeatures () const override
std::optional< StringRef > tryGetCPUName () const override
void setARMSubArch (Triple &TheTriple) const override
std::vector< ELFPltEntry > getPltEntries (const MCSubtargetInfo &STI) 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
ObjectFile & operator= (const ObjectFile &other)=delete
uint64_t getCommonSymbolSize (DataRefImpl Symb) const
symbol_iterator_range symbols () const
section_iterator_range sections () const
virtual bool hasDebugInfo () 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.
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
basic_symbol_iterator_range symbols () const
Public Member Functions inherited from llvm::object::Binary
Binary ()=delete
Binary (const Binary &other)=delete
virtual ~Binary ()
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
bool isDXContainer () 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 Expected< std::unique_ptr< DXContainerObjectFile > > createDXContainerObjectFile (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< StringRef > getSymbolName (DataRefImpl Symb) const override
Expected< uint64_t > getSymbolAddress (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_t > getSymbolFlags (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::Type > getSymbolType (DataRefImpl Symb) const override
Expected< section_iterator > getSymbolSection (const Elf_Sym *Symb, const Elf_Shdr *SymTab) const
Expected< section_iterator > getSymbolSection (DataRefImpl Symb) const override
void moveSectionNext (DataRefImpl &Sec) const override
Expected< StringRef > getSectionName (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< SectionRef > dynamic_relocation_sections () const override
Expected< section_iterator > getRelocatedSection (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
StringRef getRelocationTypeName (uint32_t Type) const
uint32_t getSectionType (DataRefImpl Sec) const override
uint64_t getSectionFlags (DataRefImpl Sec) const override
uint64_t getSectionOffset (DataRefImpl Sec) const override
DataRefImpl toDRI (const Elf_Shdr *SymTable, unsigned SymbolNum) const
DataRefImpl toDRI (const Elf_Shdr *Sec) const
DataRefImpl toDRI (const Elf_Dyn *Dyn) const
const Elf_Shdr * toELFShdrIter (DataRefImpl Sec) 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)
Protected Member Functions inherited from llvm::object::ObjectFile
ObjectFile (unsigned int Type, MemoryBufferRef Source)
const uint8_t * base () const
Error printSymbolName (raw_ostream &OS, DataRefImpl Symb) const override
virtual bool isSectionBitcode (DataRefImpl Sec) const
virtual bool isSectionStripped (DataRefImpl Sec) const
virtual llvm::binaryformat::Swift5ReflectionSectionKind mapReflectionSectionNameToEnumValue (StringRef SectionName) const
Expected< uint64_t > getSymbolValue (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_DXContainer, 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)

template
class ELFObjectFile< ELFT >

Definition at line 268 of file ELFObjectFile.h.

classof()

create()

createFakeSections()

dynamic_relocation_sections()

dynamic_symbol_begin()

dynamic_symbol_end()

getArch()

getBuildAttributes()

getBytesInAddress()

getCommonSymbolSizeImpl()

getCrel()

getCrelDecodeProblem()

getDynamicSymbolIterators()

getELFFile()

getFileFormatName()

getOS()

getPlatformFlags()

getRel()

getRela()

getRelocatedSection()

getRelocationAddend()

getRelocationOffset()

getRelocationSymbol()

getRelocationType()

getRelocationTypeName() [1/2]

getRelocationTypeName() [2/2]

getRelSection()

Get the relocation section that contains Rel.

Definition at line 469 of file ELFObjectFile.h.

getSection()

getSectionAddress()

getSectionAlignment()

getSectionContents()

getSectionFlags()

getSectionIndex()

getSectionName()

getSectionOffset()

getSectionSize()

getSectionType()

getStartAddress()

getSymbol()

getSymbolAddress()

getSymbolAlignment()

getSymbolBinding()

getSymbolELFType()

getSymbolFlags()

getSymbolName()

getSymbolOther()

getSymbolSection() [1/2]

getSymbolSection() [2/2]

getSymbolType()

getSymbolValueImpl()

initContent()

is64Bit()

isBerkeleyData()

isBerkeleyText()

IsContentValid()

isDebugSection()

isDyldType()

isExportedToOtherDSO()

isRelocatableObject()

isSectionBSS()

isSectionCompressed()

isSectionData()

isSectionText()

isSectionVirtual()

moveRelocationNext()

moveSectionNext()

moveSymbolNext()

section_begin()

section_end()

section_rel_begin()

section_rel_end()

symbol_begin()

symbol_end()

toDRI() [1/3]

toDRI() [2/3]

toDRI() [3/3]

toELFShdrIter()

toSectionRef()

toSymbolRef()

CrelDecodeProblems

Crels

DotDynSymSec

DotSymtabSec

DotSymtabShndxSec

EF

isDyldELFObject


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