aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/ARM/ARMJITInfo.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-09-10 01:23:53 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-09-10 01:23:53 +0000
commit08669746d04468898b094908484946216628d359 (patch)
tree96c5ae3c69e53e2cf49d04323b6e805173bd3c87 /lib/Target/ARM/ARMJITInfo.cpp
parent43e484fbcf6a40a70d9a5c7ea142f37416ef1e68 (diff)
Proper support of non-lazy indirect symbols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81422 91177308-0d34-0410-b5e6-96231b3b80d8
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 754fafe028..24990e67a3 100644
--- a/lib/Target/ARM/ARMJITInfo.cpp
+++ b/lib/Target/ARM/ARMJITInfo.cpp
@@ -145,6 +145,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;