ppc64 gcc-3.4.2 lk-2.6.10-rc1-mm4 link errors

Alan Modra amodra at bigpond.net.au
Wed Nov 10 16:47:39 EST 2004


On Tue, Nov 09, 2004 at 11:27:00PM -0600, Doug Maxey wrote:
>   gcc -Wp,-MD,arch/ppc64/boot/.crt0.o.d -D__ASSEMBLY__ -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -Iinclude -Iinclude2 -I/build/dwm/linux/lk-2.6.10-rc1-mm4.edit/include -fno-builtin  -traditional -c -o arch/ppc64/boot/crt0.o /build/dwm/linux/lk-2.6.10-rc1-mm4.edit/arch/ppc64/boot/crt0.S

OK, you used plain unadorned gcc to compile crt0.S, without -m64 or
-m32.  That ought to produce ppc32 code.

>   ld -Ttext 0x00400000 -e _start -T /build/dwm/linux/lk-2.6.10-rc1-mm4.edit/arch/ppc64/boot/zImage.lds -o arch/ppc64/boot/zImage arch/ppc64/boot/crt0.o arch/ppc64/boot/string.o arch/ppc64/boot/prom.o arch/ppc64/boot/main.o arch/ppc64/boot/zlib.o arch/ppc64/boot/imagesize.o arch/ppc64/boot/div64.o  arch/ppc64/boot/kernel-vmlinux.strip.o && arch/ppc64/boot/addnote arch/ppc64/boot/zImage

And here you used plain unadorned ld too, which ought to be producing
ppc32 output from ppc32 input, and indeed the powerpc:common output
selection says you have the right ld.

> ld: warning: powerpc:common64 architecture of input file `arch/ppc64/boot/crt0.o' is incompatible with powerpc:common output

But this says your gcc produces ppc64 code by default..

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Linuxppc64-dev mailing list