From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1GYI4b-0007fS-CA for mharc-grub-devel@gnu.org; Fri, 13 Oct 2006 04:07:17 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GYI4X-0007d7-9V for grub-devel@gnu.org; Fri, 13 Oct 2006 04:07:13 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GYI4V-0007c2-F8 for grub-devel@gnu.org; Fri, 13 Oct 2006 04:07:12 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GYI4T-0007bO-SS for grub-devel@gnu.org; Fri, 13 Oct 2006 04:07:10 -0400 Received: from [143.182.124.21] (helo=mga03.intel.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GYICs-0006Lc-Mq for grub-devel@gnu.org; Fri, 13 Oct 2006 04:15:50 -0400 Received: from azsmga001.ch.intel.com ([10.2.17.19]) by mga03.intel.com with ESMTP; 13 Oct 2006 01:07:08 -0700 Received: from unknown (HELO [10.239.13.154]) ([10.239.13.154]) by azsmga001.ch.intel.com with ESMTP; 13 Oct 2006 01:07:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: i="4.09,304,1157353200"; d="scan'208"; a="130483828:sNHT19630555" Message-ID: <452F481D.2090902@intel.com> Date: Fri, 13 Oct 2006 16:02:37 +0800 From: "bibo,mao" User-Agent: Thunderbird 1.5.0.2 (X11/20060420) MIME-Version: 1.0 To: The development of GRUB 2 References: <3E68BD4534D7FC4995E20ECE949EA0C72DA674@pdsmsx412.ccr.corp.intel.com><20061012082155.GB2551@saphi> <87ejtd7ovp.fsf@night.trouble.net><20061012113519.GA2487@saphi> <87ac417mya.fsf@night.trouble.net><20061012141434.GA2483@saphi> <8764ep7dov.fsf@night.trouble.net> <20061013052230.GA2490@saphi> In-Reply-To: <20061013052230.GA2490@saphi> Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: Grub for ia64 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, 13 Oct 2006 08:07:14 -0000 Tristan Gingold wrote: > On Thu, Oct 12, 2006 at 05:32:00PM +0200, Johan Rydberg wrote: > > Tristan Gingold writes: > > > > > On Thu, Oct 12, 2006 at 02:11:57PM +0200, Johan Rydberg wrote: > > >> Tristan Gingold writes: > > >> > > >> >> You're telling me that EFI on your IA-64 system does not relocate the > > >> >> program before start executing it? That sounds strange. > > >> > > > >> > It does relocate EFI PEI images. Unfortunatly there is no tools to create > > >> > EFI PEI objects on Linux. The gnu efi tools are kludgy: they use standard > > >> > gcc and ld, create an ELF image and convert it to a PEI image. But the > > >> > relocations are not converted, they are simply put into the data section. > > >> > > >> How hard would it be to write a converter ourselves, starting with > > >> util/i386/efi/grub-mkimage.c? > > > Not that hard, but > > > * we'd better to have one grub-mkimage.c for all EFI targets > > > > I agree. > > > > > * working on binutils is even better. > > > > The key problem with this as I see it is that it would force people to > > have a cross-compiler suite installed, at least for i386 hosts. Unless > > we can magically get the default installation to include PE-support. > On my debian system, objdump -i: > efi-app-ia32 > > It's already here! > The binutils issue is mainly for ia64. For i386, grub-mkimage.c works. > > Tristan. > > On i386 objcopy in binutils can convert ELF format into PE32, but application need dynamically relocate itself so that PE32 image can be loaded to any place to execute. For grub-mkimage.c application need not because grub-mkimage will generate dynamic relocate segment. Two methods is ok for me, I prefer the easier one :) thanks bibo,mao