aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf-bfd.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2021-04-12 17:16:58 +0930
committerAlan Modra <amodra@gmail.com>2021-04-12 21:19:02 +0930
commitb585e899960202fbe3c137cbf765f75b088592fe (patch)
treefe63d180fe988f6a6cd54eea6706eac2ae792328 /bfd/elf-bfd.h
parentf5b10973531cdda7e1aba7496f70476b5146fcf8 (diff)
downloadgdb-b585e899960202fbe3c137cbf765f75b088592fe.zip
gdb-b585e899960202fbe3c137cbf765f75b088592fe.tar.gz
gdb-b585e899960202fbe3c137cbf765f75b088592fe.tar.bz2
elf_backend_archive_symbol_lookup
elf_backend_archive_symbol_lookup might be called when the linker hash table has entries of type generic_link_hash_entry. This happens for instance when running the mmix target linker testsuite where the output is mmo but input is elf64-mmix. * elf-bfd.h (struct elf_backend_data): Return bfd_link_hash_entry* from elf_backend_archive_symbol_lookup. (_bfd_elf_archive_symbol_lookup): Return bfd_link_hash_entry*. * elf64-ppc.c (ppc64_elf_archive_symbol_lookup): Likewise. Check we have a ppc_hash_table before accessing ppc_link_hash_entry fields. * elflink.c (_bfd_elf_archive_symbol_lookup): Return bfd_link_hash_entry*. (elf_link_add_archive_symbols): Adjust to suit.
Diffstat (limited to 'bfd/elf-bfd.h')
-rw-r--r--bfd/elf-bfd.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index 296b80a..6f9d737 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -975,7 +975,7 @@ struct elf_backend_data
/* A function to return the linker hash table entry of a symbol that
might be satisfied by an archive symbol. */
- struct elf_link_hash_entry * (*elf_backend_archive_symbol_lookup)
+ struct bfd_link_hash_entry * (*elf_backend_archive_symbol_lookup)
(bfd *, struct bfd_link_info *, const char *);
/* Return true if local section symbols should have a non-null st_name.
@@ -2581,7 +2581,7 @@ extern bool _bfd_elf_relocs_compatible
extern bool _bfd_elf_notice_as_needed
(bfd *, struct bfd_link_info *, enum notice_asneeded_action);
-extern struct elf_link_hash_entry *_bfd_elf_archive_symbol_lookup
+extern struct bfd_link_hash_entry *_bfd_elf_archive_symbol_lookup
(bfd *, struct bfd_link_info *, const char *);
extern bool bfd_elf_link_add_symbols
(bfd *, struct bfd_link_info *);