LLVM  8.0.1
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
llvm::object::ELFObjectFileBase Class Referenceabstract

#include "llvm/Object/ELFObjectFile.h"

Inheritance diagram for llvm::object::ELFObjectFileBase:
Inheritance graph
[legend]
Collaboration diagram for llvm::object::ELFObjectFileBase:
Collaboration graph
[legend]

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 >
 

Public Member Functions

virtual elf_symbol_iterator_range getDynamicSymbolIterators () const =0
 
virtual unsigned getPlatformFlags () const =0
 Returns platform-specific object flags, if any. More...
 
elf_symbol_iterator_range symbols () const
 
SubtargetFeatures getFeatures () const override
 
SubtargetFeatures getMIPSFeatures () const
 
SubtargetFeatures getARMFeatures () const
 
SubtargetFeatures getRISCVFeatures () const
 
void setARMSubArch (Triple &TheTriple) const override
 
virtual uint16_t getEType () const =0
 
std::vector< std::pair< DataRefImpl, uint64_t > > getPltAddresses () const
 
- Public Member Functions inherited from llvm::object::ObjectFile
 ObjectFile ()=delete
 
 ObjectFile (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 uint8_t getBytesInAddress () const =0
 The number of bytes used to represent an address in this object file format. More...
 
virtual StringRef getFileFormatName () const =0
 
virtual Triple::ArchType getArch () const =0
 
virtual Expected< uint64_t > getStartAddress () const
 
Triple makeTriple () const
 Create a triple from the data in this object file. More...
 
virtual std::error_code getBuildAttributes (ARMAttributeParser &Attributes) const
 
virtual StringRef mapDebugSectionName (StringRef Name) const
 Maps a debug section name to a standard DWARF section name. More...
 
virtual bool isRelocatableObject () const =0
 True if this is a relocatable object (.o/.obj). More...
 
- Public Member Functions inherited from llvm::object::SymbolicFile
 SymbolicFile (unsigned int Type, MemoryBufferRef Source)
 
 ~SymbolicFile () override
 
virtual void moveSymbolNext (DataRefImpl &Symb) const =0
 
virtual uint32_t getSymbolFlags (DataRefImpl Symb) const =0
 
virtual basic_symbol_iterator symbol_begin () const =0
 
virtual basic_symbol_iterator symbol_end () 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 ()
 
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 isELF () const
 
bool isMachO () const
 
bool isCOFF () const
 
bool isWasm () const
 
bool isCOFFImportFile () const
 
bool isIR () const
 
bool isLittleEndian () const
 
bool isWinRes () const
 
Triple::ObjectFormatType getTripleObjectFormat () const
 

Static Public Member Functions

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)
 
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 > > createELFObjectFile (MemoryBufferRef Object)
 
static Expected< std::unique_ptr< MachOObjectFile > > createMachOObjectFile (MemoryBufferRef Object, uint32_t UniversalCputype=0, uint32_t UniversalIndex=0)
 
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)
 
static Expected< std::unique_ptr< SymbolicFile > > createSymbolicFile (MemoryBufferRef Object)
 
static Expected< OwningBinary< SymbolicFile > > createSymbolicFile (StringRef ObjectPath)
 
static bool classof (const Binary *v)
 
- Static Public Member Functions inherited from llvm::object::Binary
static std::error_code checkOffset (MemoryBufferRef M, uintptr_t Addr, const uint64_t Size)
 

Protected Member Functions

 ELFObjectFileBase (unsigned int Type, MemoryBufferRef Source)
 
virtual uint16_t getEMachine () const =0
 
