aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf-bfd.h
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2024-04-05 16:37:58 -0700
committerH.J. Lu <hjl.tools@gmail.com>2024-04-05 16:49:09 -0700
commit816fd3dced1b2e94789b6d7d1d1fab1988e8e05d (patch)
tree7217b8b181591477c84c29ce493233a8b1764d7b /bfd/elf-bfd.h
parentc0419c024bf922128131671e40de0aed736e38ed (diff)
downloadgdb-816fd3dced1b2e94789b6d7d1d1fab1988e8e05d.zip
gdb-816fd3dced1b2e94789b6d7d1d1fab1988e8e05d.tar.gz
gdb-816fd3dced1b2e94789b6d7d1d1fab1988e8e05d.tar.bz2
elf: Use elf_link_first_hash_entry for first_hash
Add elf_link_first_hash_entry and use it for first_hash. Free first_hash before freeing the main hash table. PR ld/31482 PR ld/31489 * elf-bfd.h (elf_link_hash_table): Change first_hash to bfd_hash_table. * elflink.c (elf_link_first_hash_entry): New. (elf_link_first_hash_newfunc): Likewise. (elf_link_add_to_first_hash): Updated. (elf_link_add_object_symbols): Initialize first_hash with elf_link_first_hash_newfunc. (elf_link_add_object_symbols): Updated. (elf_link_add_archive_symbols): Likewise. (_bfd_elf_link_hash_table_free): Free first_hash before freeing the main hash table.
Diffstat (limited to 'bfd/elf-bfd.h')
-rw-r--r--bfd/elf-bfd.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index cf043d6..85e6648 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -739,7 +739,7 @@ struct elf_link_hash_table
/* Hash table of symbols which are first defined in archives or shared
objects when there are any IR inputs. */
- struct bfd_link_hash_table *first_hash;
+ struct bfd_hash_table *first_hash;
/* Short-cuts to get to dynamic linker sections. */
asection *sgot;