From 2932284f045005bc3ed850f9c42524fadf3ae3d8 Mon Sep 17 00:00:00 2001 From: Andrew Kaylor Date: Wed, 31 Oct 2012 20:37:14 +0000 Subject: [PATCH] Mark code, not data, as executable in lli RemoteTarget simulator. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167164 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/lli/RemoteTarget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/lli/RemoteTarget.cpp b/tools/lli/RemoteTarget.cpp index 66743225db7..212bdfda1cd 100644 --- a/tools/lli/RemoteTarget.cpp +++ b/tools/lli/RemoteTarget.cpp @@ -36,13 +36,13 @@ bool RemoteTarget::allocateSpace(size_t Size, unsigned Alignment, bool RemoteTarget::loadData(uint64_t Address, const void *Data, size_t Size) { memcpy ((void*)Address, Data, Size); - sys::MemoryBlock Mem((void*)Address, Size); - sys::Memory::setExecutable(Mem, &ErrorMsg); return false; } bool RemoteTarget::loadCode(uint64_t Address, const void *Data, size_t Size) { memcpy ((void*)Address, Data, Size); + sys::MemoryBlock Mem((void*)Address, Size); + sys::Memory::setExecutable(Mem, &ErrorMsg); return false; }