LLVM
8.0.1
|
#include "ExecutionEngine/RuntimeDyld/RuntimeDyldCOFF.h"
Static Public Member Functions | |
static std::unique_ptr< RuntimeDyldCOFF > | create (Triple::ArchType Arch, RuntimeDyld::MemoryManager &MemMgr, JITSymbolResolver &Resolver) |
Static Public Member Functions inherited from llvm::RuntimeDyldImpl | |
static void | finalizeAsync (std::unique_ptr< RuntimeDyldImpl > This, std::function< void(Error)> OnEmitted, std::unique_ptr< MemoryBuffer > UnderlyingBuffer) |
Protected Member Functions | |
RuntimeDyldCOFF (RuntimeDyld::MemoryManager &MemMgr, JITSymbolResolver &Resolver) | |
uint64_t | getSymbolOffset (const SymbolRef &Sym) |
Protected Member Functions inherited from llvm::RuntimeDyldImpl | |
virtual unsigned | getMaxStubSize ()=0 |
virtual unsigned | getStubAlignment ()=0 |
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... | |
virtual Expected< JITSymbolFlags > | getJITSymbolFlags (const SymbolRef &Sym) |
Generate JITSymbolFlags from a libObject symbol. More... | |
virtual uint64_t | modifyAddressBasedOnFlags (uint64_t Addr, JITSymbolFlags Flags) const |
Modify the given target address based on the given symbol flags. More... | |
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. More... | |
Expected< unsigned > | emitSection (const ObjectFile &Obj, const SectionRef &Section, bool IsCode) |
Emits section data from the object file to the MemoryManager. More... | |
Expected< 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 Expected< 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 | applyExternalSymbolRelocations (const StringMap< JITEvaluatedSymbol > ExternalSymbolMap) |
Error | resolveExternalSymbols () |
Resolve relocations to external symbols. More... | |
Error | computeTotalAllocSize (const ObjectFile &Obj, uint64_t &CodeSize, uint32_t &CodeAlign, uint64_t &RODataSize, uint32_t &RODataAlign, uint64_t &RWDataSize, uint32_t &RWDataAlign) |
unsigned | computeGOTSize (const ObjectFile &Obj) |
unsigned | computeSectionStubBufSize (const ObjectFile &Obj, const SectionRef &Section) |
Expected< ObjSectionToIDMap > | loadObjectImpl (const object::ObjectFile &Obj) |
virtual size_t | getGOTEntrySize () |
virtual bool | relocationNeedsGot (const RelocationRef &R) const |
virtual bool | relocationNeedsStub (const RelocationRef &R) const |
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< SymbolRef > | CommonSymbolList |
typedef SmallVector< RelocationEntry, 64 > | RelocationList |
typedef std::map< RelocationValueRef, uintptr_t > | StubMap |
Protected Attributes inherited from llvm::RuntimeDyldImpl | |
RuntimeDyld::MemoryManager & | MemMgr |
JITSymbolResolver & | Resolver |
RuntimeDyldCheckerImpl * | Checker |
SectionList | Sections |
RTDyldSymbolTable | GlobalSymbolTable |
std::unordered_map< unsigned, RelocationList > | Relocations |
StringMap< RelocationList > | ExternalSymbolRelocations |
Triple::ArchType | Arch |
bool | IsTargetLittleEndian |
bool | IsMipsO32ABI |
bool | IsMipsN32ABI |
bool | IsMipsN64ABI |
bool | ProcessAllSections |
sys::Mutex | lock |
bool | HasError |
std::string | ErrorStr |
Static Protected Attributes inherited from llvm::RuntimeDyldImpl | |
static const unsigned | AbsoluteSymbolSection = ~0U |
Definition at line 27 of file RuntimeDyldCOFF.h.
|
inlineprotected |
Definition at line 39 of file RuntimeDyldCOFF.h.
References getSymbolOffset().
|
static |
Definition at line 48 of file RuntimeDyldCOFF.cpp.
References llvm_unreachable, llvm::Triple::thumb, llvm::Triple::x86, and llvm::Triple::x86_64.
Referenced by llvm::createRuntimeDyldCOFF().
Definition at line 74 of file RuntimeDyldCOFF.cpp.
References llvm::object::SymbolRef::getValue().
Referenced by llvm::RuntimeDyldCOFFI386::processRelocationRef(), llvm::RuntimeDyldCOFFThumb::processRelocationRef(), llvm::RuntimeDyldCOFFX86_64::processRelocationRef(), and RuntimeDyldCOFF().
|
overridevirtual |
Implements llvm::RuntimeDyldImpl.
Definition at line 79 of file RuntimeDyldCOFF.cpp.
References llvm::object::Binary::isCOFF().
|
overridevirtual |
Implements llvm::RuntimeDyldImpl.
Definition at line 63 of file RuntimeDyldCOFF.cpp.
References llvm::logAllUnhandledErrors().