grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [2216] Remove incorrect comment that the code must be position indep


From: Pavel Roskin
Subject: Re: [2216] Remove incorrect comment that the code must be position independent.
Date: Fri, 15 May 2009 15:50:49 -0400

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]