13 #ifndef LLVM_LIB_EXECUTIONENGINE_RUNTIMEDYLD_RUNTIMEDYLDELF_H 14 #define LLVM_LIB_EXECUTIONENGINE_RUNTIMEDYLD_RUNTIMEDYLDELF_H 30 uint64_t SymOffset = 0,
SID SectionID = 0);
32 void resolveX86_64Relocation(
const SectionEntry &Section, uint64_t Offset,
33 uint64_t Value,
uint32_t Type, int64_t Addend,
36 void resolveX86Relocation(
const SectionEntry &Section, uint64_t Offset,
39 void resolveAArch64Relocation(
const SectionEntry &Section, uint64_t Offset,
40 uint64_t Value,
uint32_t Type, int64_t Addend);
48 void resolveARMRelocation(
const SectionEntry &Section, uint64_t Offset,
51 void resolvePPC32Relocation(
const SectionEntry &Section, uint64_t Offset,
52 uint64_t Value,
uint32_t Type, int64_t Addend);
54 void resolvePPC64Relocation(
const SectionEntry &Section, uint64_t Offset,
55 uint64_t Value,
uint32_t Type, int64_t Addend);
57 void resolveSystemZRelocation(
const SectionEntry &Section, uint64_t Offset,
58 uint64_t Value,
uint32_t Type, int64_t Addend);
60 void resolveBPFRelocation(
const SectionEntry &Section, uint64_t Offset,
61 uint64_t Value,
uint32_t Type, int64_t Addend);
63 unsigned getMaxStubSize()
override {
68 else if (IsMipsO32ABI || IsMipsN32ABI)
70 else if (IsMipsN64ABI)
82 unsigned getStubAlignment()
override {
89 void setMipsABI(
const ObjectFile &Obj)
override;
98 size_t getGOTEntrySize()
override;
104 uint64_t allocateGOTEntries(
unsigned no);
108 unsigned GOTRelType);
112 void resolveGOTOffsetRelocation(
unsigned SectionID, uint64_t Offset,
117 RelocationEntry computeGOTOffsetRE(uint64_t GOTOffset, uint64_t SymbolOffset,
121 void *computePlaceholderAddress(
unsigned SectionID, uint64_t Offset)
const;
125 void processSimpleRelocation(
unsigned SectionID, uint64_t Offset,
unsigned RelType,
RelocationValueRef Value);
129 bool IsLocal =
false)
const;
132 unsigned GOTSectionID;
137 unsigned CurrentGOTIndex;
158 std::map<RelocationValueRef, uint64_t> GOTOffsetMap;
160 bool relocationNeedsGot(
const RelocationRef &R)
const override;
161 bool relocationNeedsStub(
const RelocationRef &R)
const override;
168 static std::unique_ptr<RuntimeDyldELF>
172 std::unique_ptr<RuntimeDyld::LoadedObjectInfo>
175 void resolveRelocation(
const RelocationEntry &RE, uint64_t Value)
override;
182 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.