summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/boot/zImage.coff.lds.S
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ozlabs.org>2011-04-12 20:38:55 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-04-20 16:59:20 +1000
commit6975a783d7b40c79be4b7a7ea450e023ff7e5e02 (patch)
tree67c07efa7ca72a24bcd5d893c83fb9b3f59dce77 /arch/powerpc/boot/zImage.coff.lds.S
parentee7a2aa3d3fd10a7157dd19f737b2bafdea0458f (diff)
downloadop-kernel-dev-6975a783d7b40c79be4b7a7ea450e023ff7e5e02.zip
op-kernel-dev-6975a783d7b40c79be4b7a7ea450e023ff7e5e02.tar.gz
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>
Diffstat (limited to 'arch/powerpc/boot/zImage.coff.lds.S')
-rw-r--r--arch/powerpc/boot/zImage.coff.lds.S6
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/powerpc/boot/zImage.coff.lds.S b/arch/powerpc/boot/zImage.coff.lds.S
index 856dc78..de4c9e3 100644
--- a/arch/powerpc/boot/zImage.coff.lds.S
+++ b/arch/powerpc/boot/zImage.coff.lds.S
@@ -3,13 +3,13 @@ ENTRY(_zimage_start_opd)
EXTERN(_zimage_start_opd)
SECTIONS
{
- _start = .;
.text :
{
+ _start = .;
*(.text)
*(.fixup)
+ _etext = .;
}
- _etext = .;
. = ALIGN(4096);
.data :
{
@@ -17,9 +17,7 @@ SECTIONS
*(.data*)
*(__builtin_*)
*(.sdata*)
- __got2_start = .;
*(.got2)
- __got2_end = .;
_dtb_start = .;
*(.kernel:dtb)
OpenPOWER on IntegriCloud