[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] ELF program header

From: Robert Millan
Subject: Re: [PATCH] ELF program header
Date: Sun, 14 Oct 2007 14:00:55 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

On Sat, Oct 13, 2007 at 12:03:37AM +0200, Stefan Reinauer wrote:
> >   /* FIXME: Should we support program headers at strange locations?  */
> >   if (ehdr->e_phoff + ehdr->e_phnum * ehdr->e_phentsize > MULTIBOOT_SEARCH)
> >     return grub_error (GRUB_ERR_BAD_OS, "program header at a too high 
> > offset");
> > 
> > This breaks self-boot in the LinuxBIOS target.  Moving the Program header
> > (see attached patch) fixed it, with no apparent drawbacks or regressions in
> > any of the ELF loaders around (tested on LinuxBIOS ELF loader and Efika OF).
> I assume this was with LinuxBIOSv3 and Qemu?


> We tried the same but the patch was a lot bigger, trying to actually
> leave space in the beginning. Your patch might be enough, that would be
> really nice.

That's the question.  Do we really have to add more space, or is that space
already allocated for us?

> I didn't really get the sense behind the layers of grub
> magic around read() and write().

They're basicaly like pread() and pwrite() with the added functionality of a
verbose mode.

Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call, if you are unable to speak?
(as seen on /.)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]