From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MR6UE-0003fO-3H for mharc-grub-devel@gnu.org; Wed, 15 Jul 2009 11:33:38 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MR6U9-0003ZO-Ui for grub-devel@gnu.org; Wed, 15 Jul 2009 11:33:34 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MR6U3-0003Sp-Kj for grub-devel@gnu.org; Wed, 15 Jul 2009 11:33:32 -0400 Received: from [199.232.76.173] (port=42798 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MR6U3-0003SZ-7L for grub-devel@gnu.org; Wed, 15 Jul 2009 11:33:27 -0400 Received: from c60.cesmail.net ([216.154.195.49]:50131) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1MR6U2-00007A-FZ for grub-devel@gnu.org; Wed, 15 Jul 2009 11:33:26 -0400 Received: from unknown (HELO smtprelay1.cesmail.net) ([192.168.1.111]) by c60.cesmail.net with ESMTP; 15 Jul 2009 11:33:24 -0400 Received: from [192.168.0.22] (static-72-92-88-10.phlapa.fios.verizon.net [72.92.88.10]) by smtprelay1.cesmail.net (Postfix) with ESMTPSA id 4C40F34C6D for ; Wed, 15 Jul 2009 11:33:23 -0400 (EDT) From: Pavel Roskin To: The development of GRUB 2 In-Reply-To: <20090715010055.17865.4764.stgit@mj.roinet.com> References: <20090715010017.17865.58915.stgit@mj.roinet.com> <20090715010055.17865.4764.stgit@mj.roinet.com> Content-Type: text/plain Date: Wed, 15 Jul 2009 11:33:22 -0400 Message-Id: <1247672002.4177.19.camel@mj> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 (2.26.3-1.fc11) Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: [PATCH 7/7] RFC: Use correct addresses, eliminate manual relocations 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, 15 Jul 2009 15:33:34 -0000 On Tue, 2009-07-14 at 21:00 -0400, Pavel Roskin wrote: > ChangeLog: > > * boot/i386/pc/boot.S: Declare 0x0-0x7c00 as a discardable .bss > segment. Eliminate ABS, rely on the assembler knowing correct > addresses. Eliminate .bss segment for the kernel, use direct > jump to the kernel address. I managed to install a Darwin cross-compiler, and it turn out it won't accept .bss in assembler files. Using real addresses would be very, very nice, but we'll need to find a portable way. Maybe grub-macho2img should be taught to cut away sections filled with zeroes. So patches 5 and 7 are dropped for now. Patches 1-4 and 6 have been applied. Installation on FAT32 is safe now. The "Hard Disk" message has been preserved, so it can be shortened later if the real need arises. That said, using direct jump to 0x8000 would save 3 bytes, and then we can save 2 bytes by taking an unconditional jump from the "disk check" code and reverting the logic. And maybe we could save 1 byte by yanking "cli" as writing to %ss disables interrupts until the next instruction. While testing the patches in qemu, I've seen some error messages and found that they should be followed by a new line, as qemu adds its own error message. -- Regards, Pavel Roskin