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 /bfd/elf64-ia64-vms.c | |
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 'bfd/elf64-ia64-vms.c')
-rw-r--r-- | bfd/elf64-ia64-vms.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/bfd/elf64-ia64-vms.c b/bfd/elf64-ia64-vms.c index 3353f51..c72015b 100644 --- a/bfd/elf64-ia64-vms.c +++ b/bfd/elf64-ia64-vms.c @@ -990,7 +990,7 @@ elf64_ia64_local_htab_eq (const void *ptr1, const void *ptr2) /* Free the global elf64_ia64_dyn_sym_info array. */ static bool -elf64_ia64_global_dyn_info_free (void **xentry, +elf64_ia64_global_dyn_info_free (struct elf_link_hash_entry *xentry, void * unused ATTRIBUTE_UNUSED) { struct elf64_ia64_link_hash_entry *entry @@ -1090,7 +1090,7 @@ struct elf64_ia64_dyn_sym_traverse_data }; static bool -elf64_ia64_global_dyn_sym_thunk (struct bfd_hash_entry *xentry, +elf64_ia64_global_dyn_sym_thunk (struct elf_link_hash_entry *xentry, void * xdata) { struct elf64_ia64_link_hash_entry *entry @@ -4767,7 +4767,7 @@ elf64_vms_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) hope of using a dynamic object which does not exactly match the format of the output file. */ if (bfd_link_relocatable (info) - || !is_elf_hash_table (htab) + || !is_elf_hash_table (&htab->root) || info->output_bfd->xvec != abfd->xvec) { if (bfd_link_relocatable (info)) @@ -4786,7 +4786,7 @@ elf64_vms_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) format. FIXME: If there are no input BFD's of the same format as the output, we can't make a shared library. */ if (bfd_link_pic (info) - && is_elf_hash_table (htab) + && is_elf_hash_table (&htab->root) && info->output_bfd->xvec == abfd->xvec && !htab->dynamic_sections_created) { @@ -4794,7 +4794,7 @@ elf64_vms_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) goto error_return; } } - else if (!is_elf_hash_table (htab)) + else if (!is_elf_hash_table (&htab->root)) goto error_return; else { @@ -5034,7 +5034,7 @@ elf64_vms_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) *sym_hash = h; - if (is_elf_hash_table (htab)) + if (is_elf_hash_table (&htab->root)) { while (h->root.type == bfd_link_hash_indirect || h->root.type == bfd_link_hash_warning) @@ -5103,7 +5103,7 @@ elf64_vms_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) h->root.u.c.p->alignment_power = old_alignment; } - if (is_elf_hash_table (htab)) + if (is_elf_hash_table (&htab->root)) { /* Check the alignment when a common symbol is involved. This can change when a common symbol is overridden by a normal @@ -5257,7 +5257,7 @@ elf64_vms_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) I have no idea how to handle linking PIC code into a file of a different format. It probably can't be done. */ if (! dynamic - && is_elf_hash_table (htab) + && is_elf_hash_table (&htab->root) && bed->check_relocs != NULL && (*bed->relocs_compatible) (abfd->xvec, info->output_bfd->xvec)) { |