aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@mips.com>2018-06-29 15:45:28 +0100
committerMaciej W. Rozycki <macro@mips.com>2018-06-29 15:45:28 +0100
commit262e07d0115adc08cf7481689d9d146a01ee5bb8 (patch)
treec79b78da7fc25318619e4723734f997d618a924f
parentee9439704485a1e9413470fe2634b164fa31644f (diff)
downloadgdb-262e07d0115adc08cf7481689d9d146a01ee5bb8.zip
gdb-262e07d0115adc08cf7481689d9d146a01ee5bb8.tar.gz
gdb-262e07d0115adc08cf7481689d9d146a01ee5bb8.tar.bz2
MIPS/BFD: Remove extraneous undefined weak symbol visibility check
Remove an extraneous symbol visibility check made for undefined weak symbols in determination whether an R_MIPS_REL32 dynamic relocation has to be placed in output, complementing commit ad9512030937 ("mips: Check UNDEFWEAK_NO_DYNAMIC_RELOC"). That check duplicates one already made by the UNDEFWEAK_NO_DYNAMIC_RELOC macro as a part of a broader condition used to decide if to enter undefined weak symbols to the dynamic symbol table or not. bfd/ * elfxx-mips.c (allocate_dynrelocs): Remove extraneous symbol visibility check made for undefined weak symbols.
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elfxx-mips.c7
2 files changed, 8 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index f9dfd53..9cfd1c9 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2018-06-29 Maciej W. Rozycki <macro@mips.com>
+
+ * elfxx-mips.c (allocate_dynrelocs): Remove extraneous symbol
+ visibility check made for undefined weak symbols.
+
2018-06-26 Nick Clifton <nickc@redhat.com>
* po/uk.po: Updated Ukranian translation.
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 3adfead..82ab417 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -8951,10 +8951,9 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf)
if (h->root.type == bfd_link_hash_undefweak)
{
- /* Do not copy relocations for undefined weak symbols with
- non-default visibility. */
- if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
- || UNDEFWEAK_NO_DYNAMIC_RELOC (info, h))
+ /* Do not copy relocations for undefined weak symbols that
+ we are not going to export. */
+ if (UNDEFWEAK_NO_DYNAMIC_RELOC (info, h))
do_copy = FALSE;
/* Make sure undefined weak symbols are output as a dynamic