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);
49 void resolveARMRelocation(
const SectionEntry &Section, uint64_t Offset,
52 void resolvePPC32Relocation(
const SectionEntry &Section, uint64_t Offset,
53 uint64_t Value,
uint32_t Type, int64_t Addend);
55 void resolvePPC64Relocation(
const SectionEntry &Section, uint64_t Offset,
56 uint64_t Value,
uint32_t Type, int64_t Addend);
58 void resolveSystemZRelocation(
const SectionEntry &Section, uint64_t Offset,
59 uint64_t Value,
uint32_t Type, int64_t Addend);
61 void resolveBPFRelocation(
const SectionEntry &Section, uint64_t Offset,
62 uint64_t Value,
uint32_t Type, int64_t Addend);
64 unsigned getMaxStubSize()
override {
69 else if (IsMipsO32ABI || IsMipsN32ABI)
71 else if (IsMipsN64ABI)
83 unsigned getStubAlignment()
override {
90 void setMipsABI(
const ObjectFile &Obj)
override;
99 size_t getGOTEntrySize()
override;
105 uint64_t allocateGOTEntries(
unsigned no);
109 unsigned GOTRelType);
113 void resolveGOTOffsetRelocation(
unsigned SectionID, uint64_t Offset,
118 RelocationEntry computeGOTOffsetRE(uint64_t GOTOffset, uint64_t SymbolOffset,
122 void *computePlaceholderAddress(
unsigned SectionID, uint64_t Offset)
const;
126 void processSimpleRelocation(
unsigned SectionID, uint64_t Offset,
unsigned RelType,
RelocationValueRef Value);
130 bool IsLocal =
false)
const;
133 unsigned GOTSectionID;
138 unsigned CurrentGOTIndex;
159 std::map<RelocationValueRef, uint64_t> GOTOffsetMap;
161 bool relocationNeedsGot(
const RelocationRef &R)
const override;
162 bool relocationNeedsStub(
const RelocationRef &R)
const override;
169 static std::unique_ptr<RuntimeDyldELF>
173 std::unique_ptr<RuntimeDyld::LoadedObjectInfo>
176 void resolveRelocation(
const RelocationEntry &RE, uint64_t Value)
override;
183 void registerEHFrames()
override;
RelocationEntry - used to represent relocations internally in the dynamic linker. ...
This class represents lattice values for constants.
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...
std::map< RelocationValueRef, uintptr_t > StubMap
Tagged union holding either a T or a Error.
Expected< const typename ELFT::Shdr * > getSection(typename ELFT::ShdrRange Sections, uint32_t Index)
The instances of the Type class are immutable: once they are created, they are never changed...
Interface for looking up the initializer for a variable name, used by Init::resolveReferences.
Symbol resolution interface.
DenseMap< SID, SID > SectionToGOTMap
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
std::map< SectionRef, unsigned > ObjSectionToIDMap
SectionEntry - represents a section emitted into memory by the dynamic linker.
LLVM Value Representation.
Lightweight error class with error context and mandatory checking.