crt: Don't make sections executable when not necessary

With this in place, a VirtualProtect implementation in winstorecompat
that just straight redirects to VirtualProtectFromApp will work
fine even on UWP without any codeGeneration capability, as long as
there's no runtime pseudo relocs in code sections. And code compiled by
LLVM (and as far as I've seen, by GCC on x86_64 as well) only places
such references in .data/.rdata.

Signed-off-by: Martin Storsjö <martin@martin.st>
1 file changed