class RuntimeDyldMachO
Declaration
class RuntimeDyldMachO : public RuntimeDyldImpl { /* full declaration omitted */ };
Declared at: llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h:26
Inherits from: RuntimeDyldImpl
Member Variables
- protected SmallVector<llvm::RuntimeDyldMachO:: EHFrameRelatedSections, 2> UnregisteredEHFrameSections
Inherited from RuntimeDyldImpl:
- protected MemMgr
- protected Resolver
- protected Sections
- protected GlobalSymbolTable
- protected Relocations
- protected ExternalSymbolRelocations
- protected Arch
- protected IsTargetLittleEndian
- protected IsMipsO32ABI
- protected IsMipsN32ABI
- protected IsMipsN64ABI
- protected ProcessAllSections
- protected lock
- protected NotifyStubEmitted
- protected HasError
- protected ErrorStr
- protected static AbsoluteSymbolSection = ~0U
Method Overview
- protected RuntimeDyldMachO(RuntimeDyld::MemoryManager & MemMgr, llvm::JITSymbolResolver & Resolver)
- public static std::unique_ptr<RuntimeDyldMachO> create(Triple::ArchType Arch, RuntimeDyld::MemoryManager & MemMgr, llvm::JITSymbolResolver & Resolver)
- protected void dumpRelocationToResolve(const llvm::RelocationEntry & RE, uint64_t Value) const
- protected llvm::RelocationEntry getRelocationEntry(unsigned int SectionID, const llvm::object::ObjectFile & BaseTObj, const llvm::object::relocation_iterator & RI) const
- protected Expected<llvm::RelocationValueRef> getRelocationValueRef(const llvm::object::ObjectFile & BaseTObj, const llvm::object::relocation_iterator & RI, const llvm::RelocationEntry & RE, llvm::RuntimeDyldImpl::ObjSectionToIDMap & ObjSectionToID)
- public llvm::SectionEntry & getSection(unsigned int SectionID)
- protected static llvm::object::section_iterator getSectionByAddress(const llvm::object::MachOObjectFile & Obj, uint64_t Addr)
- public bool isCompatibleFile(const object::ObjectFile & Obj) const
- public std::unique_ptr<RuntimeDyld::LoadedObjectInfo> loadObject(const object::ObjectFile & O)
- protected void makeValueAddendPCRel(llvm::RelocationValueRef & Value, const llvm::object::relocation_iterator & RI, unsigned int OffsetToNextPC)
- protected int64_t memcpyAddend(const llvm::RelocationEntry & RE) const
- protected llvm::Error populateIndirectSymbolPointersSection(const llvm::object::MachOObjectFile & Obj, const llvm::object::SectionRef & PTSection, unsigned int PTSectionID)
- protected Expected<llvm::object::relocation_iterator> processScatteredVANILLA(unsigned int SectionID, llvm::object::relocation_iterator RelI, const llvm::object::ObjectFile & BaseObjT, RuntimeDyldMachO::ObjSectionToIDMap & ObjSectionToID, bool TargetIsLocalThumbFunc = false)
Inherited from RuntimeDyldImpl:
- protected addRelocationForSection
- protected addRelocationForSymbol
- protected applyExternalSymbolRelocations
- public clearError
- protected computeGOTSize
- protected computeSectionStubBufSize
- protected computeTotalAllocSize
- protected createStubFunction
- public deregisterEHFrames
- protected emitCommonSymbols
- protected emitSection
- public finalizeAsync
- public finalizeLoad
- protected findOrEmitSection
- public getErrorString
- protected getGOTEntrySize
- protected getJITSymbolFlags
- protected getMaxStubSize
- public getSectionAddress
- public getSectionContent
- public getSectionLoadAddress
- protected getStubAlignment
- public getSymbol
- public getSymbolLocalAddress
- public getSymbolSectionID
- public getSymbolTable
- public hasError
- public isCompatibleFile
- public loadObject
- protected loadObjectImpl
- public mapSectionAddress
- protected modifyAddressBasedOnFlags
- protected processRelocationRef
- protected readBytesUnaligned
- public reassignSectionAddress
- public registerEHFrames
- protected relocationNeedsGot
- protected relocationNeedsStub
- protected resolveExternalSymbols
- public resolveLocalRelocations
- protected resolveRelocation
- protected resolveRelocationList
- public resolveRelocations
- protected setMipsABI
- public setNotifyStubEmitted
- public setProcessAllSections
- protected writeBytesUnaligned
- protected writeInt16BE
- protected writeInt32BE
- protected writeInt64BE
Methods
¶RuntimeDyldMachO(
RuntimeDyld::MemoryManager& MemMgr,
llvm::JITSymbolResolver& Resolver)
RuntimeDyldMachO(
RuntimeDyld::MemoryManager& MemMgr,
llvm::JITSymbolResolver& Resolver)
Declared at: llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h:51
Parameters
- RuntimeDyld::MemoryManager& MemMgr
- llvm::JITSymbolResolver& Resolver
¶static std::unique_ptr<RuntimeDyldMachO> create(
Triple::ArchType Arch,
RuntimeDyld::MemoryManager& MemMgr,
llvm::JITSymbolResolver& Resolver)
static std::unique_ptr<RuntimeDyldMachO> create(
Triple::ArchType Arch,
RuntimeDyld::MemoryManager& MemMgr,
llvm::JITSymbolResolver& Resolver)
Description
Create a RuntimeDyldMachO instance for the given target architecture.
Declared at: llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h:125
Parameters
- Triple::ArchType Arch
- RuntimeDyld::MemoryManager& MemMgr
- llvm::JITSymbolResolver& Resolver
¶void dumpRelocationToResolve(
const llvm::RelocationEntry& RE,
uint64_t Value) const
void dumpRelocationToResolve(
const llvm::RelocationEntry& RE,
uint64_t Value) const
Description
Dump information about the relocation entry (RE) and resolved value.
Declared at: llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h:109
Parameters
- const llvm::RelocationEntry& RE
- uint64_t Value
¶llvm::RelocationEntry getRelocationEntry(
unsigned int SectionID,
const llvm::object::ObjectFile& BaseTObj,
const llvm::object::relocation_iterator& RI)
const
llvm::RelocationEntry getRelocationEntry(
unsigned int SectionID,
const llvm::object::ObjectFile& BaseTObj,
const llvm::object::relocation_iterator& RI)
const
Description
Given a relocation_iterator for a non-scattered relocation, construct a RelocationEntry and fill in the common fields. The 'Addend' field is *not* filled in, since immediate encodings are highly target/opcode specific. For targets/opcodes with simple, contiguous immediates (e.g. X86) the memcpyAddend method can be used to read the immediate.
Declared at: llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h:64
Parameters
- unsigned int SectionID
- const llvm::object::ObjectFile& BaseTObj
- const llvm::object::relocation_iterator& RI
¶Expected<llvm::RelocationValueRef>
getRelocationValueRef(
const llvm::object::ObjectFile& BaseTObj,
const llvm::object::relocation_iterator& RI,
const llvm::RelocationEntry& RE,
llvm::RuntimeDyldImpl::ObjSectionToIDMap&
ObjSectionToID)
Expected<llvm::RelocationValueRef>
getRelocationValueRef(
const llvm::object::ObjectFile& BaseTObj,
const llvm::object::relocation_iterator& RI,
const llvm::RelocationEntry& RE,
llvm::RuntimeDyldImpl::ObjSectionToIDMap&
ObjSectionToID)
Description
Construct a RelocationValueRef representing the relocation target. For Symbols in known sections, this will return a RelocationValueRef representing a (SectionID, Offset) pair. For Symbols whose section is not known, this will return a (SymbolName, Offset) pair, where the Offset is taken from the instruction immediate (held in RE.Addend). In both cases the Addend field is *NOT* fixed up to be PC-relative. That should be done by the caller where appropriate by calling makePCRel on the RelocationValueRef.
Declared at: llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h:98
Parameters
- const llvm::object::ObjectFile& BaseTObj
- const llvm::object::relocation_iterator& RI
- const llvm::RelocationEntry& RE
- llvm::RuntimeDyldImpl::ObjSectionToIDMap& ObjSectionToID
¶llvm::SectionEntry& getSection(
unsigned int SectionID)
llvm::SectionEntry& getSection(
unsigned int SectionID)
Declared at: llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h:132
Parameters
- unsigned int SectionID
¶static llvm::object::section_iterator
getSectionByAddress(
const llvm::object::MachOObjectFile& Obj,
uint64_t Addr)
static llvm::object::section_iterator
getSectionByAddress(
const llvm::object::MachOObjectFile& Obj,
uint64_t Addr)
Declared at: llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h:112
Parameters
- const llvm::object::MachOObjectFile& Obj
- uint64_t Addr
¶bool isCompatibleFile(
const object::ObjectFile& Obj) const
bool isCompatibleFile(
const object::ObjectFile& Obj) const
Declared at: llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h:134
Parameters
- const object::ObjectFile& Obj
¶std::unique_ptr<RuntimeDyld::LoadedObjectInfo>
loadObject(const object::ObjectFile& O)
std::unique_ptr<RuntimeDyld::LoadedObjectInfo>
loadObject(const object::ObjectFile& O)
Declared at: llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h:130
Parameters
- const object::ObjectFile& O
¶void makeValueAddendPCRel(
llvm::RelocationValueRef& Value,
const llvm::object::relocation_iterator& RI,
unsigned int OffsetToNextPC)
void makeValueAddendPCRel(
llvm::RelocationValueRef& Value,
const llvm::object::relocation_iterator& RI,
unsigned int OffsetToNextPC)
Description
Make the RelocationValueRef addend PC-relative.
Declared at: llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h:104
Parameters
- llvm::RelocationValueRef& Value
- const llvm::object::relocation_iterator& RI
- unsigned int OffsetToNextPC
¶int64_t memcpyAddend(
const llvm::RelocationEntry& RE) const
int64_t memcpyAddend(
const llvm::RelocationEntry& RE) const
Description
This convenience method uses memcpy to extract a contiguous addend (the addend size and offset are taken from the corresponding fields of the RE).
Declared at: llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h:57
Parameters
- const llvm::RelocationEntry& RE
¶llvm::Error populateIndirectSymbolPointersSection(
const llvm::object::MachOObjectFile& Obj,
const llvm::object::SectionRef& PTSection,
unsigned int PTSectionID)
llvm::Error populateIndirectSymbolPointersSection(
const llvm::object::MachOObjectFile& Obj,
const llvm::object::SectionRef& PTSection,
unsigned int PTSectionID)
Declared at: llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h:117
Parameters
- const llvm::object::MachOObjectFile& Obj
- const llvm::object::SectionRef& PTSection
- unsigned int PTSectionID
¶Expected<llvm::object::relocation_iterator>
processScatteredVANILLA(
unsigned int SectionID,
llvm::object::relocation_iterator RelI,
const llvm::object::ObjectFile& BaseObjT,
RuntimeDyldMachO::ObjSectionToIDMap&
ObjSectionToID,
bool TargetIsLocalThumbFunc = false)
Expected<llvm::object::relocation_iterator>
processScatteredVANILLA(
unsigned int SectionID,
llvm::object::relocation_iterator RelI,
const llvm::object::ObjectFile& BaseObjT,
RuntimeDyldMachO::ObjSectionToIDMap&
ObjSectionToID,
bool TargetIsLocalThumbFunc = false)
Description
Process a scattered vanilla relocation.
Declared at: llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h:83
Parameters
- unsigned int SectionID
- llvm::object::relocation_iterator RelI
- const llvm::object::ObjectFile& BaseObjT
- RuntimeDyldMachO::ObjSectionToIDMap& ObjSectionToID
- bool TargetIsLocalThumbFunc = false