From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CaDnw-0003Eb-8e for mharc-grub-devel@gnu.org; Fri, 03 Dec 2004 08:49:00 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CaDnu-0003EN-AJ for grub-devel@gnu.org; Fri, 03 Dec 2004 08:48:58 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CaDnt-0003Dz-Ga for grub-devel@gnu.org; Fri, 03 Dec 2004 08:48:57 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CaDnt-0003De-85 for grub-devel@gnu.org; Fri, 03 Dec 2004 08:48:57 -0500 Received: from [193.45.208.6] (helo=griffin.skarpodata.com) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CaDeC-0006W2-M8 for grub-devel@gnu.org; Fri, 03 Dec 2004 08:38:57 -0500 Received: from localhost.localdomain (183.201.216.81.s-s.siw.siwnet.net [81.216.201.183]) by griffin.skarpodata.com (8.12.10/8.12.10) with ESMTP id iB3F3Xld002289; Fri, 3 Dec 2004 16:03:33 +0100 To: The development of GRUB 2 References: <20041203053646.GA22463@miracle> <87mzwvlf4o.fsf@marco.marco-g.com> From: Johan Rydberg Date: Fri, 03 Dec 2004 14:49:35 +0100 In-Reply-To: <87mzwvlf4o.fsf@marco.marco-g.com> (Marco Gerards's message of "Fri, 03 Dec 2004 12:50:47 +0000") Message-ID: <87fz2ntrtc.fsf@night.trouble.net> User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Subject: Re: [ppc patch] grub-mkimage 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, 03 Dec 2004 13:48:58 -0000 Marco Gerards writes: > For some reason my REL24 code does not work, when it does I will send > in a patch. But there are 3 options we should consider: > > - Making sure REL24 should not be used. This can be done using the > -mlongcall option. Still, after using this the module will not work > when it uses libraries, this is a gcc bug that has been fixed last > week. The library that we use is libgcc. If we choose for > eliminating all calls to libgcc and if we use -mlongcall the > relocator will work. The disadvantage of this solution is that the > modules will get a bit bigger. > > - It is possible to fix the relocator just to use PPC_REL24, but in > that case the module should be loaded near grubof. > > - What linux uses is jumping to some code near the module and that > code does a long jump into grubof. This is the hardest solution and > I don't yet have enough knowledge to do this. > > I am now trying to get option 2 to work first (by using black magic to > get everything loaded at the right address ;)) and when module loading > works for me I will try to make 3 work. Does someone else think I > try to do something else, or can someone help a bit somehow? As you > might have noticed I really suck at this stuff and doing it just > because no one else does. ;) If I'm not mistaken, you're using the regular SVR4 ABI for PPC. It might be a good idea to take a look at the EABI (Embedded ABI) [1] I'm not sure if you have to re-configure GCC to make it EABI-compat, or if there's a configuration switch for this. Anyway, as I said, it might be worth looking into. Cheers, Johan. [1] ftp://sources.redhat.com/pub/binutils/ppc-docs/ppc-eabi-1995-01.pdf