On Dec 1, 2005, at 7:48 AM, Marco Gerards wrote:
Files affected: kern/mm.c, normal/misc.c
This is probably more a gcc issue (my is gcc version 3.3.3 (NetBSD nb3
20040520)). As of 2.0, NetBSD/i386 uses non-executable mapping of
stack
and thus when nested functions are used it generates call to
__enable_execute_stack() (which is actually in libgcc) even if
-nostdlib
is used. Since I know no way to disable this behavior (but there
might be
some) only workaround known to me is providing dumb
__enable_execute_stack()
functions where apropriate.
When is this required? When using grub-emu or any other userland
utility? In that case GRUB is linked to the C library.
In the case it is used for GRUB itself, it is useless. GRUB executes
within its own environment. So in that case we should just make sure
this doesn't show up. Perhaps by using different compiler flags.
I think this is a problem Peter Jones was telling me about with Fedora
as well (non-executable stack conflicting with nested functions).
Peter, do you know anything about that __enable_execute_stack()?
http://gcc.gnu.org/ml/gcc-patches/2004-07/msg01700.html seems to
indicate it's only for Solaris, NetBSD, FreeBSD/SPARC64 and OSF, but it
sounds like we need it on Linux as well?
-Hollis
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel