diff options
author | Alan Modra <amodra@gmail.com> | 2021-04-12 17:16:03 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2021-04-12 21:19:02 +0930 |
commit | 2cc15b10e5ce606e8348b7cf9b89ec06541231c5 (patch) | |
tree | 583cb501aed91a00ff9d41c3ce46a3eef8e3e843 /ld | |
parent | b585e899960202fbe3c137cbf765f75b088592fe (diff) | |
download | gdb-2cc15b10e5ce606e8348b7cf9b89ec06541231c5.zip gdb-2cc15b10e5ce606e8348b7cf9b89ec06541231c5.tar.gz gdb-2cc15b10e5ce606e8348b7cf9b89ec06541231c5.tar.bz2 |
convert elf_link_hash macros to inline functions
Involves a bit of editing as we now need to be more precise in pointer
types.
bfd/
* elf-bfd.h (is_elf_hash_table): Convert macro to inline function.
(elf_link_hash_lookup, elf_link_hash_traverse): Likewise.
(elf_hash_table, elf_hash_table_id): Likewise.
* elf32-arm.c (elf32_arm_setup_section_lists): Delete redundant
is_elf_hash_table check.
* elf32-csky.c (elf32_csky_setup_section_lists): Likewise.
* elf32-hppa.c (clobber_millicode_symbols): Correct param types.
* elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
* elfnn-ia64.c (elfNN_ia64_global_dyn_info_free: Likewise.
(elfNN_ia64_global_dyn_sym_thunk: Likewise.
* elf64-ia64-vms.c (elf64_ia64_global_dyn_info_free): Likewise.
(elf64_ia64_global_dyn_sym_thunk): Likewise.
(elf64_vms_link_add_object_symbols): Pass base type of hash table
to is_elf_hash_table.
* elflink.c (_bfd_elf_dynamic_symbol_p): Likewise.
(_bfd_elf_symbol_refs_local_p, _bfd_elf_add_dynamic_entry): Likewise.
(_bfd_elf_strip_zero_sized_dynamic_sections): Likewise.
(_bfd_elf_link_check_relocs, elf_link_add_object_symbols): Likewise.
(bfd_elf_final_link): Likewise.
* elfnn-aarch64.c (elfNN_aarch64_setup_section_lists): Likewise.
* elf64-ppc.c (ppc64_elf_set_toc): Likewise. Use bfd_link_hash_lookup.
ld/
* emultempl/mipself.em (mips_create_output_section_statements):
Pass base type of hash table to is_elf_hash_table.
* ldelf.c (ldelf_after_open): Likewise.
Diffstat (limited to 'ld')
-rw-r--r-- | ld/ChangeLog | 6 | ||||
-rw-r--r-- | ld/emultempl/mipself.em | 2 | ||||
-rw-r--r-- | ld/ldelf.c | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog index aad02a2..244f286 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,5 +1,11 @@ 2021-04-12 Alan Modra <amodra@gmail.com> + * emultempl/mipself.em (mips_create_output_section_statements): + Pass base type of hash table to is_elf_hash_table. + * ldelf.c (ldelf_after_open): Likewise. + +2021-04-12 Alan Modra <amodra@gmail.com> + PR 27719 * ldlang.c (lang_mark_undefineds, undef_start_stop): Test that the symbol hash table is the correct type before accessing diff --git a/ld/emultempl/mipself.em b/ld/emultempl/mipself.em index 8f28fcd..a31ad44 100644 --- a/ld/emultempl/mipself.em +++ b/ld/emultempl/mipself.em @@ -197,7 +197,7 @@ mips_create_output_section_statements (void) struct elf_link_hash_table *htab; htab = elf_hash_table (&link_info); - if (is_elf_hash_table (htab) && is_mips_elf (link_info.output_bfd)) + if (is_elf_hash_table (&htab->root) && is_mips_elf (link_info.output_bfd)) _bfd_mips_elf_linker_flags (&link_info, insn32, ignore_branch_isa, ${gnu_target}); @@ -1001,7 +1001,7 @@ ldelf_after_open (int use_libpath, int native, int is_linux, int is_freebsd, after_open_default (); htab = elf_hash_table (&link_info); - if (!is_elf_hash_table (htab)) + if (!is_elf_hash_table (&htab->root)) return; if (command_line.out_implib_filename) |