14 #ifndef LLVM_LIB_EXECUTIONENGINE_RUNTIMEDYLD_RUNTIMEDYLDELF_H
15 #define LLVM_LIB_EXECUTIONENGINE_RUNTIMEDYLD_RUNTIMEDYLDELF_H
27 uint64_t
Value, uint32_t
Type, int64_t Addend,
28 uint64_t SymOffset = 0,
SID SectionID = 0);
30 void resolveX86_64Relocation(
const SectionEntry &Section, uint64_t Offset,
31 uint64_t Value, uint32_t Type, int64_t Addend,
34 void resolveX86Relocation(
const SectionEntry &Section, uint64_t Offset,
35 uint32_t Value, uint32_t Type, int32_t Addend);
37 void resolveAArch64Relocation(
const SectionEntry &Section, uint64_t Offset,
38 uint64_t Value, uint32_t Type, int64_t Addend);
40 void resolveARMRelocation(
const SectionEntry &Section, uint64_t Offset,
41 uint32_t Value, uint32_t Type, int32_t Addend);
43 void resolveMIPSRelocation(
const SectionEntry &Section, uint64_t Offset,
44 uint32_t Value, uint32_t Type, int32_t Addend);
46 void resolvePPC64Relocation(
const SectionEntry &Section, uint64_t Offset,
47 uint64_t Value, uint32_t Type, int64_t Addend);
49 void resolveSystemZRelocation(
const SectionEntry &Section, uint64_t Offset,
50 uint64_t Value, uint32_t Type, int64_t Addend);
52 void resolveMIPS64Relocation(
const SectionEntry &Section, uint64_t Offset,
53 uint64_t Value, uint32_t Type, int64_t Addend,
54 uint64_t SymOffset,
SID SectionID);
56 int64_t evaluateMIPS64Relocation(
const SectionEntry &Section,
57 uint64_t Offset, uint64_t Value,
58 uint32_t Type, int64_t Addend,
59 uint64_t SymOffset,
SID SectionID);
61 void applyMIPS64Relocation(uint8_t *TargetPtr, int64_t CalculatedValue,
64 unsigned getMaxStubSize()
override {
81 unsigned getStubAlignment()
override {
88 void setMipsABI(
const ObjectFile &Obj)
override;
97 size_t getGOTEntrySize();
102 uint64_t allocateGOTEntries(
unsigned SectionID,
unsigned no);
106 void resolveGOTOffsetRelocation(
unsigned SectionID, uint64_t Offset,
113 uint64_t SymbolOffset,
117 void *computePlaceholderAddress(
unsigned SectionID, uint64_t Offset)
const;
121 void processSimpleRelocation(
unsigned SectionID, uint64_t Offset,
unsigned RelType,
RelocationValueRef Value);
124 unsigned GOTSectionID;
129 unsigned CurrentGOTIndex;
149 std::unique_ptr<RuntimeDyld::LoadedObjectInfo>
152 void resolveRelocation(
const RelocationEntry &RE, uint64_t Value)
override;
RelocationEntry - used to represent relocations internally in the dynamic linker. ...
RuntimeDyld::MemoryManager & MemMgr
RuntimeDyldELF(RuntimeDyld::MemoryManager &MemMgr, RuntimeDyld::SymbolResolver &Resolver)
This class is the base class for all object file types.
std::unique_ptr< RuntimeDyld::LoadedObjectInfo > loadObject(const object::ObjectFile &O) override
std::map< RelocationValueRef, uintptr_t > StubMap
The instances of the Type class are immutable: once they are created, they are never changed...
RuntimeDyld::SymbolResolver & Resolver
void registerEHFrames() override
~RuntimeDyldELF() override
bool isCompatibleFile(const object::ObjectFile &Obj) const override
void finalizeLoad(const ObjectFile &Obj, ObjSectionToIDMap &SectionMap) override
void deregisterEHFrames() override
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
SectionEntry - represents a section emitted into memory by the dynamic linker.
LLVM Value Representation.