LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | List of all members
llvm::RuntimeDyldMachO Class Reference

#include <RuntimeDyldMachO.h>

Inheritance diagram for llvm::RuntimeDyldMachO:
Inheritance graph
[legend]
Collaboration diagram for llvm::RuntimeDyldMachO:
Collaboration graph
[legend]

Public Member Functions

 RuntimeDyldMachO (RTDyldMemoryManager *mm)
 
virtual void resolveRelocation (const RelocationEntry &RE, uint64_t Value)
 A object file specific relocation resolver. More...
 
virtual void processRelocationRef (unsigned SectionID, RelocationRef RelI, ObjectImage &Obj, ObjSectionToIDMap &ObjSectionToID, const SymbolTableMap &Symbols, StubMap &Stubs)
 Parses the object file relocation and stores it to Relocations or SymbolRelocations (this depends on the object file type). More...
 
virtual bool isCompatibleFormat (const ObjectBuffer *Buffer) const
 
virtual void registerEHFrames ()
 
virtual void finalizeLoad (ObjSectionToIDMap &SectionMap)
 
- Public Member Functions inherited from llvm::RuntimeDyldImpl
 RuntimeDyldImpl (RTDyldMemoryManager *mm)
 
virtual ~RuntimeDyldImpl ()
 
ObjectImageloadObject (ObjectBuffer *InputBuffer)
 
void * getSymbolAddress (StringRef Name)
 
uint64_t getSymbolLoadAddress (StringRef Name)
 
void resolveRelocations ()
 
void reassignSectionAddress (unsigned SectionID, uint64_t Addr)
 
void mapSectionAddress (const void *LocalAddress, uint64_t TargetAddress)
 
bool hasError ()
 
void clearError ()
 
StringRef getErrorString ()
 
virtual void deregisterEHFrames ()
 

Additional Inherited Members

- Protected Types inherited from llvm::RuntimeDyldImpl
typedef SmallVector
< SectionEntry, 64 > 
SectionList
 
typedef unsigned SID
 
typedef std::map< SectionRef,
unsigned
ObjSectionToIDMap
 
typedef std::pair< unsigned,
uintptr_t > 
SymbolLoc
 
typedef StringMap< SymbolLocSymbolTableMap
 
typedef std::pair< unsigned,
unsigned
CommonSymbolInfo
 
typedef std::map< SymbolRef,
CommonSymbolInfo
CommonSymbolMap
 
typedef SmallVector
< RelocationEntry, 64 > 
RelocationList
 
typedef std::map
< RelocationValueRef,
uintptr_t > 
StubMap
 
- Protected Member Functions inherited from llvm::RuntimeDyldImpl
bool Error (const Twine &Msg)
 
uint64_t getSectionLoadAddress (unsigned SectionID)
 
uint8_t * getSectionAddress (unsigned SectionID)
 
void writeInt16BE (uint8_t *Addr, uint16_t Value)
 
void writeInt32BE (uint8_t *Addr, uint32_t Value)
 
void writeInt64BE (uint8_t *Addr, uint64_t Value)
 
void emitCommonSymbols (ObjectImage &Obj, const CommonSymbolMap &CommonSymbols, uint64_t TotalSize, SymbolTableMap &SymbolTable)
 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. More...
 
unsigned emitSection (ObjectImage &Obj, const SectionRef &Section, bool IsCode)
 Emits section data from the object file to the MemoryManager. More...
 
unsigned findOrEmitSection (ObjectImage &Obj, const SectionRef &Section, bool IsCode, ObjSectionToIDMap &LocalSections)
 Find Section in LocalSections. If the secton is not found - emit it and store in LocalSections. More...
 
void addRelocationForSection (const RelocationEntry &RE, unsigned SectionID)
 
void addRelocationForSymbol (const RelocationEntry &RE, StringRef SymbolName)
 
uint8_t * createStubFunction (uint8_t *Addr)
 Emits long jump instruction to Addr. More...
 
void resolveRelocationList (const RelocationList &Relocs, uint64_t Value)
 Resolves relocations from Relocs list with address from Value. More...
 
void resolveExternalSymbols ()
 Resolve relocations to external symbols. More...
 
virtual void updateGOTEntries (StringRef Name, uint64_t Addr)
 Update GOT entries for external symbols. More...
 
virtual ObjectImagecreateObjectImage (ObjectBuffer *InputBuffer)
 
- Protected Attributes inherited from llvm::RuntimeDyldImpl
RTDyldMemoryManagerMemMgr
 
SectionList Sections
 
SymbolTableMap GlobalSymbolTable
 
DenseMap< unsigned,
RelocationList
Relocations
 
StringMap< RelocationListExternalSymbolRelocations
 
Triple::ArchType Arch
 
bool IsTargetLittleEndian
 
sys::Mutex lock
 
bool HasError
 
std::string ErrorStr
 

Detailed Description

Definition at line 27 of file RuntimeDyldMachO.h.

Constructor & Destructor Documentation

llvm::RuntimeDyldMachO::RuntimeDyldMachO ( RTDyldMemoryManager mm)
inline

Definition at line 87 of file RuntimeDyldMachO.h.

Member Function Documentation

void llvm::RuntimeDyldMachO::finalizeLoad ( ObjSectionToIDMap SectionMap)
virtual
bool llvm::RuntimeDyldMachO::isCompatibleFormat ( const ObjectBuffer Buffer) const
virtual
void llvm::RuntimeDyldMachO::processRelocationRef ( unsigned  SectionID,
RelocationRef  RelI,
ObjectImage Obj,
ObjSectionToIDMap ObjSectionToID,
const SymbolTableMap Symbols,
StubMap Stubs 
)
virtual
void llvm::RuntimeDyldMachO::registerEHFrames ( )
virtual
void llvm::RuntimeDyldMachO::resolveRelocation ( const RelocationEntry RE,
uint64_t  Value 
)
virtual

A object file specific relocation resolver.

Parameters
REThe relocation to be resolved
ValueTarget symbol address to apply the relocation action

Implements llvm::RuntimeDyldImpl.

Definition at line 132 of file RuntimeDyldMachO.cpp.

References llvm::RelocationEntry::Addend, llvm::RelocationEntry::IsPCRel, llvm::RelocationEntry::Offset, llvm::RelocationEntry::RelType, llvm::ARMBuildAttrs::Section, llvm::RelocationEntry::SectionID, and llvm::RelocationEntry::Size.


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