This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: PATCH: Speed up ELF section merge
- From: "H. J. Lu" <hjl at lucon dot org>
- To: binutils at sources dot redhat dot com
- Date: Sun, 1 May 2005 19:28:39 -0700
- Subject: Re: PATCH: Speed up ELF section merge
- References: <20050430194030.GB17821@lucon.org> <20050502021728.GC9133@bubble.grove.modra.org>
On Mon, May 02, 2005 at 11:47:28AM +0930, Alan Modra wrote:
> On Sat, Apr 30, 2005 at 12:40:30PM -0700, H. J. Lu wrote:
> > + bfd_hash_set_default_size (16699);
> > +
>
> This changes the default for all hash tables created after this point.
> I don't think that is wise, and in any case doesn't match your stated
> aim of increasing the merge hash table.
>
> > if (! bfd_hash_table_init (&table->table, sec_merge_hash_newfunc))
>
> Instead use bfd_hash_table_init_n here.
>
Here is the new one.
H.J.
----
2005-05-01 H.J. Lu <hongjiu.lu@intel.com>
* merge.c (sec_merge_init): Call bfd_hash_table_init_n with
hash table size 16699 instead of bfd_hash_table_init.
--- bfd/merge.c.hash 2005-04-15 18:51:49.000000000 -0700
+++ bfd/merge.c 2005-05-01 19:25:42.000000000 -0700
@@ -241,7 +241,8 @@ sec_merge_init (unsigned int entsize, bf
if (table == NULL)
return NULL;
- if (! bfd_hash_table_init (&table->table, sec_merge_hash_newfunc))
+ if (! bfd_hash_table_init_n (&table->table, sec_merge_hash_newfunc,
+ 16699))
{
free (table);
return NULL;