]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/boot: Allow building the zImage wrapper as a relocatable ET_DYN
authorMichael Ellerman <michael@ozlabs.org>
Tue, 12 Apr 2011 20:38:55 +0000 (20:38 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 20 Apr 2011 06:59:20 +0000 (16:59 +1000)
commitb4be329c3be14fceea8e19e59373cc984ef7e00d
tree67c07efa7ca72a24bcd5d893c83fb9b3f59dce77
parent212cc8e7494841c1c1b46426499a3e6a68cd9e0d
powerpc/boot: Allow building the zImage wrapper as a relocatable ET_DYN

This patch adds code, linker script and makefile support to allow
building the zImage wrapper around the kernel as a position independent
executable.  This results in an ET_DYN instead of an ET_EXEC ELF output
file, which can be loaded at any location by the firmware and will
process its own relocations to work correctly at the loaded address.

This is of interest particularly since the standard ePAPR image format
must be an ET_DYN (although this patch alone is not sufficient to
produce a fully ePAPR compliant boot image).

Note for now we don't enable building with -pie for anything.

Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/boot/crt0.S
arch/powerpc/boot/wrapper
arch/powerpc/boot/zImage.coff.lds.S
arch/powerpc/boot/zImage.lds.S