From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Gcbhs-0001BR-TU for mharc-grub-devel@gnu.org; Wed, 25 Oct 2006 01:53:40 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Gcbhq-0001B9-3C for grub-devel@gnu.org; Wed, 25 Oct 2006 01:53:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Gcbhm-0001At-VC for grub-devel@gnu.org; Wed, 25 Oct 2006 01:53:37 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gcbhm-0001Aq-Qw for grub-devel@gnu.org; Wed, 25 Oct 2006 01:53:34 -0400 Received: from [212.85.152.101] (helo=kotoba.storever.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Gcbhm-0004TZ-Nu for grub-devel@gnu.org; Wed, 25 Oct 2006 01:53:35 -0400 Received: from kotoba.oasis.nexedi.com (kotoba.oasis.nexedi.com [212.85.152.101]) by kotoba.storever.com (Postfix) with ESMTP id C1DE43CC71E2F for ; Wed, 25 Oct 2006 10:29:38 +0200 (CEST) Received: from [??1] (localhost [127.0.0.1]) by kotoba.storever.com (Postfix) with ESMTP id 95CD93CC60083 for ; Wed, 25 Oct 2006 10:29:38 +0200 (CEST) From: "Yoshinori K. Okuji" Organization: enbug.org To: The development of GRUB 2 Date: Wed, 25 Oct 2006 07:53:23 +0200 User-Agent: KMail/1.8.2 References: <1160779061.21017.75.camel@basalt.austin.ibm.com> <200610141733.44320.okuji@enbug.org> <1161720181.23331.25.camel@basalt.austin.ibm.com> In-Reply-To: <1161720181.23331.25.camel@basalt.austin.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200610250753.24339.okuji@enbug.org> X-Bogosity: No, tests=bogofilter, spamicity=0.456801, version=0.17.2 Subject: Re: [PATCH] generic ELF loading 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: Wed, 25 Oct 2006 05:53:38 -0000 On Tuesday 24 October 2006 22:03, Hollis Blanchard wrote: > Actually I'm not using the heap, I'm just directly copying wherever > phdr->p_paddr says to. That's not a good thing actually; in the future > we should add some error checking to make sure we don't clobber GRUB > itself. OK, then it's even worse. :( You must not assume that GRUB can always load an OS image to an appropriate location directly. I know this is the case for the current implementation of the Multiboot loader, but it is a very bad idea, generally speaking. What GRUB should do is first to load an image to somewhere then relocate it to the right place at boot time. On i386-pc, the OS area is used for this very purpose. The x86 Multiboot loader is just a mistake, and that's why we must rewrite it. Okuji