From bc4707a2554ac04ba006bf70035e7bc7270236a9 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Thu, 18 Sep 2008 07:54:21 +0000 Subject: 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 --- include/llvm/System/Memory.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/llvm/System/Memory.h b/include/llvm/System/Memory.h index 014633c..86895e2 100644 --- a/include/llvm/System/Memory.h +++ b/include/llvm/System/Memory.h @@ -69,6 +69,11 @@ namespace sys { /// that has been emitted it must invalidate the instruction cache on some /// platforms. static void InvalidateInstructionCache(const void *Addr, size_t Len); + + /// SetRXPrivilege - Before the JIT can run a block of code, it has to be + /// given read and executable privilege. Return true if it is already r-x + /// or the system is able to change its previlege. + static bool SetRXPrivilege(const void *Addr, size_t Size); }; } } -- cgit v1.1