[llvm-dev] SectionMemoryManager::finalizeMemory ... read only data become executable?
Tim Northover via llvm-dev
llvm-dev at lists.llvm.org
Sat Jul 15 05:58:07 PDT 2017
On 15 July 2017 at 08:55, 陳韋任 via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> I guess my reply is a little bit misleading. Since JIT will emit and
> *execute* code in the memory,
Not all bytes that get emitted are intended to be executed. In ELF
section terms, .text needs to be executable, but .rodata doesn't. It
contains data that will be loaded by the actual instructions so it
needs to be readable, but making it executable is a potential security
risk.
Cheers.
Tim.
More information about the llvm-dev
mailing list