virtual uint64_t getSymbolSize (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
 
- Protected Member Functions inherited from llvm::object::ObjectFile
 ObjectFile (unsigned int Type, MemoryBufferRef Source)
 
const uint8_t * base () const
 
virtual Expected< StringRefgetSymbolName (DataRefImpl Symb) const =0
 
std::error_code printSymbolName (raw_ostream &OS, DataRefImpl Symb) const override
 
virtual Expected< uint64_t > getSymbolAddress (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 std::error_code getSectionName (DataRefImpl Sec, StringRef &Res) 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 std::error_code getSectionContents (DataRefImpl Sec, StringRef &Res) 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 relocation_iterator section_rel_begin (DataRefImpl Sec) const =0
 
virtual relocation_iterator section_rel_end (DataRefImpl Sec) const =0
 
virtual section_iterator getRelocatedSection (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
 
uint64_t getSymbolValue (DataRefImpl Symb) const
 
- Protected Member Functions inherited from llvm::object::Binary
 Binary (unsigned int Type, MemoryBufferRef Source)
 

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_WinRes, ID_StartObjects, ID_COFF, ID_ELF32L,
  ID_ELF32B, ID_ELF64L, ID_ELF64B, ID_MachO32L,
  ID_MachO32B, ID_MachO64L, ID_MachO64B, 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
 

Detailed Description

Definition at line 47 of file ELFObjectFile.h.

Member Typedef Documentation

◆ elf_symbol_iterator_range

Definition at line 67 of file ELFObjectFile.h.

Constructor & Destructor Documentation

◆ ELFObjectFileBase()

ELFObjectFileBase::ELFObjectFileBase ( unsigned int  Type,
MemoryBufferRef  Source 
)
protected

Definition at line 39 of file ELFObjectFile.cpp.

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

Member Function Documentation

◆ classof()

static bool llvm::object::ELFObjectFileBase::classof ( const Binary v)
inlinestatic

◆ getARMFeatures()

SubtargetFeatures ELFObjectFileBase::getARMFeatures ( ) const

◆ getDynamicSymbolIterators()

virtual elf_symbol_iterator_range llvm::object::ELFObjectFileBase::getDynamicSymbolIterators ( ) const
pure virtual

◆ getEMachine()

virtual uint16_t llvm::object::ELFObjectFileBase::getEMachine ( ) const
protectedpure virtual

Referenced by getFeatures().

◆ getEType()

virtual uint16_t llvm::object::ELFObjectFileBase::getEType ( ) const
pure virtual

Referenced by classof().

◆ getFeatures()

SubtargetFeatures ELFObjectFileBase::getFeatures ( ) const
overridevirtual

◆ getMIPSFeatures()

SubtargetFeatures ELFObjectFileBase::getMIPSFeatures ( ) const

◆ getPlatformFlags()

virtual unsigned llvm::object::ELFObjectFileBase::getPlatformFlags ( ) const
pure virtual

Returns platform-specific object flags, if any.

Implemented in llvm::object::ELFObjectFile< ELFT >.

Referenced by getMIPSFeatures(), getRISCVFeatures(), and llvm::RuntimeDyldELF::processRelocationRef().

◆ getPltAddresses()

std::vector< std::pair< DataRefImpl, uint64_t > > ELFObjectFileBase::getPltAddresses ( ) const

Definition at line 334 of file ELFObjectFile.cpp.

Referenced by classof().

◆ getRelocationAddend()

virtual Expected<int64_t> llvm::object::ELFObjectFileBase::getRelocationAddend ( DataRefImpl  Rel) const
protectedpure virtual

◆ getRISCVFeatures()

SubtargetFeatures ELFObjectFileBase::getRISCVFeatures ( ) const

◆ getSectionFlags()

virtual uint64_t llvm::object::ELFObjectFileBase::getSectionFlags ( DataRefImpl  Sec) const
protectedpure virtual

◆ getSectionOffset()

virtual uint64_t llvm::object::ELFObjectFileBase::getSectionOffset ( DataRefImpl  Sec) const
protectedpure virtual

◆ getSectionType()

virtual uint32_t llvm::object::ELFObjectFileBase::getSectionType ( DataRefImpl  Sec) const
protectedpure virtual

◆ getSymbolELFType()

virtual uint8_t llvm::object::ELFObjectFileBase::getSymbolELFType ( DataRefImpl  Symb) const
protectedpure virtual

◆ getSymbolOther()

virtual uint8_t llvm::object::ELFObjectFileBase::getSymbolOther ( DataRefImpl  Symb) const
protectedpure virtual

◆ getSymbolSize()

virtual uint64_t llvm::object::ELFObjectFileBase::getSymbolSize ( DataRefImpl  Symb) const
protectedpure virtual

◆ setARMSubArch()

void ELFObjectFileBase::setARMSubArch ( Triple TheTriple) const
overridevirtual

◆ symbols()

ELFObjectFileBase::elf_symbol_iterator_range llvm::object::ELFObjectFileBase::symbols ( ) const
inline

Friends And Related Function Documentation

◆ ELFRelocationRef

friend class ELFRelocationRef
friend

Definition at line 48 of file ELFObjectFile.h.

◆ ELFSectionRef

friend class ELFSectionRef
friend

Definition at line 49 of file ELFObjectFile.h.

◆ ELFSymbolRef

friend class ELFSymbolRef
friend

Definition at line 50 of file ELFObjectFile.h.


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