aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-ia64.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2022-07-07 08:49:09 +0930
committerAlan Modra <amodra@gmail.com>2022-07-09 21:47:24 +0930
commit0edfd2985b3ce036bcee5e5d3518eab317018b4d (patch)
tree5c5c2515e77b7670a6dc7d65ad063f52a5a1b7a3 /gas/config/tc-ia64.c
parent7bfc4db2893c5de00197e40ab52394979f83a75d (diff)
downloadfsf-binutils-gdb-0edfd2985b3ce036bcee5e5d3518eab317018b4d.zip
fsf-binutils-gdb-0edfd2985b3ce036bcee5e5d3518eab317018b4d.tar.gz
fsf-binutils-gdb-0edfd2985b3ce036bcee5e5d3518eab317018b4d.tar.bz2
gas: use notes_calloc in string hash
Using notes_calloc means all of the string hash table memory should now be freed before gas exits, even though htab_delete isn't called. This also means that the hash table free_f and del_f must be NULL, because freeing notes obstack memory results in all more recently allocated notes memory being freed too. So hash table resizing won't free any memory, and will be a little faster. Also, htab_delete won't do anything (and be quick about it). Since htab_traverse can also resize hash tables (to make another traversal faster if the table is largely empty), stop that happening when only one traversal is done. * as.h: Reorder hash.h after symbols.h for notes_calloc decl. * hash.h (str_htab_create): Use notes_calloc. Do not free. * symbols.c (resolve_local_symbol_values): Don't resize during hash table traversal. * config/obj-elf.c (elf_frob_file_after_relocs): Likewise. * config/tc-ia64.c (ia64_adjust_symtab, ia64_frob_file): Likewise. * config/tc-nds32.c (nds32_elf_analysis_relax_hint): Likewise.
Diffstat (limited to 'gas/config/tc-ia64.c')
-rw-r--r--gas/config/tc-ia64.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c
index 7fa7e57..3011302 100644
--- a/gas/config/tc-ia64.c
+++ b/gas/config/tc-ia64.c
@@ -11853,7 +11853,7 @@ do_alias (void **slot, void *arg ATTRIBUTE_UNUSED)
void
ia64_adjust_symtab (void)
{
- htab_traverse (alias_hash, do_alias, NULL);
+ htab_traverse_noresize (alias_hash, do_alias, NULL);
}
/* It renames the original section name to its alias. */
@@ -11878,7 +11878,7 @@ do_secalias (void **slot, void *arg ATTRIBUTE_UNUSED)
void
ia64_frob_file (void)
{
- htab_traverse (secalias_hash, do_secalias, NULL);
+ htab_traverse_noresize (secalias_hash, do_secalias, NULL);
}
#ifdef TE_VMS