bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GNU ld version 2.13.90.0.2 extreme (>1000 times) slowness


From: Keith Slavin
Subject: GNU ld version 2.13.90.0.2 extreme (>1000 times) slowness
Date: Sun, 09 Feb 2003 10:58:58 -0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020830

I have just installed Red Hat Linux 8 on my 1GHz AMD Athalon machine. Everything is working fine, except that final linking of one of my applications is taking a VERY VERY long time (17 minutes with ld version 2.13.90.0.2 verses about 1 second using ld version 2.10.90).

I timed the runs (see below), also showing that the CPU is over 90% busy in ld itself. There is 1GByte of system RAM, and linking only uses 47MBytes.

I traced the problem back to ld by copying the old version (and its .so file) and temporarily swapping old and new in /usr/bin. While the final program worked, so this is not strictly a bug, I believe that a factor of 1000 slowdown probably qualifies it as such. It is certainly very painful for my development work, and forces me to use the old linker.

I can give you the object files on request, so you can duplicate the problem if you wish, but they are fairly large. The output executable sizes are: 26210740 bytes for the new (slow) loader, and 26646358 bytes for the old.

Thanks,

   Keith


Here is the link line (using -static with both new and old as this was needed for the old loader to work, but static verses dynamic linking does not seem to affect the linking speed):

time gcc -static cache_cda.o cda_interface.o cda_main.o cpu_interface_cda.o my_getopt.o read_ppm_header.o resizer.o resizer_interface.o /home/kslavin/atools/libraries/asim/wrapper_lib.o /home/kslavin/atools/libraries/asim/asim_lib.o ../../o_intermediates/age_machine.o ../../o_intermediates/asim_models.o ../../o_intermediates/cache_update.o ../../o_intermediates/cda_cache.o ../../o_intermediates/dram.model.o ../../o_intermediates/get_transfer_mask.o ../../o_intermediates/mask_table.o ../../o_intermediates/system_RAM_CDA.o ../../o_intermediates/top_level.model.o ../../o_intermediates/transfer_machine.o -o cda2_sim -lm -lpthread -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --host=i386-redhat-linux --with-system-zlib --enable-__cxa_atexit
Thread model: posix
gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
/usr/lib/gcc-lib/i386-redhat-linux/3.2/collect2 -m elf_i386 -static -o cda2_sim /usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../crt1.o /usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../crti.o /usr/lib/gcc-lib/i386-redhat-linux/3.2/crtbeginT.o -L/usr/lib/gcc-lib/i386-redhat-linux/3.2 -L/usr/lib/gcc-lib/i386-redhat-linux/3.2/../../.. cache_cda.o cda_interface.o cda_main.o cpu_interface_cda.o my_getopt.o read_ppm_header.o resizer.o resizer_interface.o /home/kslavin/atools/libraries/asim/wrapper_lib.o /home/kslavin/atools/libraries/asim/asim_lib.o ../../o_intermediates/age_machine.o ../../o_intermediates/asim_models.o ../../o_intermediates/cache_update.o ../../o_intermediates/cda_cache.o ../../o_intermediates/dram.model.o ../../o_intermediates/get_transfer_mask.o ../../o_intermediates/mask_table.o ../../o_intermediates/system_RAM_CDA.o ../../o_intermediates/top_level.model.o ../../o_intermediates/transfer_machine.o -lm -lpthread -lgcc -lgcc_eh -lc -lgcc -lgcc_eh /usr/lib/gcc-lib/i386-redhat-linux/3.2/crtend.o /usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../crtn.o

real    17m48.835s
user    16m11.469s                        <--------------- NOTE!!!!!!!
sys     0m1.893s


If I temporarily replace ld using the old GNU ld version 2.10.90 (also with the -static flag), I get the following:

time gcc -static cache_cda.o cda_interface.o cda_main.o cpu_interface_cda.o my_getopt.o read_ppm_header.o resizer.o resizer_interface.o /home/kslavin/atools/libraries/asim/wrapper_lib.o /home/kslavin/atools/libraries/asim/asim_lib.o ../../o_intermediates/age_machine.o ../../o_intermediates/asim_models.o ../../o_intermediates/cache_update.o ../../o_intermediates/cda_cache.o ../../o_intermediates/dram.model.o ../../o_intermediates/get_transfer_mask.o ../../o_intermediates/mask_table.o ../../o_intermediates/system_RAM_CDA.o ../../o_intermediates/top_level.model.o ../../o_intermediates/transfer_machine.o -o cda2_sim -lm -lpthread -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --host=i386-redhat-linux --with-system-zlib --enable-__cxa_atexit
Thread model: posix
gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
/usr/lib/gcc-lib/i386-redhat-linux/3.2/collect2 -m elf_i386 -static -o cda2_sim /usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../crt1.o /usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../crti.o /usr/lib/gcc-lib/i386-redhat-linux/3.2/crtbeginT.o -L/usr/lib/gcc-lib/i386-redhat-linux/3.2 -L/usr/lib/gcc-lib/i386-redhat-linux/3.2/../../.. cache_cda.o cda_interface.o cda_main.o cpu_interface_cda.o my_getopt.o read_ppm_header.o resizer.o resizer_interface.o /home/kslavin/atools/libraries/asim/wrapper_lib.o /home/kslavin/atools/libraries/asim/asim_lib.o ../../o_intermediates/age_machine.o ../../o_intermediates/asim_models.o ../../o_intermediates/cache_update.o ../../o_intermediates/cda_cache.o ../../o_intermediates/dram.model.o ../../o_intermediates/get_transfer_mask.o ../../o_intermediates/mask_table.o ../../o_intermediates/system_RAM_CDA.o ../../o_intermediates/top_level.model.o ../../o_intermediates/transfer_machine.o -lm -lpthread -lgcc -lgcc_eh -lc -lgcc -lgcc_eh /usr/lib/gcc-lib/i386-redhat-linux/3.2/crtend.o /usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../crtn.o

real    0m1.868s
user    0m0.949s                        <--------------- NOTE!!!!!!!
sys     0m0.527s







reply via email to

[Prev in Thread] Current Thread [Next in Thread]