Commit 70b62c97 authored by Ben Gamari's avatar Ben Gamari 🐢 Committed by Marge Bot

mmap: Factor out protection flags

parent 214d8122
......@@ -1023,15 +1023,14 @@ mmap_again:
map_addr = mmap_32bit_base;
}
const int prot = PROT_READ | PROT_WRITE | PROT_EXEC;
IF_DEBUG(linker,
debugBelch("mmapForLinker: \tprotection %#0x\n",
PROT_EXEC | PROT_READ | PROT_WRITE));
debugBelch("mmapForLinker: \tprotection %#0x\n", prot));
IF_DEBUG(linker,
debugBelch("mmapForLinker: \tflags %#0x\n",
MAP_PRIVATE | tryMap32Bit | fixed | flags));
result = mmap(map_addr, size,
PROT_EXEC|PROT_READ|PROT_WRITE,
result = mmap(map_addr, size, prot,
MAP_PRIVATE|tryMap32Bit|fixed|flags, fd, offset);
if (result == MAP_FAILED) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment