Author: marcel
Date: Thu Oct 13 16:16:46 2011
New Revision: 226342
URL: http://svn.freebsd.org/changeset/base/226342

Log:
  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.

Modified:
  head/sys/kern/imgact_elf.c

Modified: head/sys/kern/imgact_elf.c
==============================================================================
--- head/sys/kern/imgact_elf.c  Thu Oct 13 14:20:27 2011        (r226341)
+++ head/sys/kern/imgact_elf.c  Thu Oct 13 16:16:46 2011        (r226342)
@@ -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);
 }
 
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to