Subject: Re: kern/30008 & NetBSD 3.0_BETA: "cannot enable executable stack"
To: None <>
From: Christos Zoulas <>
List: current-users
Date: 10/26/2005 03:01:43
In article <20051026023350.GA2853@slab.colubris.lan>,
Brian de Alwis  <> wrote:
>I upgraded my machine to the NetBSD 3.0_BETA from the NetBSD-daily
>build of 20051020.  Everything's worked fine, except now many of
>my linux programs are barfing with errors like:
>    ShadowDesktopRun: error while loading shared libraries:
>cannot enable executable stack as shared object requires: Permission
>I get this with a number of programs, include the Sun JDK,
>mozilla-linux, and others.  Unfortunately I need the JDK for my
>Hunting around for the last while, I stumbled across kern/30008
>and some other messages, but I've found not solutions.
>On the Linux side, I found references to a command execstack(8),
>part of a prelink package.  I've hunted this down to
><>; unfortunately none of
>the Linux boxes I have access to come with this program, and it's
>not willingly compiling on the SuSE boxes here.s
>As I try to figure out how to get it to compile, I thought I'd post
>this to see if anybody else had come up with a better solution.

Index: linux_exec_machdep.c
RCS file: /cvsroot/src/sys/compat/linux/arch/i386/linux_exec_machdep.c,v
retrieving revision 1.2
diff -u -u -r1.2 linux_exec_machdep.c
--- linux_exec_machdep.c	26 Feb 2005 23:10:19 -0000	1.2
+++ linux_exec_machdep.c	26 Oct 2005 03:00:47 -0000
@@ -123,7 +123,8 @@
 	KASSERT(access_size > 0);
 	NEW_VMCMD(&epp->ep_vmcmds, vmcmd_map_zero, access_size,
-	    access_linear_min, NULLVP, 0, VM_PROT_READ | VM_PROT_WRITE);
+	    access_linear_min, NULLVP, 0, VM_PROT_READ | VM_PROT_WRITE |
 	return 0;