class RuntimeDyldMachOARM

Declaration

class RuntimeDyldMachOARM : public RuntimeDyldMachOCRTPBase { /* full declaration omitted */ };

Description

RuntimeDyldMachOTarget - Templated base class for generic MachO linker algorithms and data structures. Concrete, target specific sub-classes can be accessed via the impl() methods. (i.e. the RuntimeDyldMachO hierarchy uses the Curiously Recurring Template Idiom). Concrete subclasses for each target can be found in ./Targets.

Declared at: llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h:18

Inherits from: RuntimeDyldMachOCRTPBase

Method Overview

  • public RuntimeDyldMachOARM(RuntimeDyld::MemoryManager & MM, llvm::JITSymbolResolver & Resolver)
  • public Expected<int64_t> decodeAddend(const llvm::RelocationEntry & RE) const
  • public llvm::Error finalizeSection(const llvm::object::ObjectFile & Obj, unsigned int SectionID, const llvm::object::SectionRef & Section)
  • public Expected<llvm::JITSymbolFlags> getJITSymbolFlags(const llvm::object::SymbolRef & SR)
  • public unsigned int getMaxStubSize() const
  • public unsigned int getStubAlignment()
  • public bool isAddrTargetThumb(unsigned int SectionID, uint64_t Offset)
  • public uint64_t modifyAddressBasedOnFlags(uint64_t Addr, llvm::JITSymbolFlags Flags) const
  • private void processBranchRelocation(const llvm::RelocationEntry & RE, const llvm::RelocationValueRef & Value, llvm::RuntimeDyldImpl::StubMap & Stubs)
  • private Expected<llvm::object::relocation_iterator> processHALFSECTDIFFRelocation(unsigned int SectionID, llvm::object::relocation_iterator RelI, const llvm::object::ObjectFile & BaseTObj, llvm::RuntimeDyldImpl::ObjSectionToIDMap & ObjSectionToID)
  • public Expected<llvm::object::relocation_iterator> processRelocationRef(unsigned int SectionID, llvm::object::relocation_iterator RelI, const llvm::object::ObjectFile & BaseObjT, llvm::RuntimeDyldImpl::ObjSectionToIDMap & ObjSectionToID, llvm::RuntimeDyldImpl::StubMap & Stubs)
  • public void resolveRelocation(const llvm::RelocationEntry & RE, uint64_t Value)

Methods

RuntimeDyldMachOARM(
    RuntimeDyld::MemoryManager& MM,
    llvm::JITSymbolResolver& Resolver)

Declared at: llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h:27

Parameters

RuntimeDyld::MemoryManager& MM
llvm::JITSymbolResolver& Resolver

Expected<int64_t> decodeAddend(
    const llvm::RelocationEntry& RE) const

Declared at: llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h:62

Parameters

const llvm::RelocationEntry& RE

llvm::Error finalizeSection(
    const llvm::object::ObjectFile& Obj,
    unsigned int SectionID,
    const llvm::object::SectionRef& Section)

Declared at: llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h:288

Parameters

const llvm::object::ObjectFile& Obj
unsigned int SectionID
const llvm::object::SectionRef& Section

Expected<llvm::JITSymbolFlags> getJITSymbolFlags(
    const llvm::object::SymbolRef& SR)

Description

Generate JITSymbolFlags from a libObject symbol.

Declared at: llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h:35

Parameters

const llvm::object::SymbolRef& SR

unsigned int getMaxStubSize() const

Declared at: llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h:31

unsigned int getStubAlignment()

Declared at: llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h:33

bool isAddrTargetThumb(unsigned int SectionID,
                       uint64_t Offset)

Declared at: llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h:50

Parameters

unsigned int SectionID
uint64_t Offset

uint64_t modifyAddressBasedOnFlags(
    uint64_t Addr,
    llvm::JITSymbolFlags Flags) const

Description

Modify the given target address based on the given symbol flags. This can be used by subclasses to tweak addresses based on symbol flags, For example: the MachO/ARM target uses it to set the low bit if the target is a thumb symbol.

Declared at: llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h:43

Parameters

uint64_t Addr
llvm::JITSymbolFlags Flags

void processBranchRelocation(
    const llvm::RelocationEntry& RE,
    const llvm::RelocationValueRef& Value,
    llvm::RuntimeDyldImpl::StubMap& Stubs)

Declared at: llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h:304

Parameters

const llvm::RelocationEntry& RE
const llvm::RelocationValueRef& Value
llvm::RuntimeDyldImpl::StubMap& Stubs

Expected<llvm::object::relocation_iterator>
processHALFSECTDIFFRelocation(
    unsigned int SectionID,
    llvm::object::relocation_iterator RelI,
    const llvm::object::ObjectFile& BaseTObj,
    llvm::RuntimeDyldImpl::ObjSectionToIDMap&
        ObjSectionToID)

Declared at: llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h:344

Parameters

unsigned int SectionID
llvm::object::relocation_iterator RelI
const llvm::object::ObjectFile& BaseTObj
llvm::RuntimeDyldImpl::ObjSectionToIDMap& ObjSectionToID

Expected<llvm::object::relocation_iterator>
processRelocationRef(
    unsigned int SectionID,
    llvm::object::relocation_iterator RelI,
    const llvm::object::ObjectFile& BaseObjT,
    llvm::RuntimeDyldImpl::ObjSectionToIDMap&
        ObjSectionToID,
    llvm::RuntimeDyldImpl::StubMap& Stubs)

Description

Parses one or more object file relocations (some object files use relocation pairs) and stores it to Relocations or SymbolRelocations (this depends on the object file type).

Declared at: llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h:100

Parameters

unsigned int SectionID
llvm::object::relocation_iterator RelI
const llvm::object::ObjectFile& BaseObjT
llvm::RuntimeDyldImpl::ObjSectionToIDMap& ObjSectionToID
llvm::RuntimeDyldImpl::StubMap& Stubs

Returns

Iterator to the next relocation that needs to be parsed.

void resolveRelocation(
    const llvm::RelocationEntry& RE,
    uint64_t Value)

Description

A object file specific relocation resolver

Declared at: llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h:202

Parameters

const llvm::RelocationEntry& RE
The relocation to be resolved
uint64_t Value
Target symbol address to apply the relocation action