]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Make the default gas symbol hash table larger
authorAlan Modra <amodra@gmail.com>
Fri, 14 Jul 2023 01:18:27 +0000 (10:48 +0930)
committerAlan Modra <amodra@gmail.com>
Fri, 14 Jul 2023 02:31:41 +0000 (12:01 +0930)
We may as well start with the symbol table a little larger, saving
time resizing.  Even a simple C hello world compiled with -O2 -g will
exceed 16 symbols (by well over 3 times with gcc-11).

* symbols.c (symbol_begin): Create sy_hash with more entries.

gas/symbols.c

index a335c3169031565110d9b3a17b18cbd639c21975..ea05801e35620a5a533a3933816f8d086f4dabfb 100644 (file)
@@ -3103,7 +3103,7 @@ symbol_begin (void)
 {
   symbol_lastP = NULL;
   symbol_rootP = NULL;         /* In case we have 0 symbols (!!)  */
-  sy_hash = htab_create_alloc (16, hash_symbol_entry, eq_symbol_entry,
+  sy_hash = htab_create_alloc (1024, hash_symbol_entry, eq_symbol_entry,
                               NULL, xcalloc, free);
 
 #if defined (EMIT_SECTION_SYMBOLS) || !defined (RELOC_REQUIRES_SYMBOL)