13#ifndef LLVM_LIB_EXECUTIONENGINE_RUNTIMEDYLD_RUNTIMEDYLDELF_H
14#define LLVM_LIB_EXECUTIONENGINE_RUNTIMEDYLD_RUNTIMEDYLDELF_H
49 void resolveLoongArch64Relocation(
const SectionEntry &Section,
53 bool resolveLoongArch64ShortBranch(
unsigned SectionID,
57 void resolveLoongArch64Branch(
unsigned SectionID,
77 unsigned getMaxStubSize()
const override {
98 Align getStubAlignment()
override {
105 void setMipsABI(
const ObjectFile &Obj)
override;
121 uint64_t allocateGOTEntries(
unsigned no);
125 unsigned GOTRelType);
129 void resolveGOTOffsetRelocation(
unsigned SectionID,
uint64_t Offset,
138 void *computePlaceholderAddress(
unsigned SectionID,
uint64_t Offset)
const;
146 bool IsLocal =
false)
const;
149 unsigned GOTSectionID;
154 unsigned CurrentGOTIndex;
178 std::map<RelocationValueRef, uint64_t> GOTOffsetMap;
181 unsigned IFuncStubSectionID = 0;
206 void createIFuncStub(
unsigned IFuncStubSectionID,
208 unsigned IFuncSectionID,
uint64_t IFuncOffset);
210 unsigned getMaxIFuncStubSize()
const;
212 void processNewSymbol(
const SymbolRef &ObjSymbol,
214 bool relocationNeedsGot(
const RelocationRef &R)
const override;
215 bool relocationNeedsStub(
const RelocationRef &R)
const override;
219 void processX86_64GOTTPOFFRelocation(
unsigned SectionID,
uint64_t Offset,
224 void processX86_64TLSRelocation(
unsigned SectionID,
uint64_t Offset,
234 static std::unique_ptr<RuntimeDyldELF>
238 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.