This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: PR ld/3111: LD very slow linking object files containing dwarf2 symbols
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: "H. J. Lu" <hjl at lucon dot org>
- Cc: binutils at sources dot redhat dot com
- Date: Wed, 30 Aug 2006 16:45:34 +0930
- Subject: Re: PATCH: PR ld/3111: LD very slow linking object files containing dwarf2 symbols
- References: <20060829230012.GA19841@lucon.org>
On Tue, Aug 29, 2006 at 04:00:12PM -0700, H. J. Lu wrote:
> When we are comparing symbols in a section against another section in
> a different file, we swap in 2 symbol tables, sort them and free the
> symbol tables for each section. It is a O^2 problem. When there are
> many sections and symbols in a file, it can be very slow. This patch
> caches the symbol table unless --reduce-memory-overheads is used. The
> results for the testcase are
Remind me again exactly why we are doing symbol comparisons. I
understand that you compare symbols so that old-style .gnu.linkonce
sections can be used along with the newer comdat sections, and only one
copy kept. However, bfd_elf_match_symbols_in_sections also compares one
comdat section with another. Why? If you didn't compare comdat
sections like this, then only people mixing old and new-style link-once
sections would pay a penalty.
--
Alan Modra
IBM OzLabs - Linux Technology Centre