summaryrefslogtreecommitdiffstats
path: root/llvm/tools/lli/lli.cpp
diff options
context:
space:
mode:
authorAndrew Kaylor <andrew.kaylor@intel.com>2012-11-15 23:50:01 +0000
committerAndrew Kaylor <andrew.kaylor@intel.com>2012-11-15 23:50:01 +0000
commita342cb9613d33a50e25800d1d2414bec31249ab6 (patch)
tree7f0814847e10d3f1ce87575c47321120964f387c /llvm/tools/lli/lli.cpp
parentdcc794906556b5e7fbf407226a725ed13fd8287e (diff)
downloadbcm5719-llvm-a342cb9613d33a50e25800d1d2414bec31249ab6.tar.gz
bcm5719-llvm-a342cb9613d33a50e25800d1d2414bec31249ab6.zip
Interface changes to allow RuntimeDyld memory managers to set memory permissions after an object has been loaded.
llvm-svn: 168114
Diffstat (limited to 'llvm/tools/lli/lli.cpp')
-rw-r--r--llvm/tools/lli/lli.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/tools/lli/lli.cpp b/llvm/tools/lli/lli.cpp
index d41a595de85..fa4669dec63 100644
--- a/llvm/tools/lli/lli.cpp
+++ b/llvm/tools/lli/lli.cpp
@@ -231,11 +231,13 @@ public:
unsigned SectionID);
virtual uint8_t *allocateDataSection(uintptr_t Size, unsigned Alignment,
- unsigned SectionID);
+ unsigned SectionID, bool IsReadOnly);
virtual void *getPointerToNamedFunction(const std::string &Name,
bool AbortOnFailure = true);
+ virtual bool applyPermissions(std::string *ErrMsg) { return false; }
+
// Invalidate instruction cache for code sections. Some platforms with
// separate data cache and instruction cache require explicit cache flush,
// otherwise JIT code manipulations (like resolved relocations) will get to
@@ -301,7 +303,8 @@ public:
uint8_t *LLIMCJITMemoryManager::allocateDataSection(uintptr_t Size,
unsigned Alignment,
- unsigned SectionID) {
+ unsigned SectionID,
+ bool IsReadOnly) {
if (!Alignment)
Alignment = 16;
// Ensure that enough memory is requested to allow aligning.
OpenPOWER on IntegriCloud