MIPS/BFD: Remove extraneous undefined weak symbol visibility check
authorMaciej W. Rozycki <macro@mips.com>
Fri, 29 Jun 2018 14:45:28 +0000 (15:45 +0100)
committerMaciej W. Rozycki <macro@mips.com>
Fri, 29 Jun 2018 14:45:28 +0000 (15:45 +0100)
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.

bfd/ChangeLog
bfd/elfxx-mips.c

index f9dfd53898b19fc2cbba05a361dacff1e81b949f..9cfd1c9068b3210b057b7fc52aad16707de6213e 100644 (file)
@@ -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.
index 3adfead84b83ef45cb463b754781f83847ca6314..82ab417dded9ec1a262c242342c3ece17bf90359 100644 (file)
@@ -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
This page took 0.030554 seconds and 4 git commands to generate.