[llvm-dev] SectionMemoryManager::finalizeMemory ... read only data become executable?

Michal Srb via llvm-dev llvm-dev at lists.llvm.org
Sat Jul 15 04:57:12 PDT 2017


On Saturday, 15 July 2017 05:46:35 CEST 陳韋任  wrote:
> SectionMemoryManager allocates executable memory section for MCJIT
> (JIT emit code then execute).
> So the bottomline is making the section sys::Memory::MF_EXEC. As for
> RODataMem, we also need
> to make sure it's read-only. You can compare it to RWDataMem, which
> has write permission.

That makes sense. My question is why is RODataMem made READ and EXEC? It 
sounds like it should be only READ.

Michal


More information about the llvm-dev mailing list