Re: [PATCH] generic ELF loading #3

2006-11-02 Thread Hollis Blanchard
On Thu, 2006-11-02 at 14:54 -0600, Hollis Blanchard wrote: > > How do I know what the load address should be before I've even looked > at the program header? > > Just because the x86 loader uses fixed values doesn't mean other > loaders should. In particular, the PowerPC loader is happy to load t

Re: [PATCH] generic ELF loading #3

2006-11-02 Thread Hollis Blanchard
On Thu, 2006-11-02 at 21:58 +0200, Yoshinori K. Okuji wrote: > On Wednesday 01 November 2006 02:23, Hollis Blanchard wrote: > > Here is pass #3 of the ELF loader. Changes from #2: > > - the `load' callback no longer modifies the phdr directly > > I still don't understand why you want to pass a hoo

Re: [PATCH] generic ELF loading #3

2006-11-02 Thread Yoshinori K. Okuji
On Wednesday 01 November 2006 02:23, Hollis Blanchard wrote: > Here is pass #3 of the ELF loader. Changes from #2: > - the `load' callback no longer modifies the phdr directly I still don't understand why you want to pass a hook. Why don't you simply pass a load address? Okuji

Re: [PATCH] generic ELF loading #3

2006-11-01 Thread Johan Rydberg
Hollis Blanchard <[EMAIL PROTECTED]> writes: > --- grub2-cvs.orig/include/grub/types.h 2006-10-31 19:06:47.0 > -0600 > +++ grub2-cvs/include/grub/types.h2006-10-31 19:06:58.0 -0600 > @@ -23,6 +23,8 @@ > #include > #include > > +#define __unused __attribute__ ((unus

Re: [PATCH] generic ELF loading (updated)

2006-10-30 Thread Hollis Blanchard
On Mon, 2006-10-30 at 21:19 +0200, Yoshinori K. Okuji wrote: > On Saturday 28 October 2006 20:35, Hollis Blanchard wrote: > > On Sat, 2006-10-28 at 16:16 +0200, Yoshinori K. Okuji wrote: > > > On Friday 27 October 2006 21:19, Hollis Blanchard wrote: > > > > Comments please. Also see next mail to se

Re: [PATCH] generic ELF loading (updated)

2006-10-30 Thread Yoshinori K. Okuji
On Saturday 28 October 2006 20:35, Hollis Blanchard wrote: > On Sat, 2006-10-28 at 16:16 +0200, Yoshinori K. Okuji wrote: > > On Friday 27 October 2006 21:19, Hollis Blanchard wrote: > > > Comments please. Also see next mail to see how the PPC Linux loader > > > uses it. > > > > So this still loads

Re: [PATCH] generic ELF loading (updated)

2006-10-28 Thread Hollis Blanchard
On Sat, 2006-10-28 at 16:16 +0200, Yoshinori K. Okuji wrote: > On Friday 27 October 2006 21:19, Hollis Blanchard wrote: > > Comments please. Also see next mail to see how the PPC Linux loader uses > > it. > > So this still loads an image to paddr directly, right? > > I think we need these feature

Re: [PATCH] generic ELF loading (updated)

2006-10-28 Thread Yoshinori K. Okuji
On Friday 27 October 2006 21:19, Hollis Blanchard wrote: > Comments please. Also see next mail to see how the PPC Linux loader uses > it. So this still loads an image to paddr directly, right? I think we need these features: - an ability to pass an address to load an image - an ability to pass

Re: [PATCH] generic ELF loading (updated)

2006-10-27 Thread Hollis Blanchard
On Fri, 2006-10-27 at 14:19 -0500, Hollis Blanchard wrote: > Here is the updated ELF loading infrastructure. A couple notes: > > It is now a module, which will be auto-loaded by loaders that need it. > However, I don't know where to put elf.c. The only similar files are > io/gzio.c and fs/fshelp.c

Re: [PATCH] generic ELF loading

2006-10-24 Thread Yoshinori K. Okuji
On Tuesday 24 October 2006 22:03, Hollis Blanchard wrote: > Actually I'm not using the heap, I'm just directly copying wherever > phdr->p_paddr says to. That's not a good thing actually; in the future > we should add some error checking to make sure we don't clobber GRUB > itself. OK, then it's ev

Re: [PATCH] generic ELF loading

2006-10-24 Thread Hollis Blanchard
On Tue, 2006-10-24 at 22:48 +0200, Johan Rydberg wrote: > Hollis Blanchard <[EMAIL PROTECTED]> writes: > > >> 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

Re: [PATCH] generic ELF loading

2006-10-24 Thread Hollis Blanchard
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 a

RE: [PATCH] generic ELF loading

2006-10-24 Thread Hollis Blanchard
On Sat, 2006-10-14 at 11:03 +0800, Mao, Bibo wrote: >I do not know whether it is possible to add one element in > structure grub_elf_file structure to identify ELF type > (ELFCLASS32/ELFCLASS64) and ELF machine type, this element can be set > at function grub_elf_open. I'm not sure it saves mu

Re: [PATCH] generic ELF loading

2006-10-24 Thread Johan Rydberg
Hollis Blanchard <[EMAIL PROTECTED]> writes: >> 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. > > Actually I'm not

Re: [PATCH] generic ELF loading

2006-10-24 Thread Hollis Blanchard
On Sat, 2006-10-14 at 17:33 +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 c

Re: [PATCH] generic ELF loading

2006-10-14 Thread Tristan Gingold
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" functio

Re: [PATCH] generic ELF loading

2006-10-14 Thread Yoshinori K. Okuji
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 area

RE: [PATCH] generic ELF loading

2006-10-13 Thread Mao, Bibo
I do not know whether it is possible to add one element in structure grub_elf_file structure to identify ELF type (ELFCLASS32/ELFCLASS64) and ELF machine type, this element can be set at function grub_elf_open. Thanks Bibo,mao >-Original Message- >From: [EMAIL PROTECTED] >[mailto:[EMAI