In elf32_trans_prot() and when compiling for amd64 or ia64, add

PROT_EXECUTE when PROT_READ is needed. By default i386 allows
execution when reading is allowed and JDK 1.4.x depends on that.
This commit is contained in:
Marcel Moolenaar 2011-10-13 16:16:46 +00:00
parent 97b48ffc93
commit 676eda08d0

View File

@ -1664,6 +1664,12 @@ __elfN(trans_prot)(Elf_Word flags)
prot |= VM_PROT_WRITE;
if (flags & PF_R)
prot |= VM_PROT_READ;
#if __ELF_WORD_SIZE == 32
#if defined(__amd64__) || defined(__ia64__)
if (flags & PF_R)
prot |= VM_PROT_EXECUTE;
#endif
#endif
return (prot);
}