From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1NNcwr-0002M9-Ac for mharc-grub-devel@gnu.org; Wed, 23 Dec 2009 20:57:05 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NNcwp-0002Lv-Tx for grub-devel@gnu.org; Wed, 23 Dec 2009 20:57:03 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NNcwl-0002Io-27 for grub-devel@gnu.org; Wed, 23 Dec 2009 20:57:03 -0500 Received: from [199.232.76.173] (port=37129 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NNcwk-0002If-V1 for grub-devel@gnu.org; Wed, 23 Dec 2009 20:56:58 -0500 Received: from iona.labri.fr ([147.210.8.143]:38901) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NNcwk-00018d-DQ for grub-devel@gnu.org; Wed, 23 Dec 2009 20:56:58 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by iona.labri.fr (Postfix) with ESMTP id 14D4B36B7A for ; Thu, 24 Dec 2009 02:56:57 +0100 (CET) X-Virus-Scanned: amavisd-new at labri.fr Received: from iona.labri.fr ([127.0.0.1]) by localhost (iona.labri.fr [127.0.0.1]) (amavisd-new, port 10027) with LMTP id EdAHWLfi8xRY for ; Thu, 24 Dec 2009 02:56:57 +0100 (CET) Received: from [192.168.1.50] (c2433-1-88-160-112-182.fbx.proxad.net [88.160.112.182]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by iona.labri.fr (Postfix) with ESMTP id DA7DB36B73 for ; Thu, 24 Dec 2009 02:56:56 +0100 (CET) Message-ID: <4B32CA68.6090404@labri.fr> Date: Thu, 24 Dec 2009 02:56:56 +0100 From: =?ISO-8859-1?Q?Gr=E9goire_Sutre?= User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090707) MIME-Version: 1.0 To: The development of GNU GRUB References: <4B32821F.6050607@labri.fr> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: Re: Non-static variables and nested function pointers [bug #28392] X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Dec 2009 01:57:04 -0000 Seth Goldberg wrote: > Your problem is probably lack of executable stack support, or at leas= t=20 > you haven't linked your application with a linker mapfile that specifie= s=20 > an executable stack -- the callbacks require the use of trampolines to=20 > access local variables, which require an executable stack. Thanks a lot for your answer ! That explains it :-) I tried linking with -Wl,-z,execstack, but with no success, even though=20 readelf shows a new header with this option: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RWE 0x4 But the problem may come from NetBSD's default policy of non-executable=20 stack on i386 (http://www.netbsd.org/docs/kernel/non-exec.html). I'll have to dig further... Thanks again, Gr=E9goire