[PATCH 4/5] powerpc: Make the 64-bit kernel as a position-independent executable
Grant Likely
grant.likely at secretlab.ca
Thu Oct 9 18:07:32 EST 2008
On Fri, Sep 26, 2008 at 6:10 PM, Remi Machet <rmachet at slac.stanford.edu> wrote:
> Hi Paul,
>
> This patch breaks my build with the following error:
>
> /u1/rmachet/projects/c2k/linux-powerpc-git $ make cuImage.c2k modules ARCH=powerpc V=1
> ...
> powerpc-linux-gnu-ld -m elf32ppc -Bstatic -o .tmp_vmlinux1 -T arch/powerpc/kernel/vmlinux.lds arch/powerpc/kernel/head_32.o arch/powerpc/kernel/fpu.o init/built-in.o --start-group usr/built-in.o arch/powerpc/kernel/built-in.o arch/powerpc/mm/built-in.o arch/powerpc/lib/built-in.o arch/powerpc/sysdev/built-in.o arch/powerpc/platforms/built-in.o kernel/built-in.o mm/built-in.o fs/built-in.o ipc/built-in.o security/built-in.o crypto/built-in.o block/built-in.o lib/lib.a lib/built-in.o drivers/built-in.o sound/built-in.o firmware/built-in.o net/built-in.o --end-group
> powerpc-linux-gnu-ld: BFD 2.16.1 internal error, aborting at /u1/rmachet/project/crosstool/crosstool-0.43/build/powerpc-linux-gnu/gcc-4.1.1-glibc-2.3.6/binutils-2.16.1/bfd/elflink.c line 6419 in elf_link_output_extsym
>
> powerpc-linux-gnu-ld: Please report this bug.
I can confirm this problem. This patch breaks builds using binutils
2.16.1. It definitely looks like a binutils bug. It builds fine with
2.17.
>
> I isolated the problem to line 202 in arch/powerpc/kernel/vmlinux.lds.S: If I remove that
> line then the kernel builds and run fine on my board (a PowerPC 32bits c2k).
> For reference the line is:
>
> .rela.dyn : AT(ADDR(.rela.dyn) - LOAD_OFFSET)
> {
> 202-> __rela_dyn_start = .;
> *(.rela*)
> }
There are still a lot of embedded developers using 2.16.1 binutils in
their toolchains so I think that this needs to be worked around.
Otherwise we'll see lots of complaints when this gets merged into
mainline. However, I haven't figured out a workaround yet. Looking
at the binutils sourcecode doesn't reveal anything obvious, but it's
too late for my brain to work properly. Anyone else have any ideas?
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
More information about the Linuxppc-dev
mailing list