LLVM: llvm::RuntimeDyldELF Class Reference (original) (raw)
#include "[ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h](RuntimeDyldELF%5F8h%5Fsource.html)"
| Protected Member Functions | |
|---|---|
| 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< JITSymbolFlags > | getJITSymbolFlags (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< unsigned > | emitSection (const ObjectFile &Obj, const SectionRef &Section, bool IsCode) |
| Emits section data from the object file to the MemoryManager. | |
| Expected< unsigned > | findOrEmitSection (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_t * | createStubFunction (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< ObjSectionToIDMap > | loadObjectImpl (const object::ObjectFile &Obj) |
| virtual bool | relocationNeedsDLLImportStub (const RelocationRef &R) const |
| virtual unsigned | sizeAfterAddingDLLImportStub (unsigned Size) const |
| Protected Attributes | |
|---|---|
| DenseMap< SID, SID > | SectionToGOTMap |
| Protected Attributes inherited from llvm::RuntimeDyldImpl | |
| RuntimeDyld::MemoryManager & | MemMgr |
| JITSymbolResolver & | Resolver |
| 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 |
| NotifyStubEmittedFunction | NotifyStubEmitted |
| bool | HasError |
| std::string | ErrorStr |
| Additional Inherited Members | |
|---|---|
| Protected Types inherited from llvm::RuntimeDyldImpl | |
| typedef std::deque< SectionEntry > | 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 |
| using | NotifyStubEmittedFunction |
| Static Protected Attributes inherited from llvm::RuntimeDyldImpl | |
| static const unsigned | AbsoluteSymbolSection = ~0U |
Definition at line 24 of file RuntimeDyldELF.h.
◆ ~RuntimeDyldELF()
| llvm::RuntimeDyldELF::~RuntimeDyldELF ( ) | overridedefault |
|---|
◆ create()
◆ finalizeLoad()
Reimplemented from llvm::RuntimeDyldImpl.
Definition at line 2769 of file RuntimeDyldELF.cpp.
References assert(), llvm::consumeError(), llvm::dbgs(), llvm::format(), getGOTEntrySize(), llvm::RuntimeDyldImpl::IsMipsN32ABI, llvm::RuntimeDyldImpl::IsMipsN64ABI, llvm::RuntimeDyldImpl::IsMipsO32ABI, LLVM_DEBUG, llvm::make_error(), llvm::RuntimeDyldImpl::MemMgr, llvm::RuntimeDyldImpl::Sections, SectionToGOTMap, llvm::Error::success(), llvm::Expected< T >::takeError(), and llvm::toString().
◆ getGOTEntrySize()
| size_t llvm::RuntimeDyldELF::getGOTEntrySize ( ) | overrideprotectedvirtual |
|---|
Reimplemented from llvm::RuntimeDyldImpl.
Definition at line 2661 of file RuntimeDyldELF.cpp.
References llvm::Triple::aarch64, llvm::Triple::aarch64_be, llvm::RuntimeDyldImpl::Arch, llvm::Triple::arm, llvm::RuntimeDyldImpl::IsMipsN32ABI, llvm::RuntimeDyldImpl::IsMipsN64ABI, llvm::RuntimeDyldImpl::IsMipsO32ABI, llvm_unreachable, llvm::Triple::loongarch64, llvm::Triple::mips, llvm::Triple::mips64, llvm::Triple::mips64el, llvm::Triple::mipsel, llvm::Triple::ppc64, llvm::Triple::ppc64le, llvm::Triple::systemz, llvm::Triple::thumb, llvm::Triple::x86, and llvm::Triple::x86_64.
Referenced by finalizeLoad().
◆ isCompatibleFile()
◆ loadObject()
◆ processRelocationRef()
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).
Returns
Iterator to the next relocation that needs to be parsed.
Implements llvm::RuntimeDyldImpl.
Definition at line 1640 of file RuntimeDyldELF.cpp.
References llvm::Triple::aarch64, llvm::Triple::aarch64_be, llvm::RelocationValueRef::Addend, llvm::RuntimeDyldImpl::addRelocationForSection(), llvm::RuntimeDyldImpl::addRelocationForSymbol(), llvm::alignTo(), llvm::RuntimeDyldImpl::Arch, llvm::Triple::arm, llvm::cast(), llvm::consumeError(), llvm::RuntimeDyldImpl::createStubFunction(), llvm::StringRef::data(), llvm::dbgs(), llvm::ELF::decodePPC64LocalEntryOffset(), llvm::ELF::EF_PPC64_ABI, llvm::RuntimeDyldImpl::findOrEmitSection(), llvm::object::ELFRelocationRef::getAddend(), llvm::RuntimeDyldImpl::getMaxStubSize(), llvm::object::RelocationRef::getOffset(), llvm::object::RelocationRef::getSymbol(), llvm::object::RelocationRef::getType(), llvm::RuntimeDyldImpl::GlobalSymbolTable, I, llvm::RuntimeDyldImpl::IsMipsN32ABI, llvm::RuntimeDyldImpl::IsMipsN64ABI, llvm::RuntimeDyldImpl::IsMipsO32ABI, llvm::RuntimeDyldImpl::IsTargetLittleEndian, llvm::object::SectionRef::isText(), LLVM_DEBUG, llvm_unreachable, llvm::logAllUnhandledErrors(), llvm::Triple::loongarch64, llvm::RuntimeDyldImpl::MemMgr, llvm::Offset, llvm::Triple::ppc64, llvm::Triple::ppc64le, llvm::RuntimeDyldImpl::readBytesUnaligned(), llvm::report_fatal_error(), llvm::Triple::riscv32, llvm::Triple::riscv64, llvm::RelocationValueRef::SectionID, llvm::RuntimeDyldImpl::Sections, llvm::SignExtend32(), llvm::SignExtend64(), llvm::object::SymbolRef::ST_Data, llvm::object::SymbolRef::ST_Debug, llvm::object::SymbolRef::ST_Function, llvm::object::SymbolRef::ST_Other, llvm::object::SymbolRef::ST_Unknown, llvm::RelocationEntry::SymOffset, llvm::Triple::systemz, llvm::Expected< T >::takeError(), llvm::RuntimeDyldImpl::writeInt32BE(), llvm::Triple::x86, and llvm::Triple::x86_64.
◆ registerEHFrames()
| void llvm::RuntimeDyldELF::registerEHFrames ( ) | overridevirtual |
|---|
◆ resolveRelocation()
◆ SectionToGOTMap
The documentation for this class was generated from the following files:
- lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h
- lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp