ld segfault when using gcc 3.3.3

droopycom droopycom_gcc_help@yahoo.com
Fri Mar 26 12:22:00 GMT 2004


I have a strange problem where ld segfault when use it
to link C++ files compiled with gcc 3.3.3.

Previously I have been using binutils 2.11.2 and
gcc-2.95.3. I cross compiled those two for an arm-elf
target on a i686-linux-pc host. I had some C++ related
issues at linking so I decided to take a look the
latest gcc to see if it made any difference.

I recompiled binutils 2.14 and gcc 3.3.3 for arm-elf.
Gcc works fine but the link fail with a segfault.
I traced the segfault and it happens in malloc inside
glibc. When i compile C only programs theres no

I tried to link the gcc-3.3.3 objects files with ld
2.11 and it crashed.
I tried to compile with gcc-2.95.2 and link the
objects with ld 2.14 and it worked fine.

So I'm thinking that somehow, gcc-3.3.3 generate
objects files in a format that doesnt suit binutils
anymore. Anybody experienced that already?

Here is the gdb backtrace of the crash: 
$ gdb arm-elf-ld

(gdb) run  -o main.elf main.o
Starting program: /users/fg/galahad/usr/bin/arm-elf-ld
-o main.elf main.o
Program received signal SIGSEGV, Segmentation fault.
0xb75177fd in _int_malloc () from /lib/tls/libc.so.6
(gdb) bt
#0  0xb75177fd in _int_malloc () from
#1  0xb7516b0d in malloc () from /lib/tls/libc.so.6
#2  0x0809490c in _objalloc_alloc (o=0xb75db720,
len=3076370008) at
#3  0x08061536 in bfd_alloc (abfd=0x1, size=3612) at
#4  0x08072677 in _bfd_elf32_link_read_relocs
(abfd=0x80d4c68, o=0x80e10cc, external_relocs=0x0,
internal_relocs=0x0, keep_memory=1) at elflink.h:2857
#5  0x08070b59 in elf_link_add_object_symbols
(abfd=0x80d4c68, info=0x80c3ca0) at elflink.h:2478
#6  0x0804fc3d in load_symbols (entry=0x80c481c,
place=0x0) at
#7  0x08050522 in open_input_bfds (s=0x80c481c,
force=0) at
#8  0x08052c45 in lang_process () at
#9  0x08055319 in main (argc=1, argv=0xbfffce74) at


-- D

Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.

More information about the Gcc-help mailing list