Go to the documentation of this file.
13 #ifndef LLVM_LIB_EXECUTIONENGINE_RUNTIMEDYLD_RUNTIMEDYLDELF_H
14 #define LLVM_LIB_EXECUTIONENGINE_RUNTIMEDYLD_RUNTIMEDYLDELF_H
63 unsigned getMaxStubSize()
const override {
82 Align getStubAlignment()
override {
89 void setMipsABI(
const ObjectFile &Obj)
override;
105 uint64_t allocateGOTEntries(
unsigned no);
109 unsigned GOTRelType);
113 void resolveGOTOffsetRelocation(
unsigned SectionID,
uint64_t Offset,
122 void *computePlaceholderAddress(
unsigned SectionID,
uint64_t Offset)
const;
130 bool IsLocal =
false)
const;
133 unsigned GOTSectionID;
138 unsigned CurrentGOTIndex;
159 std::map<RelocationValueRef, uint64_t> GOTOffsetMap;
162 unsigned IFuncStubSectionID = 0;
181 void createIFuncResolver(uint8_t *
Addr)
const;
187 void createIFuncStub(
unsigned IFuncStubSectionID,
189 unsigned IFuncSectionID,
uint64_t IFuncOffset);
191 unsigned getMaxIFuncStubSize()
const;
193 void processNewSymbol(
const SymbolRef &ObjSymbol,
195 bool relocationNeedsGot(
const RelocationRef &R)
const override;
196 bool relocationNeedsStub(
const RelocationRef &R)
const override;
200 void processX86_64GOTTPOFFRelocation(
unsigned SectionID,
uint64_t Offset,
205 void processX86_64TLSRelocation(
unsigned SectionID,
uint64_t Offset,
215 static std::unique_ptr<RuntimeDyldELF>
219 std::unique_ptr<RuntimeDyld::LoadedObjectInfo>
This is an optimization pass for GlobalISel generic memory operations.
RuntimeDyld::MemoryManager & MemMgr
void registerEHFrames() override
bool isCompatibleFile(const object::ObjectFile &Obj) const override
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
The instances of the Type class are immutable: once they are created, they are never changed.
Tagged union holding either a T or a Error.
Interface for looking up the initializer for a variable name, used by Init::resolveReferences.
Error finalizeLoad(const ObjectFile &Obj, ObjSectionToIDMap &SectionMap) override
This struct is a compact representation of a valid (non-zero power of two) alignment.
RelocationEntry - used to represent relocations internally in the dynamic linker.
bar al al movzbl eax ret Missed when stored in a memory object
RuntimeDyldELF(RuntimeDyld::MemoryManager &MemMgr, JITSymbolResolver &Resolver)
SectionEntry - represents a section emitted into memory by the dynamic linker.
This class is the base class for all object file types.
size_t getGOTEntrySize() override
Symbol info for RuntimeDyld.
Symbol resolution interface.
static std::unique_ptr< RuntimeDyldELF > create(Triple::ArchType Arch, RuntimeDyld::MemoryManager &MemMgr, JITSymbolResolver &Resolver)
Lightweight error class with error context and mandatory checking.
DenseMap< SID, SID > SectionToGOTMap
std::unique_ptr< RuntimeDyld::LoadedObjectInfo > loadObject(const object::ObjectFile &O) override
This is a value type class that represents a single symbol in the list of symbols in the object file.
std::map< RelocationValueRef, uintptr_t > StubMap
This is a value type class that represents a single relocation in the list of relocations in the obje...
~RuntimeDyldELF() override
LLVM Value Representation.
Expected< relocation_iterator > processRelocationRef(unsigned SectionID, relocation_iterator RelI, const ObjectFile &Obj, ObjSectionToIDMap &ObjSectionToID, StubMap &Stubs) override
Parses one or more object file relocations (some object files use relocation pairs) and stores it to ...
std::map< SectionRef, unsigned > ObjSectionToIDMap
uint64_t resolveRelocation(RelocationResolver Resolver, const RelocationRef &R, uint64_t S, uint64_t LocData)