13#ifndef LLVM_LIB_EXECUTIONENGINE_RUNTIMEDYLD_RUNTIMEDYLDELF_H
14#define LLVM_LIB_EXECUTIONENGINE_RUNTIMEDYLD_RUNTIMEDYLDELF_H
61 unsigned getMaxStubSize()
const override {
80 Align getStubAlignment()
override {
87 void setMipsABI(
const ObjectFile &Obj)
override;
103 uint64_t allocateGOTEntries(
unsigned no);
107 unsigned GOTRelType);
111 void resolveGOTOffsetRelocation(
unsigned SectionID,
uint64_t Offset,
120 void *computePlaceholderAddress(
unsigned SectionID,
uint64_t Offset)
const;
128 bool IsLocal =
false)
const;
131 unsigned GOTSectionID;
136 unsigned CurrentGOTIndex;
157 std::map<RelocationValueRef, uint64_t> GOTOffsetMap;
160 unsigned IFuncStubSectionID = 0;
179 void createIFuncResolver(uint8_t *
Addr)
const;
185 void createIFuncStub(
unsigned IFuncStubSectionID,
187 unsigned IFuncSectionID,
uint64_t IFuncOffset);
189 unsigned getMaxIFuncStubSize()
const;
191 void processNewSymbol(
const SymbolRef &ObjSymbol,
193 bool relocationNeedsGot(
const RelocationRef &R)
const override;
194 bool relocationNeedsStub(
const RelocationRef &R)
const override;
198 void processX86_64GOTTPOFFRelocation(
unsigned SectionID,
uint64_t Offset,
203 void processX86_64TLSRelocation(
unsigned SectionID,
uint64_t Offset,
213 static std::unique_ptr<RuntimeDyldELF>
217 std::unique_ptr<RuntimeDyld::LoadedObjectInfo>
This file defines the DenseMap class.
Lightweight error class with error context and mandatory checking.
Tagged union holding either a T or a Error.
Symbol resolution interface.
RelocationEntry - used to represent relocations internally in the dynamic linker.
Interface for looking up the initializer for a variable name, used by Init::resolveReferences.
void registerEHFrames() override
size_t getGOTEntrySize() override
~RuntimeDyldELF() override
static std::unique_ptr< RuntimeDyldELF > create(Triple::ArchType Arch, RuntimeDyld::MemoryManager &MemMgr, JITSymbolResolver &Resolver)
Error finalizeLoad(const ObjectFile &Obj, ObjSectionToIDMap &SectionMap) override
DenseMap< SID, SID > SectionToGOTMap
bool isCompatibleFile(const object::ObjectFile &Obj) const override
std::unique_ptr< RuntimeDyld::LoadedObjectInfo > loadObject(const object::ObjectFile &O) override
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
std::map< RelocationValueRef, uintptr_t > StubMap
RuntimeDyld::MemoryManager & MemMgr
SectionEntry - represents a section emitted into memory by the dynamic linker.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...
Symbol info for RuntimeDyld.
The instances of the Type class are immutable: once they are created, they are never changed.
LLVM Value Representation.
This class is the base class for all object file types.
This is a value type class that represents a single relocation in the list of relocations in the obje...
This is a value type class that represents a single symbol in the list of symbols in the object file.
uint64_t resolveRelocation(RelocationResolver Resolver, const RelocationRef &R, uint64_t S, uint64_t LocData)
This is an optimization pass for GlobalISel generic memory operations.
This struct is a compact representation of a valid (non-zero power of two) alignment.