aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/ARM/ARMJITInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/ARM/ARMJITInfo.cpp')
-rw-r--r--lib/Target/ARM/ARMJITInfo.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMJITInfo.cpp b/lib/Target/ARM/ARMJITInfo.cpp
index 3cb346443b..ca9ea1e541 100644
--- a/lib/Target/ARM/ARMJITInfo.cpp
+++ b/lib/Target/ARM/ARMJITInfo.cpp
@@ -147,6 +147,9 @@ void *ARMJITInfo::emitGlobalValueIndirectSym(const GlobalValue *GV, void *Ptr,
llvm_unreachable("ERROR: Unable to mark indirect symbol writable");
}
JCE.emitWordLE((intptr_t)Ptr);
+ if (!sys::Memory::setRangeExecutable((void*)Addr, 4)) {
+ llvm_unreachable("ERROR: Unable to mark indirect symbol executable");
+ }
void *PtrAddr = JCE.finishGVStub(GV);
addIndirectSymAddr(Ptr, (intptr_t)PtrAddr);
return PtrAddr;