LLVM API Documentation
#include <RuntimeDyld.h>
Public Member Functions | |
RuntimeDyld (RTDyldMemoryManager *) | |
~RuntimeDyld () | |
ObjectImage * | loadObject (ObjectBuffer *InputBuffer) |
void * | getSymbolAddress (StringRef Name) |
uint64_t | getSymbolLoadAddress (StringRef Name) |
void | resolveRelocations () |
Resolve the relocations for all symbols we currently know about. More... | |
void | mapSectionAddress (const void *LocalAddress, uint64_t TargetAddress) |
void | registerEHFrames () |
void | deregisterEHFrames () |
StringRef | getErrorString () |
Protected Member Functions | |
void | reassignSectionAddress (unsigned SectionID, uint64_t Addr) |
Definition at line 27 of file RuntimeDyld.h.
llvm::RuntimeDyld::RuntimeDyld | ( | RTDyldMemoryManager * | mm | ) |
Definition at line 551 of file RuntimeDyld.cpp.
llvm::RuntimeDyld::~RuntimeDyld | ( | ) |
Definition at line 562 of file RuntimeDyld.cpp.
void llvm::RuntimeDyld::deregisterEHFrames | ( | ) |
Definition at line 642 of file RuntimeDyld.cpp.
Referenced by llvm::MCJIT::~MCJIT().
StringRef llvm::RuntimeDyld::getErrorString | ( | ) |
Definition at line 633 of file RuntimeDyld.cpp.
Referenced by llvm::MCJIT::generateCodeForModule().
void * llvm::RuntimeDyld::getSymbolAddress | ( | StringRef | Name | ) |
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).
Definition at line 607 of file RuntimeDyld.cpp.
uint64_t llvm::RuntimeDyld::getSymbolLoadAddress | ( | StringRef | Name | ) |
Get the address of the target copy of the symbol. This is the address used for relocation.
Definition at line 613 of file RuntimeDyld.cpp.
Referenced by llvm::MCJIT::getExistingSymbolAddress(), and llvm::MCJIT::getPointerToFunction().
ObjectImage * llvm::RuntimeDyld::loadObject | ( | ObjectBuffer * | InputBuffer | ) |
Prepare the object contained in the input buffer for execution. Ownership of the input buffer is transferred to the ObjectImage instance returned from this function if successful. In the case of load failure, the input buffer will be deleted.
Definition at line 566 of file RuntimeDyld.cpp.
References llvm::sys::fs::file_magic::archive, llvm::sys::fs::file_magic::bitcode, llvm::sys::fs::file_magic::coff_import_library, llvm::sys::fs::file_magic::coff_object, llvm::sys::fs::file_magic::elf_core, llvm::sys::fs::file_magic::elf_executable, llvm::sys::fs::file_magic::elf_relocatable, llvm::sys::fs::file_magic::elf_shared_object, llvm::ObjectBuffer::getBuffer(), llvm::sys::fs::identify_magic(), llvm::sys::fs::file_magic::macho_bundle, llvm::sys::fs::file_magic::macho_core, llvm::sys::fs::file_magic::macho_dsym_companion, llvm::sys::fs::file_magic::macho_dynamic_linker, llvm::sys::fs::file_magic::macho_dynamically_linked_shared_lib, llvm::sys::fs::file_magic::macho_dynamically_linked_shared_lib_stub, llvm::sys::fs::file_magic::macho_executable, llvm::sys::fs::file_magic::macho_fixed_virtual_memory_shared_lib, llvm::sys::fs::file_magic::macho_object, llvm::sys::fs::file_magic::macho_preload_executable, llvm::sys::fs::file_magic::macho_universal_binary, llvm::sys::fs::file_magic::pecoff_executable, llvm::report_fatal_error(), llvm::sys::fs::file_magic::unknown, and llvm::sys::fs::file_magic::windows_resource.
Referenced by llvm::MCJIT::generateCodeForModule().
void llvm::RuntimeDyld::mapSectionAddress | ( | const void * | LocalAddress, |
uint64_t | TargetAddress | ||
) |
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.
Definition at line 628 of file RuntimeDyld.cpp.
Referenced by llvm::MCJIT::mapSectionAddress().
|
protected |
Definition at line 623 of file RuntimeDyld.cpp.
void llvm::RuntimeDyld::registerEHFrames | ( | ) |
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.
Definition at line 637 of file RuntimeDyld.cpp.
Referenced by llvm::MCJIT::finalizeLoadedModules().
void llvm::RuntimeDyld::resolveRelocations | ( | ) |
Resolve the relocations for all symbols we currently know about.
Definition at line 619 of file RuntimeDyld.cpp.
Referenced by llvm::MCJIT::finalizeLoadedModules().