From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1M53RL-0007J6-0t for mharc-grub-devel@gnu.org; Fri, 15 May 2009 15:51:31 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M53RJ-0007Id-K6 for grub-devel@gnu.org; Fri, 15 May 2009 15:51:29 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M53RF-0007HY-5Y for grub-devel@gnu.org; Fri, 15 May 2009 15:51:29 -0400 Received: from [199.232.76.173] (port=50649 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M53RF-0007HQ-2U for grub-devel@gnu.org; Fri, 15 May 2009 15:51:25 -0400 Received: from c60.cesmail.net ([216.154.195.49]:35425) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.60) (envelope-from ) id 1M53RE-0005sg-EY for grub-devel@gnu.org; Fri, 15 May 2009 15:51:24 -0400 Received: from unknown (HELO smtprelay2.cesmail.net) ([192.168.1.112]) by c60.cesmail.net with ESMTP; 15 May 2009 15:51:23 -0400 Received: from [192.168.0.22] (static-72-92-88-10.phlapa.fios.verizon.net [72.92.88.10]) by smtprelay2.cesmail.net (Postfix) with ESMTPSA id C686F34C6D for ; Fri, 15 May 2009 15:51:52 -0400 (EDT) From: Pavel Roskin To: The development of GRUB 2 In-Reply-To: <4A0DC0AD.4080003@t-online.de> References: <4A0DC0AD.4080003@t-online.de> Content-Type: text/plain Date: Fri, 15 May 2009 15:50:49 -0400 Message-Id: <1242417049.15548.22.camel@mj> Mime-Version: 1.0 X-Mailer: Evolution 2.26.1 (2.26.1-2.fc11) Content-Transfer-Encoding: 7bit X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: [2216] Remove incorrect comment that the code must be position independent. 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, 15 May 2009 19:51:29 -0000 On Fri, 2009-05-15 at 21:21 +0200, Christian Franke wrote: > Pavel Roskin wrote: > > Revision: 2216 > > http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=2216 > > Author: proski > > Date: 2009-05-15 14:47:44 +0000 (Fri, 15 May 2009) > > Log Message: > > ----------- > > Remove incorrect comment that the code must be position independent. > > > > Modified Paths: > > -------------- > > trunk/grub2/commands/i386/pc/drivemap_int13h.S > > > > > > Function drivemap.c:install_int13_handler() copies the > grub_drivemap_handler code to some low memory allocated by > grub_mmap_malign_and_register(). No relocation is done. IMO the code > must be position independent. Only the segment is variable, but the offset is always 0. Otherwise, this would be wrong: movw $INT13H_OFFSET(EXT_C(grub_drivemap_mapstart)), %bx We would need to get the instruction pointer and add the necessary offset to it, either in the handler or at the install time. Thanks for fixing the Cygwin problem! And by the way, it's a good thing to know that somebody is looking at the commits! -- Regards, Pavel Roskin