Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1EhqsH-00049d-GN for mharc-grub-devel@gnu.org; Thu, 01 Dec 2005 11:01:33 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ehqs8-000454-Bc for grub-devel@gnu.org; Thu, 01 Dec 2005 11:01:24 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ehqs4-00041l-0f for grub-devel@gnu.org; Thu, 01 Dec 2005 11:01:21 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ehqqv-0003bp-VP for grub-devel@gnu.org; Thu, 01 Dec 2005 11:00:10 -0500 Received: from [209.86.89.68] (helo=smtpauth08.mail.atl.earthlink.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Ehqqv-0001mW-LL for grub-devel@gnu.org; Thu, 01 Dec 2005 11:00:09 -0500 Received: from [32.97.110.142] (helo=[192.168.0.101]) by smtpauth08.mail.atl.earthlink.net with asmtp (Exim 4.34) id 1Ehqqt-0005a3-VL; Thu, 01 Dec 2005 11:00:08 -0500 In-Reply-To: <87u0dt9bdt.fsf@xs4all.nl> References: <1372.158.195.32.9.1133361813.squirrel@158.195.32.9> <87u0dt9bdt.fsf@xs4all.nl> Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Hollis Blanchard Date: Thu, 1 Dec 2005 10:00:05 -0600 To: The development of GRUB 2 X-Mailer: Apple Mail (2.623) X-ELNK-Trace: 77a46389d001b1f223bcf3e39c2f8b5f1aa676d7e74259b7b3291a7d08dfec793220cc136adb225b35f5a87e8c624373350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 32.97.110.142 Cc: Subject: Re: [PATCH] NetBSD/i386 port X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2005 16:01:27 -0000 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