14 #ifndef LLVM_LIB_EXECUTIONENGINE_RUNTIMEDYLD_RUNTIMEDYLDELF_H
15 #define LLVM_LIB_EXECUTIONENGINE_RUNTIMEDYLD_RUNTIMEDYLDELF_H
31 uint64_t SymOffset = 0,
SID SectionID = 0);
33 void resolveX86_64Relocation(
const SectionEntry &Section, uint64_t Offset,
34 uint64_t Value,
uint32_t Type, int64_t Addend,
37 void resolveX86Relocation(
const SectionEntry &Section, uint64_t Offset,
40 void resolveAArch64Relocation(
const SectionEntry &Section, uint64_t Offset,
41 uint64_t Value,
uint32_t Type, int64_t Addend);
46 void resolveARMRelocation(
const SectionEntry &Section, uint64_t Offset,
49 void resolvePPC32Relocation(
const SectionEntry &Section, uint64_t Offset,
50 uint64_t Value,
uint32_t Type, int64_t Addend);
52 void resolvePPC64Relocation(
const SectionEntry &Section, uint64_t Offset,
53 uint64_t Value,
uint32_t Type, int64_t Addend);
55 void resolveSystemZRelocation(
const SectionEntry &Section, uint64_t Offset,
56 uint64_t Value,
uint32_t Type, int64_t Addend);
58 unsigned getMaxStubSize()
override {
75 unsigned getStubAlignment()
override {
82 void setMipsABI(
const ObjectFile &Obj)
override;
97 uint64_t allocateGOTEntries(
unsigned SectionID,
unsigned no);
101 void resolveGOTOffsetRelocation(
unsigned SectionID, uint64_t Offset,
108 uint64_t SymbolOffset,
112 void *computePlaceholderAddress(
unsigned SectionID, uint64_t Offset)
const;
116 void processSimpleRelocation(
unsigned SectionID, uint64_t Offset,
unsigned RelType,
RelocationValueRef Value);
120 bool IsLocal =
false)
const;
123 unsigned GOTSectionID;
128 unsigned CurrentGOTIndex;
149 bool relocationNeedsStub(
const RelocationRef &R)
const override;
156 static std::unique_ptr<RuntimeDyldELF>
160 std::unique_ptr<RuntimeDyld::LoadedObjectInfo>
163 void resolveRelocation(
const RelocationEntry &RE, uint64_t Value)
override;
RelocationEntry - used to represent relocations internally in the dynamic linker. ...
RuntimeDyld::MemoryManager & MemMgr
This class is the base class for all object file types.
static std::unique_ptr< RuntimeDyldELF > create(Triple::ArchType Arch, RuntimeDyld::MemoryManager &MemMgr, JITSymbolResolver &Resolver)
This is a value type class that represents a single relocation in the list of relocations in the obje...
std::unique_ptr< RuntimeDyld::LoadedObjectInfo > loadObject(const object::ObjectFile &O) override
std::map< RelocationValueRef, uintptr_t > StubMap
Tagged union holding either a T or a Error.
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 ...
The instances of the Type class are immutable: once they are created, they are never changed...
void registerEHFrames() override
~RuntimeDyldELF() override
bool isCompatibleFile(const object::ObjectFile &Obj) const override
DenseMap< SID, SID > SectionToGOTMap
void deregisterEHFrames() override
Error finalizeLoad(const ObjectFile &Obj, ObjSectionToIDMap &SectionMap) override
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
JITSymbolResolver & Resolver
std::map< SectionRef, unsigned > ObjSectionToIDMap
SectionEntry - represents a section emitted into memory by the dynamic linker.
RuntimeDyldELF(RuntimeDyld::MemoryManager &MemMgr, JITSymbolResolver &Resolver)
LLVM Value Representation.
Lightweight error class with error context and mandatory checking.