[PATCH 0/5] Relocatable 64-bit kernel using linker PIE support

Geert Uytterhoeven Geert.Uytterhoeven at sonycom.com
Thu Aug 28 22:26:30 EST 2008


On Thu, 28 Aug 2008, David Woodhouse wrote:
> On Wed, 2008-08-13 at 11:27 +1000, Paul Mackerras wrote:
> > The following series of patches implement support for a relocatable
> > kernel by building it as a position-independent executable (PIE).
> > When the linker is given the -pie flag, it creates an executable that
> > contains dynamic relocations which can be used to relocate the image
> > at boot time for any desired base address.  This patch series adds a
> > CONFIG_RELOCATABLE config option for 64-bit which links the kernel
> > with -pie and arranges to process the relocations in early boot.
> > 
> > With the first 4 patches applied, a relocatable kernel will still copy
> > itself down to real address 0.  The last patch changes things so that
> > a relocatable kernel will run wherever it was loaded.  This last patch
> > is pretty much just a proof of concept since it doesn't do anything to
> > ensure appropriate alignment of the base address (the base address
> > needs to be 16kB aligned).  We probably want to work out whether we
> > are a kdump kernel and run in-place if so, or copy down to 0 if not.
> 
> Is this mature enough for us to consider putting it in Fedora? We'd
> _love_ to stop building a separate kdump kernel for ppc64...

I tried CONFIG_RELOCATABLE=y on PS3 a while ago, and the resulting kernel
locked up during early boot.

With kind regards,

Geert Uytterhoeven
Software Architect

Sony Techsoft Centre Europe
The Corporate Village · Da Vincilaan 7-D1 · B-1935 Zaventem · Belgium

Phone:    +32 (0)2 700 8453
Fax:      +32 (0)2 700 8622
E-mail:   Geert.Uytterhoeven at sonycom.com
Internet: http://www.sony-europe.com/

A division of Sony Europe (Belgium) N.V.
VAT BE 0413.825.160 · RPR Brussels
Fortis · BIC GEBABEBB · IBAN BE41293037680010


More information about the Linuxppc-dev mailing list