[Support] Support NetBSD PaX MPROTECT in sys::Memory.
authorLang Hames <lhames@gmail.com>
Thu, 16 Nov 2017 23:04:44 +0000 (23:04 +0000)
committerLang Hames <lhames@gmail.com>
Thu, 16 Nov 2017 23:04:44 +0000 (23:04 +0000)
commitafcb70d0319a6e1b97cd74157e61f095cbc769c6
treeee3d3f50ea1b08613a9a1a8aab6ec670de7b2646
parent854a8743e8e1af8636b250834f8d69226d7e2166
[Support] Support NetBSD PaX MPROTECT in sys::Memory.

Removes AllocateRWX, setWritable and setExecutable from sys::Memory and
standardizes on allocateMappedMemory / protectMappedMemory. The
allocateMappedMemory method is updated to request full permissions for memory
blocks so that they can be marked executable later.

llvm-svn: 318464
llvm/include/llvm/Support/Memory.h
llvm/lib/Support/Unix/Memory.inc
llvm/lib/Support/Windows/Memory.inc
llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp