Problems with binutils 2.15
I've been playing around trying to get U-Boot 1.1.1 (and previous versions) to build with the following toolchain:
- binutils 2.15
- gcc 3.3.2
- glibc 2.3.2
This toolchain was built for a PPC target with no particular CPU flags or CPU patches. Here's what I'm doing:
$ cd u-boot-1.1.1 $ make TQM860L_config $ make CROSS_COMPILE=powerpc-linux-
Now, this starts to build and goes far enough, but somehow LD actually seg faults somewhere down the line. I've copied the command line that fails in Make directly to the command line and I get this (the output is somewhat edited for the form, but it's all there):
----------------------------------------------------------------------
$ UNDEF_SYM=`powerpc-linux-objdump -x lib_generic/libgeneric.a board/tqm8xx/libtqm8xx.a cpu/mpc8xx/libmpc8xx.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 net/libnet.a disk/libdisk.a rtc/librtc.a dtt/libdtt.a drivers/libdrivers.a drivers/sk98lin/libsk98lin.a post/libpost.a post/cpu/libcpu.a common/libcommon.a |sed -n -e 's/.*\(__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\
Quoted 1 line
powerpc-linux-ld -Bstatic -T /home/.../u-boot-1.1.1/board/tqm8xx/u-boot.lds
-Ttext 0x40000000 -n $UNDEF_SYM cpu/mpc8xx/start.o \
Quoted 1 line
--start-group lib_generic/libgeneric.a board/tqm8xx/libtqm8xx.a
cpu/mpc8xx/libmpc8xx.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 net/libnet.a disk/libdisk.a rtc/librtc.a dtt/libdtt.a drivers/libdrivers.a drivers/sk98lin/libsk98lin.a post/libpost.a post/cpu/libcpu.a common/libcommon.a --no-warn-mismatch -L /home/.../tools/lib/gcc-lib/powerpc-linux/3.3.2/nof -lgcc --end-group \
Quoted 1 line
-Map u-boot.map -o u-boot
Segmentation fault
----------------------------------------------------------------------
If run from the makefile, this would come right after:
----------------------------------------------------------------------
...
a - usb_kbd.o
a - usb_storage.o
a - virtex2.o
a - xilinx.o
a - circbuf.o
make[1]: Leaving directory `/home/.../u-boot-1.1.1/common'
----------------------------------------------------------------------
I've tried 0.4.0 and 1.0.0 and get very similar behavior.
Anyone see this before?
Karim
Signature · 3 lines
Author, Speaker, Developer, Consultant Pushing Embedded and Real-Time Linux Systems Beyond the Limits http://www.opersys.com || karim at opersys.com || 1-866-677-4546
Quoted 6 lines · In message <[email protected]> you wrote:
I've been playing around trying to get U-Boot 1.1.1 (and previous versions) to build with the following toolchain:
- binutils 2.15
- gcc 3.3.2
- glibc 2.3.2
glibc does not matter here; U-Boot is self-contained and does not need any glibc stuff.
Quoted 2 lines
Now, this starts to build and goes far enough, but somehow LD actually seg faults somewhere down the line. I've copied the
...
Quoted 1 line
Anyone see this before?
I haven't seen any reports (neither positive nor negative) about binutils 2.15 yet. With 2.14 it works fine here.
Best regards,
Wolfgang Denk
Signature · 5 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd at denx.de At the source of every error which is blamed on the computer you will find at least two human errors, including the error of blaming it on the computer.
Quoted 2 lines · Wolfgang Denk
glibc does not matter here; U-Boot is self-contained and does not need any glibc stuff.
I know. I just thought I'd mention the entire list for completness.
Quoted 2 lines
I haven't seen any reports (neither positive nor negative) about binutils 2.15 yet. With 2.14 it works fine here.
OK. It's good to know 2.14 works. I'll give it a try.
Karim
Signature · 3 lines
Author, Speaker, Developer, Consultant Pushing Embedded and Real-Time Linux Systems Beyond the Limits http://www.opersys.com || karim at opersys.com || 1-866-677-4546
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Wolfgang Denk writes:
Wolfgang> In message <[email protected]> you wrote:
Karim> I've been playing around trying to get U-Boot 1.1.1 (and Karim> previous versions) to build with the following toolchain:
Karim> - binutils 2.15
Karim> - gcc 3.3.2
Karim> - glibc 2.3.2
Wolfgang> glibc does not matter here; U-Boot is self-contained and Wolfgang> does not need any glibc stuff.
Karim> Now, this starts to build and goes far enough, but somehow LD Karim> actually seg faults somewhere down the line. I've copied the Karim> Anyone see this before?
Wolfgang> I haven't seen any reports (neither positive nor negative) Wolfgang> about binutils 2.15 yet. With 2.14 it works fine here.
I use 2.14.90.7 and have got the same problem. IMHO it's an LD bug which appears in very special case: if you request the map (-Map option) and the link command file (u-boot.lds in this case) contains a conditional statement (. = DEFINED(env_offset) ? env_offset : .;), the link fails with segmentation fault. Remove -Map as a workaround and the link should succeed. I found this some time ago but have not got time to fix the LD.
Signature · 4 lines
======================================================================== Yuli Barcohen | Phone +972-9-765-1788 | Software Project Leader yuli at arabellasw.com | Fax +972-9-765-7494 | Arabella Software, Israel ========================================================================