Extremelly long link times with gcc3.x

Manuel Serrano Manuel.Serrano@sophia.inria.fr
Fri Jan 24 10:16:00 GMT 2003


On Fri, 24 Jan 2003 09:54:13 +1030
Alan Modra <amodra@bigpond.net.au> wrote:

> On Thu, Jan 23, 2003 at 09:51:36AM +0100, Manuel Serrano wrote:
> > > Could you link without "-g" debugging symbols and report the link time?
> > Ooops, I have forgotten to add this time. Adding/removing -g flag does not
> > change the link time. In other words, it is more or less the same thing 
> > with or without -g. Without -g it last 1096 seconds. Sorry.
> 
> I'm curious as to where ld is spinning.  Can you use gdb to attach to
> a running ld, somewhere around the halfway mark, and report a backtrace?
> 
> -- 
> Alan Modra
> IBM OzLabs - Linux Technology Centre
I have collected several stacks, waiting more or less one minute in
between to stacks. Here is what I got:

-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----
owens:.../project/bigloo> gdb /usr/bin/ld 4231
GNU gdb 2002-08-18-cvs
Copyright 2002 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-linux"...(no debugging symbols found)...
Attaching to program: /usr/bin/ld, process 4231
Reading symbols from /usr/lib/libbfd-2.13.90.0.10.so...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libbfd-2.13.90.0.10.so
Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/ld-linux.so.2
0x40075911 in htab_find_slot_with_hash () from /usr/lib/libbfd-2.13.90.0.10.so
(gdb) bt
#0  0x40075911 in htab_find_slot_with_hash () from /usr/lib/libbfd-2.13.90.0.10.so
#1  0x400401fc in _bfd_merge_section () from /usr/lib/libbfd-2.13.90.0.10.so
#2  0x400403ce in _bfd_merge_sections () from /usr/lib/libbfd-2.13.90.0.10.so
#3  0x40054ffd in _bfd_elf_merge_sections () from /usr/lib/libbfd-2.13.90.0.10.so
#4  0x08054528 in bfd_link_hash_lookup ()
#5  0x08056ba4 in bfd_link_hash_lookup ()
#6  0x4009e9d3 in __libc_start_main () from /lib/libc.so.6
(gdb) c
Continuing.


Program received signal SIGINT, Interrupt.
0x40075911 in htab_find_slot_with_hash () from /usr/lib/libbfd-2.13.90.0.10.so
(gdb) bt
#0  0x40075911 in htab_find_slot_with_hash () from /usr/lib/libbfd-2.13.90.0.10.so
#1  0x400401fc in _bfd_merge_section () from /usr/lib/libbfd-2.13.90.0.10.so
#2  0x400403ce in _bfd_merge_sections () from /usr/lib/libbfd-2.13.90.0.10.so
#3  0x40054ffd in _bfd_elf_merge_sections () from /usr/lib/libbfd-2.13.90.0.10.so
#4  0x08054528 in bfd_link_hash_lookup ()
#5  0x08056ba4 in bfd_link_hash_lookup ()
#6  0x4009e9d3 in __libc_start_main () from /lib/libc.so.6
(gdb) c
Continuing.

Program received signal SIGINT, Interrupt.
0x4003fd70 in _bfd_merge_section () from /usr/lib/libbfd-2.13.90.0.10.so
(gdb) bt
#0  0x4003fd70 in _bfd_merge_section () from /usr/lib/libbfd-2.13.90.0.10.so
#1  0x400401fc in _bfd_merge_section () from /usr/lib/libbfd-2.13.90.0.10.so
#2  0x400403ce in _bfd_merge_sections () from /usr/lib/libbfd-2.13.90.0.10.so
#3  0x40054ffd in _bfd_elf_merge_sections () from /usr/lib/libbfd-2.13.90.0.10.so
#4  0x08054528 in bfd_link_hash_lookup ()
#5  0x08056ba4 in bfd_link_hash_lookup ()
#6  0x4009e9d3 in __libc_start_main () from /lib/libc.so.6
(gdb) c
Continuing.

