Automatic date update in version.in
[deliverable/binutils-gdb.git] / bfd / elf64-s390.c
index a7a844521f0d7a6573b90184e2f9862b5d0328da..75499714637c60093cd0e9c5adb8f2026f27b01f 100644 (file)
@@ -1,5 +1,5 @@
 /* IBM S/390-specific support for 64-bit ELF
-   Copyright (C) 2000-2017 Free Software Foundation, Inc.
+   Copyright (C) 2000-2018 Free Software Foundation, Inc.
    Contributed Martin Schwidefsky (schwidefsky@de.ibm.com).
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -1433,8 +1433,7 @@ elf_s390_adjust_dynamic_symbol (struct bfd_link_info *info,
     {
       if (h->plt.refcount <= 0
          || SYMBOL_CALLS_LOCAL (info, h)
-         || (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
-             && h->root.type == bfd_link_hash_undefweak))
+         || UNDEFWEAK_NO_DYNAMIC_RELOC (info, h))
        {
          /* This case can occur if we saw a PLT32 reloc in an input
             file, but the symbol was never referred to by a dynamic
@@ -1669,8 +1668,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h,
        htab->elf.srelgot->size += sizeof (Elf64_External_Rela);
       else if (tls_type == GOT_TLS_GD)
        htab->elf.srelgot->size += 2 * sizeof (Elf64_External_Rela);
-      else if ((ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
-               || h->root.type != bfd_link_hash_undefweak)
+      else if (!UNDEFWEAK_NO_DYNAMIC_RELOC (info, h)
               && (bfd_link_pic (info)
                   || WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h)))
        htab->elf.srelgot->size += sizeof (Elf64_External_Rela);
@@ -2313,8 +2311,7 @@ elf_s390_relocate_section (bfd *output_bfd,
                                                          h)
                       || (bfd_link_pic (info)
                           && SYMBOL_REFERENCES_LOCAL (info, h))
-                      || (ELF_ST_VISIBILITY (h->other)
-                          && h->root.type == bfd_link_hash_undefweak))
+                      || resolved_to_zero)
                {
                  /* This is actually a static link, or it is a
                     -Bsymbolic link and the symbol is defined
@@ -3417,6 +3414,9 @@ elf_s390_finish_dynamic_symbol (bfd *output_bfd,
       else if (bfd_link_pic (info)
               && SYMBOL_REFERENCES_LOCAL (info, h))
        {
+         if (UNDEFWEAK_NO_DYNAMIC_RELOC (info, h))
+           return TRUE;
+
          /* If this is a static link, or it is a -Bsymbolic link and
             the symbol is defined locally or was forced to be local
             because of a version file, we just want to emit a
This page took 0.024531 seconds and 4 git commands to generate.