bug-grub
[Top][All Lists]
Advanced

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

Re: Checking for ET_EXEC


From: erich
Subject: Re: Checking for ET_EXEC
Date: Thu, 20 Dec 2001 12:57:36 -0800

"Yoshinori K. Okuji" <address@hidden> wrote:

> At Mon, 17 Dec 2001 16:37:08 -0800,
> address@hidden wrote:
> > I do think Rayiner's point is legitimate in the sense that it gives
> > an easy way to do sharing with core kernel code and not linking to
> > a fixed address.
> 
> Because you are the one who has written the code, I don't object too
> much, if you think the check should be removed. But I can't still
> understand how useful that is. If the kernel complies to the Multiboot
> Spec, its address has to be fixed anyway, doesn't it? Maybe I'm
> missing something.

Ah, but the loading address for a kernel in physical memory and where
you decide to put it in the virtual address space are 2 very different
things, especially if you want to run it at both addresses (or, even
more exotic, be able to relocate your kernel address space on the fly).

In x86, there are partial workarounds for this (using the CS/DS segments
to offset the base virtual address), but it's more convenient to not
have to do such tricks, plus other architectures don't always have
such techniques and it doesn't hurt to plan ahead.

I haven't checked whether removing the check will make loading a
shared lib "just work" or if other code changes would be required,
so how about I make up a patch based on trying it out early next
week?

--
    Erich Stefan Boleyn     <address@hidden>     http://www.uruk.org/
"Reality is truly stranger than fiction; Probably why fiction is so popular"



reply via email to

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