This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

ld goes into infinite loop


I have a problem with the ld going into infinite loop linking  c++ shared
libraries
The system is out of box Red Hat 7.1 system

mberk@mberk3.bmc.com:/localhome/mberk/p4-src/src/cos/bindings/psl > ld -v
GNU ld version 2.10.91 (with BFD 2.10.91.0.2)
mberk@mberk3.bmc.com:/localhome/mberk/p4-src/src/cos/bindings/psl > gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-85)

I do not have debug builds but I attached a debugger to the ld program.
It is looping in the _bfd_generic_link_add_one_symbol  as seen below. It
used 100% of CPU and never finished linking.

The problem started when we start using link version scripts. Initially we
were using manual scripts, but later we started to use
scripts which are automated. In summary, we generate .a files from the
sources, then use the .a files to extract the symbols in the library to
create the .so.
This will enable us not to export all the symbols we include from static
libraries we link into.

Anyway, the problem is ld going into infinite loop and I can consistently
repeat this. I can provide any other information requested.

Is this a known bug? I searched archives but could not find exact problem
description. There was one more reference related to using -profile option
which is not the case here. 

Please CC me since I am not in this mailing list.

Thanks

Murat




mberk@mberk3.bmc.com:/localhome/mberk/p4-src/src/cos/bindings/psl > gdb
`which ld` 25390
GNU gdb 5.0rh-5 Red Hat Linux 7.1
Copyright 2001 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 "i386-redhat-linux"...(no debugging symbols
found)...
/localhome/mberk/p4-src/src/cos/bindings/psl/25390: No such file or
directory.
Attaching to program: /usr/bin/ld, process 25390
Reading symbols from /usr/lib/libbfd-2.10.91.0.2.so...(no debugging symbols
found)...done.
Loaded symbols for /usr/lib/libbfd-2.10.91.0.2.so
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/i686/libc.so.6...done.
Loaded symbols for /lib/i686/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
0x40044fcf in _bfd_generic_link_add_one_symbol () at eval.c:41
41      eval.c: No such file or directory.
        in eval.c
(gdb) where
#0  0x40044fcf in _bfd_generic_link_add_one_symbol () at eval.c:41
#1  0x40053b82 in elf_link_add_object_symbols () at eval.c:41
#2  0x080511be in bfd_link_hash_lookup () at eval.c:41
#3  0x08051912 in bfd_link_hash_lookup () at eval.c:41
#4  0x0805407b in bfd_link_hash_lookup () at eval.c:41
#5  0x08056775 in bfd_link_hash_lookup () at eval.c:41
#6  0x400a4627 in __libc_start_main (main=0x8056290
<bfd_link_hash_lookup+48220>, argc=52, ubp_av=0xbfffea34,
    init=0x8049e4c <_init>, fini=0x806964c <_fini>, rtld_fini=0x4000dcd4
<_dl_fini>, stack_end=0xbfffea2c)
    at ../sysdeps/generic/libc-start.c:129
(gdb) cont
Continuing.
ò
ò


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]