Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Fc4k3-0005ZV-He for mharc-grub-devel@gnu.org; Fri, 05 May 2006 14:09:27 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fc4k2-0005WS-AF for grub-devel@gnu.org; Fri, 05 May 2006 14:09:26 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fc4k0-0005R5-Bf for grub-devel@gnu.org; Fri, 05 May 2006 14:09:25 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fc4k0-0005Qo-0O for grub-devel@gnu.org; Fri, 05 May 2006 14:09:24 -0400 Received: from [194.109.24.22] (helo=smtp-vbr2.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Fc4kC-0000SW-Ll for grub-devel@gnu.org; Fri, 05 May 2006 14:09:37 -0400 Received: from localhost.localdomain (249-174.surfsnel.dsl.internl.net [145.99.174.249]) by smtp-vbr2.xs4all.nl (8.13.6/8.13.6) with ESMTP id k45I9Mes054891 for ; Fri, 5 May 2006 20:09:22 +0200 (CEST) (envelope-from mgerards@xs4all.nl) Mail-Copies-To: mgerards@xs4all.nl To: The development of GRUB 2 References: <002101c66f09$ada21ff0$0b00a8c0@yoda> <87irokn1k8.fsf@xs4all.nl> <1634.213.192.3.1.1146844854.squirrel@drak.ucw.cz> From: Marco Gerards Date: Fri, 05 May 2006 20:11:27 +0200 In-Reply-To: <1634.213.192.3.1.1146844854.squirrel@drak.ucw.cz> (=?iso-8859-2?Q?Tom=E1=B9?= Ebenlendr's message of "Fri, 5 May 2006 18:00:54 +0200 (CEST)") Message-ID: <87ac9wmje8.fsf@xs4all.nl> User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by XS4ALL Virus Scanner Subject: Re: RE : grub-emu state of the art 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: Fri, 05 May 2006 18:09:26 -0000 Tom=E1=B9 Ebenlendr writes: >>> Little changes in source code, though I had to adapt asm files to >>> passing parameters in stack (I compile without -mregparm=3D3 -mrtd opti= ons >>> as I didn't want to recompile the whole C library with those passing >>> parameters conventions). >> >> It would be nice to get this to work for the regular modules too. In >> that case we do not need two set of modules. Besides that, it should >> also work on the PPC, for example. Which is a lot harder. > > I tried that a year ago and I failed: There are lots of hooks, and you > don't know if passed pointer is pointer to function from module > (with -mregparm) or from main binary (w/o -mregparm). > > The only solution that comes to my mind now is to have all function > declaration with -mregparm gcc directives. Then all grub functions > will be with -mregparm and all standard library functions without. > Other option will be recompiling standard libraries or creating some > wrappers for them. But again, we must be careful when manipulating > pointers to functions... Right, which is already being done for the modules. I agree it will be hard to make this work in the right way. It's more important to get modules loading working first, without disturbing anything else. > I was also thinking about throwing the -mregparm stuff away, but other > developers here want it. Right. -- Marco