compiling u-boot-1.3.0-rc3 (and others at least since 1.3.0) with gcc-4.2.2 and binutils-2.18.50.20071019: UNDEF_SYM=`objdump -x lib_generic/libgeneric.a board/tqm85xx/libtqm85xx.a cpu/mpc85xx/libmpc85xx.a lib_ppc/libppc.a fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a net/libnet.a disk/libdisk.a rtc/librtc.a dtt/libdtt.a drivers/libdrivers.a drivers/bios_emulator/libatibiosemu.a drivers/nand/libnand.a drivers/nand_legacy/libnand_legacy.a drivers/onenand/libonenand.a drivers/net/libnet.a drivers/qe/qe.a drivers/serial/libserial.a drivers/sk98lin/libsk98lin.a post/libpost.a post/drivers/libpostdrivers.a post/lib_ppc/libpostppc.a post/lib_ppc/fpu/libpostppcfpu.a common/libcommon.a libfdt/libfdt.a |sed -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\ cd /share/home/clemens/work/u-boot/u-boot-1.3.0-rc3 && ld -Bstatic -T /share/home/clemens/work/u-boot/u-boot-1.3.0-rc3/board/tqm85xx/u-boot.lds -Ttext 0xfffc0000 -n $UNDEF_SYM cpu/mpc85xx/start.o cpu/mpc85xx/resetvec.o \ --start-group lib_generic/libgeneric.a board/tqm85xx/libtqm85xx.a cpu/mpc85xx/libmpc85xx.a lib_ppc/libppc.a fs/cramfs/libcramfs.a fs/fat/libfat.a fs/fdos/libfdos.a fs/jffs2/libjffs2.a fs/reiserfs/libreiserfs.a fs/ext2/libext2fs.a net/libnet.a disk/libdisk.a rtc/librtc.a dtt/libdtt.a drivers/libdrivers.a drivers/bios_emulator/libatibiosemu.a drivers/nand/libnand.a drivers/nand_legacy/libnand_legacy.a drivers/onenand/libonenand.a drivers/net/libnet.a drivers/qe/qe.a drivers/serial/libserial.a drivers/sk98lin/libsk98lin.a post/libpost.a post/drivers/libpostdrivers.a post/lib_ppc/libpostppc.a post/lib_ppc/fpu/libpostppcfpu.a common/libcommon.a libfdt/libfdt.a --end-group -L /usr/lib/gcc/powerpc-unknown-linux-gnu/4.2.2 -lgcc \ -Map u-boot.map -o u-boot ld: u-boot: section `.bootpg' can't be allocated in segment 1 LOAD: .bootpg .resetvec ld: final link failed: Bad value make: *** [u-boot] Error 1 Will try to create a reduced testcase.
Created attachment 2057 [details] reduced testcase
I can't reproduce it: ./ld -Bstatic -T u-boot.lds -Ttext 0xfffc0000 -n start.o resetvec.o -Map u-boot.map -o u-boot start.o: In function `_start_cont': /share/home/clemens/work/u-boot/u-boot-1.3.0-rc3/cpu/mpc85xx/start.S:326: undefined reference to `cpu_init_f' /share/home/clemens/work/u-boot/u-boot-1.3.0-rc3/cpu/mpc85xx/start.S:327: undefined reference to `board_init_f' ....
ld seems to fails before it starts to resolve the external (in the testcase _not_ included) references. I'll have to check more in detail. Any hints?
(In reply to comment #3) > ld seems to fails before it starts to resolve the external (in the testcase > _not_ included) references. I'll have to check more in detail. Any hints? Without a testcase, I can't tell for sure. It can be anything from bad hardware, bad libc, bad gcc, ...
This bug was fixed now in: http://sourceware.org/ml/binutils/2007-11/msg00235.html Using the latest binutils-snapshot (at least): $ ld -v GNU ld (GNU Binutils) 2.18.50.20071212 the latest U-Boot commit 41be969f4957115ed7b1fe8b890bfaee99d7a7a2 Author: Wolfgang Denk <wd@denx.de> Date: Thu Dec 6 10:21:19 2007 +0100 Release v1.3.1 compiled a $ make TQM8540_config target with gcc-4.2.2 within an native mpc8540 environment fine now.