[llvm-dev] SectionMemoryManager::finalizeMemory ... read only data become executable?
陳韋任 via llvm-dev
llvm-dev at lists.llvm.org
Sat Jul 15 06:03:29 PDT 2017
+ Lang. :-)
2017-07-15 20:58 GMT+08:00 Tim Northover <t.p.northover at gmail.com>:
> 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.
--
Wei-Ren Chen (陳韋任)
Homepage: https://people.cs.nctu.edu.tw/~chenwj
More information about the llvm-dev
mailing list