All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [2216] Remove incorrect comment that the code must be position independent.
Date: Fri, 15 May 2009 15:50:49 -0400	[thread overview]
Message-ID: <1242417049.15548.22.camel@mj> (raw)
In-Reply-To: <4A0DC0AD.4080003@t-online.de>

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	other threads:[~2009-05-15 19:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1242417049.15548.22.camel@mj \
    --to=proski@gnu.org \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.