Program received signal SIGINT, Interrupt.
0x40075911 in htab_find_slot_with_hash () from /usr/lib/libbfd-2.13.90.0.10.so
(gdb) bt
#0  0x40075911 in htab_find_slot_with_hash () from /usr/lib/libbfd-2.13.90.0.10.so
#1  0x400401fc in _bfd_merge_section () from /usr/lib/libbfd-2.13.90.0.10.so
#2  0x400403ce in _bfd_merge_sections () from /usr/lib/libbfd-2.13.90.0.10.so
#3  0x40054ffd in _bfd_elf_merge_sections () from /usr/lib/libbfd-2.13.90.0.10.so
#4  0x08054528 in bfd_link_hash_lookup ()
#5  0x08056ba4 in bfd_link_hash_lookup ()
#6  0x4009e9d3 in __libc_start_main () from /lib/libc.so.6
(gdb) c
Continuing.

Program received signal SIGINT, Interrupt.
0x40075911 in htab_find_slot_with_hash () from /usr/lib/libbfd-2.13.90.0.10.so
(gdb) bt
#0  0x40075911 in htab_find_slot_with_hash () from /usr/lib/libbfd-2.13.90.0.10.so
#1  0x400401fc in _bfd_merge_section () from /usr/lib/libbfd-2.13.90.0.10.so
#2  0x400403ce in _bfd_merge_sections () from /usr/lib/libbfd-2.13.90.0.10.so
#3  0x40054ffd in _bfd_elf_merge_sections () from /usr/lib/libbfd-2.13.90.0.10.so
#4  0x08054528 in bfd_link_hash_lookup ()
#5  0x08056ba4 in bfd_link_hash_lookup ()
#6  0x4009e9d3 in __libc_start_main () from /lib/libc.so.6
(gdb) Quit
(gdb) bt
#0  0x40075911 in htab_find_slot_with_hash () from /usr/lib/libbfd-2.13.90.0.10.so
#1  0x400401fc in _bfd_merge_section () from /usr/lib/libbfd-2.13.90.0.10.so
#2  0x400403ce in _bfd_merge_sections () from /usr/lib/libbfd-2.13.90.0.10.so
#3  0x40054ffd in _bfd_elf_merge_sections () from /usr/lib/libbfd-2.13.90.0.10.so
#4  0x08054528 in bfd_link_hash_lookup ()
#5  0x08056ba4 in bfd_link_hash_lookup ()
#6  0x4009e9d3 in __libc_start_main () from /lib/libc.so.6
(gdb) c
Continuing.


Program received signal SIGINT, Interrupt.
0x4003fd70 in _bfd_merge_section () from /usr/lib/libbfd-2.13.90.0.10.so
(gdb) bt
#0  0x4003fd70 in _bfd_merge_section () from /usr/lib/libbfd-2.13.90.0.10.so
#1  0x400401fc in _bfd_merge_section () from /usr/lib/libbfd-2.13.90.0.10.so
#2  0x400403ce in _bfd_merge_sections () from /usr/lib/libbfd-2.13.90.0.10.so
#3  0x40054ffd in _bfd_elf_merge_sections () from /usr/lib/libbfd-2.13.90.0.10.so
#4  0x08054528 in bfd_link_hash_lookup ()
#5  0x08056ba4 in bfd_link_hash_lookup ()
#6  0x4009e9d3 in __libc_start_main () from /lib/libc.so.6
(gdb) c
Continuing.

Program received signal SIGINT, Interrupt.
0x40075911 in htab_find_slot_with_hash () from /usr/lib/libbfd-2.13.90.0.10.so
(gdb) bt
#0  0x40075911 in htab_find_slot_with_hash () from /usr/lib/libbfd-2.13.90.0.10.so
#1  0x400401fc in _bfd_merge_section () from /usr/lib/libbfd-2.13.90.0.10.so
#2  0x400403ce in _bfd_merge_sections () from /usr/lib/libbfd-2.13.90.0.10.so
#3  0x40054ffd in _bfd_elf_merge_sections () from /usr/lib/libbfd-2.13.90.0.10.so
#4  0x08054528 in bfd_link_hash_lookup ()
#5  0x08056ba4 in bfd_link_hash_lookup ()
#6  0x4009e9d3 in __libc_start_main () from /lib/libc.so.6
(gdb) c
Continuing.
-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----

I hope this will help.

-- 
Manuel



More information about the Gcc-bugs mailing list