Preliminary support for systems which require changing JIT memory regions privilege from read / write to read / executable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56303 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng
2008-09-18 07:54:21 +00:00
parent 057d0c3535
commit bc4707a255
6 changed files with 54 additions and 1 deletions

View File

@ -86,7 +86,8 @@ Function *ExecutionEngine::FindFunctionNamed(const char *FnName) {
/// existing data in memory.
void ExecutionEngine::addGlobalMapping(const GlobalValue *GV, void *Addr) {
MutexGuard locked(lock);
DOUT << "Map " << *GV << " to " << Addr << "\n";
void *&CurVal = state.getGlobalAddressMap(locked)[GV];
assert((CurVal == 0 || Addr == 0) && "GlobalMapping already established!");
CurVal = Addr;