Linking windows dll slow / huge section count the problem?

Christian Ehrlicher Ch.Ehrlicher@gmx.de
Mon Jun 27 13:10:00 GMT 2005
Hello

I've the same problem like described in the thread 'performance problem when
linking for windows'. But I don't use BOOST so I need another solution.
First I don't understand why gcc creates so much sections so ld is getting
very slow (gprof says that bfd_pei_swap_sym_in is called 158296779 times!)
How can I avoid this?
Also I recognized that the sections are stored within a linked list which
makes it more worse since coff_section_from_bfd_index is walking through
this list. A quick solution for me was to save the section found in a static
var and start over with this within the next call which reduces the time for
coff_section_from_bfd_index from 4.26 to 1.47 seconds. This works because
the linked list seems to be sorted and coff_section_from_bfd_index is also
called with increasing index most the time.

Any ideas?
Christian

-- 
Geschenkt: 3 Monate GMX ProMail gratis + 3 Ausgaben stern gratis
++ Jetzt anmelden & testen ++ http://www.gmx.net/de/go/promail ++



More information about the Binutils mailing list