LLVM 22.0.0git
llvm::RuntimeDyldELFMips Class Reference

#include "ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldELFMips.h"

Inheritance diagram for llvm::RuntimeDyldELFMips:
[legend]

Public Types

typedef uint64_t TargetPtrT

Public Member Functions

 RuntimeDyldELFMips (RuntimeDyld::MemoryManager &MM, JITSymbolResolver &Resolver)
void resolveRelocation (const RelocationEntry &RE, uint64_t Value) override
 A object file specific relocation resolver.
Public Member Functions inherited from llvm::RuntimeDyldELF
 RuntimeDyldELF (RuntimeDyld::MemoryManager &MemMgr, JITSymbolResolver &Resolver)
 ~RuntimeDyldELF () override
std::unique_ptr< RuntimeDyld::LoadedObjectInfoloadObject (const object::ObjectFile &O) override
Expected< relocation_iteratorprocessRelocationRef (unsigned SectionID, relocation_iterator RelI, const ObjectFile &Obj, ObjSectionToIDMap &ObjSectionToID, StubMap &Stubs) override
 Parses one or more object file relocations (some object files use relocation pairs) and stores it to Relocations or SymbolRelocations (this depends on the object file type).
bool isCompatibleFile (const object::ObjectFile &Obj) const override
void registerEHFrames () override
Error finalizeLoad (const ObjectFile &Obj, ObjSectionToIDMap &SectionMap) override
Public Member Functions inherited from llvm::RuntimeDyldImpl
 RuntimeDyldImpl (RuntimeDyld::MemoryManager &MemMgr, JITSymbolResolver &Resolver)
virtual ~RuntimeDyldImpl ()
void setProcessAllSections (bool ProcessAllSections)
uint64_t getSectionLoadAddress (unsigned SectionID) const
uint8_tgetSectionAddress (unsigned SectionID) const
StringRef getSectionContent (unsigned SectionID) const
uint8_tgetSymbolLocalAddress (StringRef Name) const
unsigned getSymbolSectionID (StringRef Name) const
JITEvaluatedSymbol getSymbol (StringRef Name) const
std::map< StringRef, JITEvaluatedSymbolgetSymbolTable () const
void resolveRelocations ()
void resolveLocalRelocations ()
void reassignSectionAddress (unsigned SectionID, uint64_t Addr)
void mapSectionAddress (const void *LocalAddress, uint64_t TargetAddress)
bool hasError ()
void clearError ()
StringRef getErrorString ()
void setNotifyStubEmitted (NotifyStubEmittedFunction NotifyStubEmitted)
void deregisterEHFrames ()

Protected Member Functions

void resolveMIPSO32Relocation (const SectionEntry &Section, uint64_t Offset, uint32_t Value, uint32_t Type, int32_t Addend)
void resolveMIPSN32Relocation (const SectionEntry &Section, uint64_t Offset, uint64_t Value, uint32_t Type, int64_t Addend, uint64_t SymOffset, SID SectionID)
void resolveMIPSN64Relocation (const SectionEntry &Section, uint64_t Offset, uint64_t Value, uint32_t Type, int64_t Addend, uint64_t SymOffset, SID SectionID)
Protected Member Functions inherited from llvm::RuntimeDyldELF
size_t getGOTEntrySize () override
Protected Member Functions inherited from llvm::RuntimeDyldImpl
void writeInt16BE (uint8_t *Addr, uint16_t Value)
void writeInt32BE (uint8_t *Addr, uint32_t Value)
void writeInt64BE (uint8_t *Addr, uint64_t Value)
uint64_t readBytesUnaligned (uint8_t *Src, unsigned Size) const
 Endian-aware read Read the least significant Size bytes from Src.
void writeBytesUnaligned (uint64_t Value, uint8_t *Dst, unsigned Size) const
 Endian-aware write.
virtual Expected< JITSymbolFlagsgetJITSymbolFlags (const SymbolRef &Sym)
 Generate JITSymbolFlags from a libObject symbol.
virtual uint64_t modifyAddressBasedOnFlags (uint64_t Addr, JITSymbolFlags Flags) const
 Modify the given target address based on the given symbol flags.
Error emitCommonSymbols (const ObjectFile &Obj, CommonSymbolList &CommonSymbols, uint64_t CommonSize, uint32_t CommonAlign)
 Given the common symbols discovered in the object file, emit a new section for them and update the symbol mappings in the object and symbol table.
Expected< unsignedemitSection (const ObjectFile &Obj, const SectionRef &Section, bool IsCode)
 Emits section data from the object file to the MemoryManager.
Expected< unsignedfindOrEmitSection (const ObjectFile &Obj, const SectionRef &Section, bool IsCode, ObjSectionToIDMap &LocalSections)
 Find Section in LocalSections.
void addRelocationForSection (const RelocationEntry &RE, unsigned SectionID)
void addRelocationForSymbol (const RelocationEntry &RE, StringRef SymbolName)
uint8_tcreateStubFunction (uint8_t *Addr, unsigned AbiVariant=0)
 Emits long jump instruction to Addr.
