]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
powerpc: Work around ld bug in older binutils
authorPaul Mackerras <paulus@samba.org>
Wed, 22 Oct 2008 18:43:45 +0000 (18:43 +0000)
committerPaul Mackerras <paulus@samba.org>
Fri, 31 Oct 2008 05:11:52 +0000 (16:11 +1100)
Commit 549e8152de8039506f69c677a4546e5427aa6ae7 ("powerpc: Make the
64-bit kernel as a position-independent executable") added lines to
vmlinux.lds.S to add the extra sections needed to implement a
relocatable kernel.  However, those lines seem to trigger a bug in
older versions of GNU ld (such as 2.16.1) when building a
non-relocatable kernel.  Since ld 2.16.1 is still a popular choice for
cross-toolchains, this adds an #ifdef to vmlinux.lds.S so the added
lines are only included when building a relocatable kernel.

Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kernel/vmlinux.lds.S

index b39c27ed79196c2d7cd1d4f32843fd3ee5563581..384dca5a9c1d46a88ec2c6e0511b9708102732df 100644 (file)
@@ -187,6 +187,7 @@ SECTIONS
                *(.machine.desc)
                __machine_desc_end = . ;
        }
+#ifdef CONFIG_RELOCATABLE
        . = ALIGN(8);
        .dynsym : AT(ADDR(.dynsym) - LOAD_OFFSET) { *(.dynsym) }
        .dynstr : AT(ADDR(.dynstr) - LOAD_OFFSET) { *(.dynstr) }
@@ -202,6 +203,7 @@ SECTIONS
                __rela_dyn_start = .;
                *(.rela*)
        }
+#endif
 
        /* Fake ELF header containing RPA note; for addnote */
        .fakeelf : AT(ADDR(.fakeelf) - LOAD_OFFSET) { *(.fakeelf) }