* Re: [2216] Remove incorrect comment that the code must be position independent.
[not found] <E1M4yhN-0000p7-5G@cvs.savannah.gnu.org>
@ 2009-05-15 19:21 ` Christian Franke
2009-05-15 19:50 ` Pavel Roskin
0 siblings, 1 reply; 2+ messages in thread
From: Christian Franke @ 2009-05-15 19:21 UTC (permalink / raw)
To: grub-devel
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.
--
Christian Franke
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [2216] Remove incorrect comment that the code must be position independent.
2009-05-15 19:21 ` [2216] Remove incorrect comment that the code must be position independent Christian Franke
@ 2009-05-15 19:50 ` Pavel Roskin
0 siblings, 0 replies; 2+ messages in thread
From: Pavel Roskin @ 2009-05-15 19:50 UTC (permalink / raw)
To: The development of GRUB 2
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-05-15 19:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <E1M4yhN-0000p7-5G@cvs.savannah.gnu.org>
2009-05-15 19:21 ` [2216] Remove incorrect comment that the code must be position independent Christian Franke
2009-05-15 19:50 ` Pavel Roskin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.