void resolveRelocationList (const RelocationList &Relocs, uint64_t Value)
 Resolves relocations from Relocs list with address from Value.
void applyExternalSymbolRelocations (const StringMap< JITEvaluatedSymbol > ExternalSymbolMap)
Error resolveExternalSymbols ()
 Resolve relocations to external symbols.
Error computeTotalAllocSize (const ObjectFile &Obj, uint64_t &CodeSize, Align &CodeAlign, uint64_t &RODataSize, Align &RODataAlign, uint64_t &RWDataSize, Align &RWDataAlign)
unsigned computeGOTSize (const ObjectFile &Obj)
unsigned computeSectionStubBufSize (const ObjectFile &Obj, const SectionRef &Section)
Expected< ObjSectionToIDMaploadObjectImpl (const object::ObjectFile &Obj)
virtual bool relocationNeedsDLLImportStub (const RelocationRef &R) const
virtual unsigned sizeAfterAddingDLLImportStub (unsigned Size) const

Additional Inherited Members

Static Public Member Functions inherited from llvm::RuntimeDyldELF
static std::unique_ptr< RuntimeDyldELFcreate (Triple::ArchType Arch, RuntimeDyld::MemoryManager &MemMgr, JITSymbolResolver &Resolver)
Static Public Member Functions inherited from llvm::RuntimeDyldImpl
static void finalizeAsync (std::unique_ptr< RuntimeDyldImpl > This, unique_function< void(object::OwningBinary< object::ObjectFile >, std::unique_ptr< RuntimeDyld::LoadedObjectInfo >, Error)> OnEmitted, object::OwningBinary< object::ObjectFile > O, std::unique_ptr< RuntimeDyld::LoadedObjectInfo > Info)
Protected Types inherited from llvm::RuntimeDyldImpl
typedef std::deque< SectionEntrySectionList
typedef unsigned SID
typedef std::map< SectionRef, unsignedObjSectionToIDMap
typedef std::vector< SymbolRefCommonSymbolList
typedef SmallVector< RelocationEntry, 64 > RelocationList
typedef std::map< RelocationValueRef, uintptr_t > StubMap
using NotifyStubEmittedFunction
Protected Attributes inherited from llvm::RuntimeDyldELF
DenseMap< SID, SIDSectionToGOTMap
Protected Attributes inherited from llvm::RuntimeDyldImpl
RuntimeDyld::MemoryManagerMemMgr
JITSymbolResolverResolver
SectionList Sections
RTDyldSymbolTable GlobalSymbolTable
std::unordered_map< unsigned, RelocationListRelocations
StringMap< RelocationListExternalSymbolRelocations
Triple::ArchType Arch
bool IsTargetLittleEndian
bool IsMipsO32ABI
bool IsMipsN32ABI
bool IsMipsN64ABI
bool ProcessAllSections
sys::Mutex lock
NotifyStubEmittedFunction NotifyStubEmitted
bool HasError
std::string ErrorStr
Static Protected Attributes inherited from llvm::RuntimeDyldImpl
static const unsigned AbsoluteSymbolSection = ~0U

Detailed Description

Definition at line 18 of file RuntimeDyldELFMips.h.

Member Typedef Documentation

◆ TargetPtrT

Constructor & Destructor Documentation

◆ RuntimeDyldELFMips()

llvm::RuntimeDyldELFMips::RuntimeDyldELFMips ( RuntimeDyld::MemoryManager & MM,
JITSymbolResolver & Resolver )
inline

Definition at line 23 of file RuntimeDyldELFMips.h.

References llvm::RuntimeDyldELF::RuntimeDyldELF().

Member Function Documentation

◆ resolveMIPSN32Relocation()

void RuntimeDyldELFMips::resolveMIPSN32Relocation ( const SectionEntry & Section,
uint64_t Offset,
uint64_t Value,
uint32_t Type,
int64_t Addend,
uint64_t SymOffset,
SID SectionID )
protected

Definition at line 265 of file RuntimeDyldELFMips.cpp.

References llvm::Offset.

Referenced by resolveRelocation().

◆ resolveMIPSN64Relocation()

void RuntimeDyldELFMips::resolveMIPSN64Relocation ( const SectionEntry & Section,
uint64_t Offset,
uint64_t Value,
uint32_t Type,
int64_t Addend,
uint64_t SymOffset,
SID SectionID )
protected

Definition at line 274 of file RuntimeDyldELFMips.cpp.

References llvm::Offset.

Referenced by resolveRelocation().

◆ resolveMIPSO32Relocation()

void RuntimeDyldELFMips::resolveMIPSO32Relocation ( const SectionEntry & Section,
uint64_t Offset,
uint32_t Value,
uint32_t Type,
int32_t Addend )
protected

Definition at line 303 of file RuntimeDyldELFMips.cpp.

References llvm::dbgs(), llvm::format(), LLVM_DEBUG, and llvm::Offset.

Referenced by resolveRelocation().

◆ resolveRelocation()


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