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 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel