|
LLVM
3.7.0
|
#include <RuntimeDyldELF.h>
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 Member Functions inherited from llvm::RuntimeDyldImpl | |
| 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) |
| 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... | |
| 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, unsigned > | loadObjectImpl (const object::ObjectFile &Obj) |
Protected Attributes inherited from llvm::RuntimeDyldImpl | |
| RuntimeDyld::MemoryManager & | MemMgr |
| RuntimeDyld::SymbolResolver & | Resolver |
| RuntimeDyldCheckerImpl * | Checker |
| SectionList | Sections |
| RTDyldSymbolTable | GlobalSymbolTable |
| DenseMap< unsigned, RelocationList > | Relocations |
| StringMap< RelocationList > | ExternalSymbolRelocations |
| Triple::ArchType | Arch |
| bool | IsTargetLittleEndian |
| bool | IsMipsO32ABI |
| bool | IsMipsN64ABI |
| bool | ProcessAllSections |
| sys::Mutex | lock |
| bool | HasError |
| std::string | ErrorStr |
Definition at line 24 of file RuntimeDyldELF.h.
| llvm::RuntimeDyldELF::RuntimeDyldELF | ( | RuntimeDyld::MemoryManager & | MemMgr, |
| RuntimeDyld::SymbolResolver & | Resolver | ||
| ) |
Definition at line 188 of file RuntimeDyldELF.cpp.
|
override |
Definition at line 191 of file RuntimeDyldELF.cpp.
|
overridevirtual |
Reimplemented from llvm::RuntimeDyldImpl.
Definition at line 205 of file RuntimeDyldELF.cpp.
References llvm::SmallVectorImpl< T >::clear(), llvm::RuntimeDyld::MemoryManager::deregisterEHFrames(), llvm::RuntimeDyldImpl::MemMgr, llvm::RuntimeDyldImpl::Sections, and llvm::SmallVectorTemplateCommon< T, typename >::size().
|
overridevirtual |
Reimplemented from llvm::RuntimeDyldImpl.
Definition at line 1694 of file RuntimeDyldELF.cpp.
References llvm::RuntimeDyld::MemoryManager::allocateDataSection(), llvm::RuntimeDyldImpl::Checker, llvm::StringMap< ValueTy, AllocatorTy >::clear(), llvm::object::Binary::getFileName(), llvm::object::SectionRef::getName(), llvm::RuntimeDyldImpl::IsMipsN64ABI, llvm::RuntimeDyldImpl::MemMgr, llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), llvm::report_fatal_error(), llvm::object::ObjectFile::section_begin(), llvm::object::ObjectFile::section_end(), llvm::RuntimeDyldImpl::Sections, and llvm::SI.
|
overridevirtual |
Implements llvm::RuntimeDyldImpl.
Definition at line 1745 of file RuntimeDyldELF.cpp.
References llvm::object::Binary::isELF().
|
overridevirtual |
Implements llvm::RuntimeDyldImpl.
Definition at line 217 of file RuntimeDyldELF.cpp.
References llvm::RuntimeDyldImpl::loadObjectImpl().
|
overridevirtual |
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).
Implements llvm::RuntimeDyldImpl.
Definition at line 1099 of file RuntimeDyldELF.cpp.
References llvm::Triple::aarch64, llvm::Triple::aarch64_be, llvm::RelocationValueRef::Addend, llvm::RuntimeDyldImpl::addRelocationForSection(), llvm::RuntimeDyldImpl::addRelocationForSymbol(), llvm::SectionEntry::Address, llvm::RuntimeDyldImpl::Arch, llvm::Triple::arm, llvm::RuntimeDyldImpl::createStubFunction(), llvm::StringRef::data(), llvm::dbgs(), DEBUG, llvm::StringMap< ValueTy, AllocatorTy >::end(), llvm::StringMap< ValueTy, AllocatorTy >::find(), llvm::RuntimeDyldImpl::findOrEmitSection(), llvm::object::ELFRelocationRef::getAddend(), llvm::ErrorOr< T >::getError(), llvm::object::SymbolRef::getName(), llvm::object::SymbolRef::getSection(), llvm::object::SymbolRef::getType(), llvm::RuntimeDyldImpl::GlobalSymbolTable, llvm::RuntimeDyldImpl::IsMipsN64ABI, llvm::RuntimeDyldImpl::IsMipsO32ABI, llvm_unreachable, llvm::RelocationValueRef::Offset, llvm::RuntimeDyldImpl::readBytesUnaligned(), llvm::report_fatal_error(), llvm::StringMapEntry< ValueTy >::second, llvm::object::ObjectFile::section_end(), llvm::RelocationValueRef::SectionID, llvm::RuntimeDyldImpl::Sections, llvm::object::SymbolRef::ST_Data, llvm::object::SymbolRef::ST_Debug, llvm::object::SymbolRef::ST_Unknown, llvm::SectionEntry::StubOffset, llvm::ARMBuildAttrs::Symbol, llvm::object::SymbolicFile::symbol_end(), llvm::RelocationValueRef::SymbolName, and llvm::RelocationEntry::SymOffset.
|
overridevirtual |
Reimplemented from llvm::RuntimeDyldImpl.
Definition at line 193 of file RuntimeDyldELF.cpp.
References llvm::SmallVectorImpl< T >::clear(), llvm::RuntimeDyldImpl::MemMgr, llvm::SmallVectorTemplateBase< T, isPodLike >::push_back(), llvm::RuntimeDyld::MemoryManager::registerEHFrames(), llvm::RuntimeDyldImpl::Sections, and llvm::SmallVectorTemplateCommon< T, typename >::size().
|
overridevirtual |
A object file specific relocation resolver.
| RE | The relocation to be resolved |
| Value | Target symbol address to apply the relocation action |
Implements llvm::RuntimeDyldImpl.
Definition at line 1032 of file RuntimeDyldELF.cpp.
References llvm::RelocationEntry::Addend, llvm::RelocationEntry::Offset, llvm::RelocationEntry::RelType, llvm::RelocationEntry::SectionID, llvm::RuntimeDyldImpl::Sections, and llvm::RelocationEntry::SymOffset.
1.8.6