Very long linking time

itkuser@yahoo.fr itkuser@yahoo.fr
Mon Jul 24 09:41:00 GMT 2006


For some time (about 3 weeks), I started noticing very long linking time (5 
minutes or more)  while compiling some libraries. These libraries contained a 
lot of itk code (www.itk.org) and are pretty heavy (~30M in debug version), 
but that wasn't a problem before. It seems that the increase of linking time 
became apparent when I upgraded to gcc 4.1.1. I use binutils 2.17, but 
downgrading to 2.16 or 2.15 doesn't improve linking time.
A quick profiling shows that almost all the time is spent in the function 
bfd_elf_match_symbols_in_sections (called by _bfd_elf_check_kept_section).
My linux is gentoo with kernel 2.6.17.
gcc -v gives:
Utilisation des specs internes.
Target: i686-pc-linux-gnu
Configuré 
avec: /var/tmp/portage/gcc-4.1.1/work/gcc-4.1.1/configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.1.1 --includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.1 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.1/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.1.1/info --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/g++-v4 --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --disable-libunwind-exceptions --disable-multilib --disable-libmudflap --disable-libssp --disable-libgcj --enable-languages=c,c++,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
Modèle de thread: posix
version gcc 4.1.1 (Gentoo 4.1.1)

Thanks for your help,
nicolas



More information about the Binutils mailing list