diff options
author | Andrew Kaylor <andrew.kaylor@intel.com> | 2013-10-04 00:49:38 +0000 |
---|---|---|
committer | Andrew Kaylor <andrew.kaylor@intel.com> | 2013-10-04 00:49:38 +0000 |
commit | b868e9101c138016aad5bd910b67f40a3213d6fc (patch) | |
tree | b05a180526bddc492c2860fc27dfecb3215995c5 /include | |
parent | 7c9659a3b297be6298ffae4656b86797295c5d58 (diff) | |
download | external_llvm-b868e9101c138016aad5bd910b67f40a3213d6fc.zip external_llvm-b868e9101c138016aad5bd910b67f40a3213d6fc.tar.gz external_llvm-b868e9101c138016aad5bd910b67f40a3213d6fc.tar.bz2 |
Adding support and tests for multiple module handling in lli
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191938 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/ExecutionEngine/RTDyldMemoryManager.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/include/llvm/ExecutionEngine/RTDyldMemoryManager.h b/include/llvm/ExecutionEngine/RTDyldMemoryManager.h index 5932687..09a5cb4 100644 --- a/include/llvm/ExecutionEngine/RTDyldMemoryManager.h +++ b/include/llvm/ExecutionEngine/RTDyldMemoryManager.h @@ -21,6 +21,9 @@ namespace llvm { +class ExecutionEngine; +class ObjectImage; + // RuntimeDyld clients often want to handle the memory management of // what gets placed where. For JIT clients, this is the subset of // JITMemoryManager required for dynamic loading of binaries. @@ -41,7 +44,7 @@ public: virtual uint8_t *allocateCodeSection( uintptr_t Size, unsigned Alignment, unsigned SectionID, StringRef SectionName) = 0; - + /// Allocate a memory block of (at least) the given size suitable for data. /// The SectionID is a unique identifier assigned by the JIT engine, and /// optionally recorded by the memory manager to access a loaded section. @@ -63,11 +66,24 @@ public: /// found, this function returns a null pointer. Otherwise, it prints a /// message to stderr and aborts. /// - /// This function is deprecated for memory managers used to be used with + /// This function is deprecated for memory managers to be used with /// MCJIT or RuntimeDyld. Use getSymbolAddress instead. virtual void *getPointerToNamedFunction(const std::string &Name, bool AbortOnFailure = true); + /// This method is called after an object has been loaded into memory but + /// before relocations are applied to the loaded sections. The object load + /// may have been initiated by MCJIT to resolve an external symbol for another + /// object that is being finalized. In that case, the object about which + /// the memory manager is being notified will be finalized immediately after + /// the memory manager returns from this call. + /// + /// Memory managers which are preparing code for execution in an external + /// address space can use this call to remap the section addresses for the + /// newly loaded object. + virtual void notifyObjectLoaded(ExecutionEngine *EE, + const ObjectImage *) {} + /// This method is called when object loading is complete and section page /// permissions can be applied. It is up to the memory manager implementation /// to decide whether or not to act on this method. The memory manager will |