class RuntimeDyld

Declaration

class RuntimeDyld { /* full declaration omitted */ };

Declared at: llvm/include/llvm/ExecutionEngine/RuntimeDyld.h:58

Member Variables

private std::unique_ptr<RuntimeDyldImpl> Dyld
private llvm::RuntimeDyld::MemoryManager& MemMgr
private llvm::JITSymbolResolver& Resolver
private bool ProcessAllSections
private llvm::RuntimeDyld::NotifyStubEmittedFunction NotifyStubEmitted

Method Overview

Methods

RuntimeDyld(
    llvm::RuntimeDyld::MemoryManager& MemMgr,
    llvm::JITSymbolResolver& Resolver)

Description

Construct a RuntimeDyld instance.

Declared at: llvm/include/llvm/ExecutionEngine/RuntimeDyld.h:193

Parameters

llvm::RuntimeDyld::MemoryManager& MemMgr
llvm::JITSymbolResolver& Resolver

RuntimeDyld(const llvm::RuntimeDyld&)

Declared at: llvm/include/llvm/ExecutionEngine/RuntimeDyld.h:194

Parameters

const llvm::RuntimeDyld&

void deregisterEHFrames()

Declared at: llvm/include/llvm/ExecutionEngine/RuntimeDyld.h:250

void finalizeWithMemoryManagerLocking()

Description

Perform all actions needed to make the code owned by this RuntimeDyld instance executable: 1) Apply relocations. 2) Register EH frames. 3) Update memory permissions*. * Finalization is potentially recursive**, and the 3rd step will only be applied by the outermost call to finalize. This allows different RuntimeDyld instances to share a memory manager without the innermost finalization locking the memory and causing relocation fixup errors in outer instances. ** Recursive finalization occurs when one RuntimeDyld instances needs the address of a symbol owned by some other instance in order to apply relocations.

Declared at: llvm/include/llvm/ExecutionEngine/RuntimeDyld.h:285

llvm::StringRef getErrorString()

Declared at: llvm/include/llvm/ExecutionEngine/RuntimeDyld.h:253

llvm::StringRef getSectionContent(
    unsigned int SectionID) const

Description

Returns the section's working memory.

Declared at: llvm/include/llvm/ExecutionEngine/RuntimeDyld.h:231

Parameters

unsigned int SectionID

uint64_t getSectionLoadAddress(
    unsigned int SectionID) const

Description

If the section was loaded, return the section's load address, otherwise return None.

Declared at: llvm/include/llvm/ExecutionEngine/RuntimeDyld.h:235

Parameters

unsigned int SectionID

llvm::JITEvaluatedSymbol getSymbol(
    llvm::StringRef Name) const

Description

Get the target address and flags for the named symbol. This address is the one used for relocation.

Declared at: llvm/include/llvm/ExecutionEngine/RuntimeDyld.h:212

Parameters

llvm::StringRef Name

void* getSymbolLocalAddress(
    llvm::StringRef Name) const

Description

Get the address of our local copy of the symbol. This may or may not be the address used for relocation (clients can copy the data around and resolve relocatons based on where they put it).

Declared at: llvm/include/llvm/ExecutionEngine/RuntimeDyld.h:205

Parameters

llvm::StringRef Name

unsigned int getSymbolSectionID(
    llvm::StringRef Name) const

Description

Get the section ID for the section containing the given symbol.

Declared at: llvm/include/llvm/ExecutionEngine/RuntimeDyld.h:208

Parameters

llvm::StringRef Name

std::map<StringRef, JITEvaluatedSymbol>
getSymbolTable() const

Description

Returns a copy of the symbol table. This can be used by on-finalized callbacks to extract the symbol table before throwing away the RuntimeDyld instance. Because the map keys (StringRefs) are backed by strings inside the RuntimeDyld instance, the map should be processed before the RuntimeDyld instance is discarded.

Declared at: llvm/include/llvm/ExecutionEngine/RuntimeDyld.h:219

bool hasError()

Declared at: llvm/include/llvm/ExecutionEngine/RuntimeDyld.h:252

std::unique_ptr<LoadedObjectInfo> loadObject(
    const object::ObjectFile& O)

Description

Add the referenced object file to the list of objects to be loaded and relocated.

Declared at: llvm/include/llvm/ExecutionEngine/RuntimeDyld.h:200

Parameters

const object::ObjectFile& O

void mapSectionAddress(const void* LocalAddress,
                       uint64_t TargetAddress)

Description

Map a section to its target address space value. Map the address of a JIT section as returned from the memory manager to the address in the target process as the running code will see it. This is the address which will be used for relocation resolution.

Declared at: llvm/include/llvm/ExecutionEngine/RuntimeDyld.h:228

Parameters

const void* LocalAddress
uint64_t TargetAddress

void reassignSectionAddress(
    unsigned int SectionID,
    uint64_t Addr)

Declared at: llvm/include/llvm/ExecutionEngine/RuntimeDyld.h:62

Parameters

unsigned int SectionID
uint64_t Addr

void registerEHFrames()

Description

Register any EH frame sections that have been loaded but not previously registered with the memory manager. Note, RuntimeDyld is responsible for identifying the EH frame and calling the memory manager with the EH frame section data. However, the memory manager itself will handle the actual target-specific EH frame registration.

Declared at: llvm/include/llvm/ExecutionEngine/RuntimeDyld.h:248

void resolveRelocations()

Description

Resolve the relocations for all symbols we currently know about.

Declared at: llvm/include/llvm/ExecutionEngine/RuntimeDyld.h:222

void setNotifyStubEmitted(
    llvm::RuntimeDyld::NotifyStubEmittedFunction
        NotifyStubEmitted)

Description

Set the NotifyStubEmitted callback. This is used for debugging purposes. A callback is made for each stub that is generated.

Declared at: llvm/include/llvm/ExecutionEngine/RuntimeDyld.h:239

Parameters

llvm::RuntimeDyld::NotifyStubEmittedFunction NotifyStubEmitted

void setProcessAllSections(
    bool ProcessAllSections)

Description

By default, only sections that are "required for execution" are passed to the RTDyldMemoryManager, and other sections are discarded. Passing 'true' to this method will cause RuntimeDyld to pass all sections to its memory manager regardless of whether they are "required to execute" in the usual sense. This is useful for inspecting metadata sections that may not contain relocations, E.g. Debug info, stackmaps. Must be called before the first object file is loaded.

Declared at: llvm/include/llvm/ExecutionEngine/RuntimeDyld.h:263

Parameters

bool ProcessAllSections

~RuntimeDyld()

Declared at: llvm/include/llvm/ExecutionEngine/RuntimeDyld.h:196