[PATCH] bfin: Don't call bfd_elf_link_record_dynamic_symbol
H.J. Lu
hjl.tools@gmail.com
Tue Dec 29 18:45:51 GMT 2020
bfinfdpic_check_relocs shouldn't call bfd_elf_link_record_dynamic_symbol
since it has been called from elf_link_add_object_symbols. This fixed:
FAIL: ld-elf/pr26979a
FAIL: ld-elf/pr26979b
FAIL: Symbol export class test (final shared object)
* elf32-bfin.c (bfinfdpic_check_relocs): Don't call
bfd_elf_link_record_dynamic_symbol.
---
bfd/elf32-bfin.c | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)
diff --git a/bfd/elf32-bfin.c b/bfd/elf32-bfin.c
index ab928530db..931dd0d007 100644
--- a/bfd/elf32-bfin.c
+++ b/bfd/elf32-bfin.c
@@ -4559,22 +4559,10 @@ bfinfdpic_check_relocs (bfd *abfd, struct bfd_link_info *info,
break;
}
if (h != NULL)
- {
- if (h->dynindx == -1)
- switch (ELF_ST_VISIBILITY (h->other))
- {
- case STV_INTERNAL:
- case STV_HIDDEN:
- break;
- default:
- bfd_elf_link_record_dynamic_symbol (info, h);
- break;
- }
- picrel
- = bfinfdpic_relocs_info_for_global (bfinfdpic_relocs_info (info),
- abfd, h,
- rel->r_addend, INSERT);
- }
+ picrel
+ = bfinfdpic_relocs_info_for_global (bfinfdpic_relocs_info (info),
+ abfd, h,
+ rel->r_addend, INSERT);
else
picrel = bfinfdpic_relocs_info_for_local (bfinfdpic_relocs_info
(info), abfd, r_symndx,
--
2.29.2
More information about the Binutils
mailing list