Problem with binutils-2.13.90.0.4 on linux-alpha

Andrey Slepuhin pooh@msu.ru
Mon Sep 16 10:22:00 GMT 2002


Hi,
I'm using binutils-2.13.90.0.4 from HJL with gcc-3.0.4 on linux-alpha.
When linking C++ application with gcc option -static-libgcc (I'm really
need this; application doesn't use exception handling) ld catches
segmentation fault. Below follows GDB outpout:

[pooh@beta examples]$ gdb /home/pooh/bin/ld core
GNU gdb 19991004
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "alpha-redhat-linux"...

warning: "/home/pooh/grace-main/examples/core": ambiguous core format, 2
handler
s match
Core was generated by `/home/pooh/bin/ld -m elf64alpha -O1 -dynamic-linker /lib/ld-linux.so.2 -o gr_ep /usr/lib/crt1.o /usr/lib/crti.o /home/pooh/lib/gcc-lib/alphaev67-unknown-linux-gnu/3.0.4/crtbegin.o -L../libstdc++-stub -L../src -L/common /mpich/lib -L/common/gm/binary/lib -L/home/pooh/lib/gcc-lib/alphaev67-unknown-linux-gnu/3.0.4 -L/home/pooh/lib/gcc-lib/alphaev67-unknown-linux-gnu/3.0.4/../../.. gr_ep.tc2c.o -lT -lsupc++ -lmpich -lgm -lpthread -lpthread -lots -lstdc++ -lm -lgcc -lc -lgcc -lpthread /home/pooh/lib/gcc-lib/alphaev67-unknown-linux-gnu/3.0 .4/crtend.o /usr/lib/crtn.o'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /lib/libdl.so.2.1...done.
Reading symbols from /lib/libc.so.6.1...done.
Reading symbols from /lib/ld-linux.so.2...done.
#0  bfd_putl64 (data=4832672240, addr=0x0) at libbfd.c:1239
1239      addr[0] = (bfd_byte) (data >> (0*8));
(gdb) bt
#0  bfd_putl64 (data=4832672240, addr=0x0) at libbfd.c:1239
#1  0x12004c3dc in bfd_elf64_swap_reloca_out (abfd=0x1200edb40, 
    src=0x11fffeef0, dst=0x0) at elfcode.h:462
#2  0x120039da4 in elf64_alpha_relocate_section (output_bfd=0x1200edb40, 
    info=0x1200e0780, input_bfd=0x1202e5f70, input_section=0x1202e8718, 
    contents=0x200000d0010 "", relocs=0x0, local_syms=0x120bf13f0, 
    local_sections=0x120ec5e60) at elf64-alpha.c:4661
#3  0x1200490a0 in elf_link_input_bfd (finfo=0x11ffff130, 
    input_bfd=0x1200e0780) at elflink.h:6908
#4  0x1200476ec in bfd_elf64_bfd_final_link (abfd=0x1200edb40, 
    info=0x1200e0780) at elflink.h:5374
#5  0x12003ade4 in elf64_alpha_final_link (abfd=0x1200e0780, info=0x1202eb010)
    at elf64-alpha.c:5378
#6  0x120015dc4 in ldwrite () at ldwrite.c:540
#7  0x120012d0c in main (argc=33, argv=0x11ffff6b8) at ldmain.c:440
(gdb) 

After some further debugging I found that segmentation fault occurs when
processing section .rela.sdata.__gthread_active_ptr. It seems to me that a bug
somehow related to declaration
  static void *__gthread_active_ptr = (void *) &pthread_create;
in gcc sources.

Any help will be appreciated.

Regards,
Andrey.

P.S. Please CC: me, I'm not on list.

-- 
A right thing should be simple (tm)



More information about the Binutils mailing list