LLVM  3.7.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
llvm::RuntimeDyldCOFF Class Reference

#include <RuntimeDyldCOFF.h>

Inheritance diagram for llvm::RuntimeDyldCOFF:
[legend]
Collaboration diagram for llvm::RuntimeDyldCOFF:
[legend]

Public Member Functions

std::unique_ptr
< RuntimeDyld::LoadedObjectInfo
loadObject (const object::ObjectFile &Obj) override
 
bool isCompatibleFile (const object::ObjectFile &Obj) const override
 
- Public Member Functions inherited from llvm::RuntimeDyldImpl
 RuntimeDyldImpl (RuntimeDyld::MemoryManager &MemMgr, RuntimeDyld::SymbolResolver &Resolver)
 
virtual ~RuntimeDyldImpl ()
 
void setProcessAllSections (bool ProcessAllSections)
 
void setRuntimeDyldChecker (RuntimeDyldCheckerImpl *Checker)
 
uint8_t * getSymbolLocalAddress (StringRef Name) const
 
RuntimeDyld::SymbolInfo getSymbol (StringRef Name) const
 
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 registerEHFrames ()
 
virtual void deregisterEHFrames ()
 
virtual void finalizeLoad (const ObjectFile &ObjImg, ObjSectionToIDMap &SectionMap)
 

Static Public Member Functions

static std::unique_ptr
< RuntimeDyldCOFF
create (Triple::ArchType Arch, RuntimeDyld::MemoryManager &MemMgr, RuntimeDyld::SymbolResolver &Resolver)
 

Protected Member Functions

 RuntimeDyldCOFF (RuntimeDyld::MemoryManager &MemMgr, RuntimeDyld::SymbolResolver &Resolver)
 
uint64_t getSymbolOffset (const SymbolRef &Sym)
 
- Protected Member Functions inherited from llvm::RuntimeDyldImpl
virtual unsigned getMaxStubSize ()=0
 
virtual unsigned getStubAlignment ()=0
 
bool Error (const Twine &Msg)
 
uint64_t getSectionLoadAddress (unsigned SectionID) const
 
uint8_t * getSectionAddress (unsigned SectionID) const
 
void writeInt16BE (uint8_t *Addr, uint16_t Value)
 
void writeInt32BE (uint8_t *Addr, uint32_t Value)
 
void writeInt64BE (uint8_t *Addr, uint64_t Value)
 
virtual void setMipsABI (const ObjectFile &Obj)
 
uint64_t readBytesUnaligned (uint8_t *Src, unsigned Size) const
 Endian-aware read Read the least significant Size bytes from Src. More...
 
void writeBytesUnaligned (uint64_t Value, uint8_t *Dst, unsigned Size) const
 Endian-aware write. More...
 
void emitCommonSymbols (const ObjectFile &Obj, CommonSymbolList &CommonSymbols)
 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 (const ObjectFile &Obj, const SectionRef &Section, bool IsCode)
 Emits section data from the object file to the MemoryManager. More...
 
unsigned findOrEmitSection (const ObjectFile &Obj, const SectionRef &Section, bool IsCode, ObjSectionToIDMap &LocalSections)
 Find Section in LocalSections. More...
 
void addRelocationForSection (const RelocationEntry &RE, unsigned SectionID)
 
void addRelocationForSymbol (const RelocationEntry &RE, StringRef SymbolName)
 
uint8_t * createStubFunction (uint8_t *Addr, unsigned AbiVariant=0)
 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...
 
virtual void resolveRelocation (const RelocationEntry &RE, uint64_t Value)=0
 A object file specific relocation resolver. More...
 
virtual relocation_iterator processRelocationRef (unsigned SectionID, relocation_iterator RelI, const ObjectFile &Obj, ObjSectionToIDMap &ObjSectionToID, StubMap &Stubs)=0
 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). More...
 
void resolveExternalSymbols ()
 Resolve relocations to external symbols. More...
 
void computeTotalAllocSize (const ObjectFile &Obj, uint64_t &CodeSize, uint64_t &DataSizeRO, uint64_t &DataSizeRW)
 
unsigned computeSectionStubBufSize (const ObjectFile &Obj, const SectionRef &Section)
 
std::pair< unsigned, unsignedloadObjectImpl (const object::ObjectFile &Obj)
 

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::vector< SymbolRefCommonSymbolList
 
typedef SmallVector
< RelocationEntry, 64 > 
RelocationList
 
typedef std::map
< RelocationValueRef,
uintptr_t > 
StubMap
 
- Protected Attributes inherited from llvm::RuntimeDyldImpl
RuntimeDyld::MemoryManagerMemMgr
 
RuntimeDyld::SymbolResolverResolver
 
RuntimeDyldCheckerImplChecker
 
SectionList Sections
 
RTDyldSymbolTable GlobalSymbolTable
 
DenseMap< unsigned,
RelocationList
Relocations
 
StringMap< RelocationListExternalSymbolRelocations
 
Triple::ArchType Arch
 
bool IsTargetLittleEndian
 
bool IsMipsO32ABI
 
bool IsMipsN64ABI
 
bool ProcessAllSections
 
sys::Mutex lock
 
bool HasError
 
std::string ErrorStr
 

Detailed Description

Definition at line 28 of file RuntimeDyldCOFF.h.

Constructor & Destructor Documentation

llvm::RuntimeDyldCOFF::RuntimeDyldCOFF ( RuntimeDyld::MemoryManager MemMgr,
RuntimeDyld::SymbolResolver Resolver 
)
inlineprotected

Definition at line 40 of file RuntimeDyldCOFF.h.

Member Function Documentation

std::unique_ptr< RuntimeDyldCOFF > llvm::RuntimeDyldCOFF::create ( Triple::ArchType  Arch,
RuntimeDyld::MemoryManager MemMgr,
RuntimeDyld::SymbolResolver Resolver 
)
static

Definition at line 44 of file RuntimeDyldCOFF.cpp.

References llvm_unreachable, and llvm::Triple::x86_64.

Referenced by llvm::createRuntimeDyldCOFF().

uint64_t llvm::RuntimeDyldCOFF::getSymbolOffset ( const SymbolRef Sym)
protected
bool llvm::RuntimeDyldCOFF::isCompatibleFile ( const object::ObjectFile Obj) const
overridevirtual

Implements llvm::RuntimeDyldImpl.

Definition at line 69 of file RuntimeDyldCOFF.cpp.

References llvm::object::Binary::isCOFF().

std::unique_ptr< RuntimeDyld::LoadedObjectInfo > llvm::RuntimeDyldCOFF::loadObject ( const object::ObjectFile Obj)
overridevirtual

Implements llvm::RuntimeDyldImpl.

Definition at line 57 of file RuntimeDyldCOFF.cpp.


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