diff options
author | Andrew Kaylor <andrew.kaylor@intel.com> | 2012-11-15 23:50:01 +0000 |
---|---|---|
committer | Andrew Kaylor <andrew.kaylor@intel.com> | 2012-11-15 23:50:01 +0000 |
commit | 53608a34ce3f0969e9fb01eaa983422761011e03 (patch) | |
tree | 4bddaa89d9ef88b9b2d77a2021e5e079969b3cc9 /include | |
parent | 085f982462257de466267edf036c75defd80fc41 (diff) | |
download | external_llvm-53608a34ce3f0969e9fb01eaa983422761011e03.zip external_llvm-53608a34ce3f0969e9fb01eaa983422761011e03.tar.gz external_llvm-53608a34ce3f0969e9fb01eaa983422761011e03.tar.bz2 |
Interface changes to allow RuntimeDyld memory managers to set memory permissions after an object has been loaded.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168114 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/ExecutionEngine/RuntimeDyld.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/llvm/ExecutionEngine/RuntimeDyld.h b/include/llvm/ExecutionEngine/RuntimeDyld.h index 891f534..c3d160f 100644 --- a/include/llvm/ExecutionEngine/RuntimeDyld.h +++ b/include/llvm/ExecutionEngine/RuntimeDyld.h @@ -48,7 +48,7 @@ public: /// assigned by the JIT engine, and optionally recorded by the memory manager /// to access a loaded section. virtual uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment, - unsigned SectionID) = 0; + unsigned SectionID, bool IsReadOnly) = 0; /// getPointerToNamedFunction - This method returns the address of the /// specified function. As such it is only useful for resolving library @@ -59,6 +59,15 @@ public: /// message to stderr and aborts. virtual void *getPointerToNamedFunction(const std::string &Name, bool AbortOnFailure = true) = 0; + + /// applyPermissions - 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 typically allocate all + /// sections as read-write and then apply specific permissions when + /// this method is called. Returns true if an error occurred, false + /// otherwise. + virtual bool applyPermissions(std::string *ErrMsg = 0) = 0; }; class RuntimeDyld { |