Re: [RFC] ELF Relocatable x86 and x86_64 bzImages

Horms
2006-08-08T04:18:00Z

On Fri, Aug 04, 2006 at 05:14:37PM -0600, Eric W. Biederman wrote:
> Vivek Goyal <vgoyal@in.ibm.com> writes:
>
> > On Tue, Aug 01, 2006 at 04:58:49AM -0600, Eric W. Biederman wrote:
> >>
> >> The problem:
> >>
> >> We can't always run the kernel at 1MB or 2MB, and so people who need
> >> different addresses must build multiple kernels. The bzImage format
> >> can't even represent loading a kernel at other than it's default address.
> >> With kexec on panic now starting to be used by distros having a kernel
> >> not running at the default load address is starting to become common.
> >>
> > Hi Eric,
> >
> > There seems to be a small anomaly in the current set of patches for i386.
> >
> > For example if one compiles the kernel with CONFIG_RELOCATABLE=y
> > and CONFIG_PHYSICAL_START=0x400000 (4MB) and he uses grub to load
> > the kernel then kernel would run from 1MB location. I think user would
> > expect it to run from 4MB location.
>
> Agreed. That is a non-intuitive, and should probably be fixed.

I also agree that it is non-intitive. But I wonder if a cleaner
fix would be to remove CONFIG_PHYSICAL_START all together. Isn't
it just a work around for the kernel not being relocatable, or
are there uses for it that relocation can't replace?

--
Horms
H: http://www.vergenet.net/~horms/
W: http://www.valinux.co.jp/en/