aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2023-07-14 10:48:27 +0930
committerAlan Modra <amodra@gmail.com>2023-07-14 12:01:41 +0930
commita879fdb267171e2dfaccd3047dc5ae6d0f4bdc7e (patch)
treeaf3b27d8e94282d20a1075910ee1a52d7ada720f
parent4993e5cc1e2e1e192f56f5788453c1b6f9cca894 (diff)
downloadgdb-a879fdb267171e2dfaccd3047dc5ae6d0f4bdc7e.zip
gdb-a879fdb267171e2dfaccd3047dc5ae6d0f4bdc7e.tar.gz
gdb-a879fdb267171e2dfaccd3047dc5ae6d0f4bdc7e.tar.bz2
Make the default gas symbol hash table larger
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.
-rw-r--r--gas/symbols.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gas/symbols.c b/gas/symbols.c
index a335c31..ea05801 100644
--- a/gas/symbols.c
+++ b/gas/symbols.c
@@ -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)