All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hollis Blanchard <hollis@penguinppc.org>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] generic ELF loading
Date: Tue, 24 Oct 2006 15:41:47 -0500	[thread overview]
Message-ID: <1161722507.23331.43.camel@basalt.austin.ibm.com> (raw)
In-Reply-To: <20061014172325.GA3021@saphi>

On Sat, 2006-10-14 at 19:23 +0200, Tristan Gingold wrote:
> On Sat, Oct 14, 2006 at 05:33:44PM +0200, Yoshinori K. Okuji wrote:
> > On Saturday 14 October 2006 00:37, Hollis Blanchard wrote:
> > > This patch adds generic ELF loading infrastructure for both 32-bit and
> > > 64-bit ELF. It provides an "iterate" function for program headers, and a
> > > "load" function for convenience.
> > 
> > The idea is very good. But I don't like that loaded areas are always allocated 
> > from the heap. GRUB has a staging area for OS images on i386-pc, and I prefer 
> > to load an image directly instead of consuming the heap.
> Two points for ia64:
> * the area must be allocated from EFI.

What does this mean? Open Firmware has a "claim" call, which reserves
memory and makes it available to the application. I assume EFI must have
something similar. This can be called via a hook.

For error handling, you'd probably need to iterate once to claim the
memory, iterate once to copy the ELF file there, and in case of error
iterate again to free the claimed memory.

> * we need to support relocation: loading the ELF file with an offset
>   (this feature can be on/off/forced).

This is provided via `load_hook' in grub_elf32_load(). In fact, PowerPC
already does this. Please see offset_phdr() in my second mail (Subject:
Re: [PATCH] ppc64 Linux ELF loader).

-Hollis





  reply	other threads:[~2006-10-24 20:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-13 22:37 [PATCH] generic ELF loading Hollis Blanchard
2006-10-13 22:40 ` [PATCH] ppc64 Linux ELF loader Hollis Blanchard
2006-10-14 15:33 ` [PATCH] generic ELF loading Yoshinori K. Okuji
2006-10-14 17:23   ` Tristan Gingold
2006-10-24 20:41     ` Hollis Blanchard [this message]
2006-10-24 20:03   ` Hollis Blanchard
2006-10-24 20:48     ` Johan Rydberg
2006-10-24 20:45       ` Hollis Blanchard
2006-10-25  5:53     ` Yoshinori K. Okuji
  -- strict thread matches above, loose matches on Subject: below --
2006-10-14  3:03 Mao, Bibo
2006-10-24 20:21 ` Hollis Blanchard

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=1161722507.23331.43.camel@basalt.austin.ibm.com \
    --to=hollis@penguinppc.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.