This is the mail archive of the binutils@sourceware.org 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]

Re: Another linker performance issue


Hmm, your patch has in 'pe_undef_fill' an out-of-bounds access to
allocated key-string.  Also the storing of the link-hash-entry is a
bad idea, as it invalidates over the run.

I get testsuite failures for 32-bit in

FAIL: linking client (.dll) fastcall/stdcall
FAIL: linking client (.sl) fastcall/stdcall
FAIL: linking client (symlink -> .dll) fastcall/stdcall
FAIL: linking client (symlink -> .sl) fastcall/stdcall

Regards,
Kai

2012/3/2 Pascal Obry <pascal@obry.net>:
> Kai,
>
>> Hmm, we could also do in the first call for bfd_link_hash_traverse
>> build up a table for undefined-symbol names only.
>> And then do the actual operations based on this candidate list only?
>>
>> We avoid here at least to run over all symbols in hash_table multiple times
>
> Right. This is close to what I was proposing I think. I've gone this
> path but not implementing a new hash table. I've created an array with a
> key and associated bfd_link_hash_entry. This array is sorted and
> searched using bsearch(). In my small test case the time went from 7s to
> 0.3s. Looks promising.
>
> Please see attached patch. Bear in mind that I've a limited knowledge in
> binutils internal. The patch is a first attempt to fix this issue, I'm
> still wondering if it is correct and at least equivalent to the previous
> code.
>
> Please review and let me know if this is going in the right direction.
>
> Thanks.
>
> Pascal.
>
> --
>
> --|------------------------------------------------------
> --| Pascal Obry ? ? ? ? ? ? ? ? ? ? ? ? ? Team-Ada Member
> --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
> --|------------------------------------------------------
> --| ? ?http://www.obry.net ?- ?http://v2p.fr.eu.org
> --| "The best way to travel is by means of imagination"
> --|
> --| gpg --keyserver keys.gnupg.net --recv-key F949BD3B
>



-- 
|? (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination


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