nds32: Rename __BIT() to N32_BIT().
[deliverable/binutils-gdb.git] / bfd / elfxx-x86.c
index e056c3c5ff4d9eedbe18c20bd73d3a62a0a04cb9..c41dbeff762419d775566c7e14e2b80d3c416784 100644 (file)
@@ -107,10 +107,7 @@ elf_x86_allocate_dynrelocs (struct elf_link_hash_entry *h,
 
   plt_entry_size = htab->plt.plt_entry_size;
 
-  resolved_to_zero = UNDEFINED_WEAK_RESOLVED_TO_ZERO (info,
-                                                     bed->target_id,
-                                                     eh->has_got_reloc,
-                                                     eh);
+  resolved_to_zero = UNDEFINED_WEAK_RESOLVED_TO_ZERO (info, eh);
 
   /* Clear the reference count of function pointer relocations if
      symbol isn't a normal function.  */
@@ -1446,19 +1443,12 @@ bfd_boolean
 _bfd_x86_elf_fixup_symbol (struct bfd_link_info *info,
                           struct elf_link_hash_entry *h)
 {
-  if (h->dynindx != -1)
+  if (h->dynindx != -1
+      && UNDEFINED_WEAK_RESOLVED_TO_ZERO (info, elf_x86_hash_entry (h)))
     {
-      const struct elf_backend_data *bed
-       = get_elf_backend_data (info->output_bfd);
-      if (UNDEFINED_WEAK_RESOLVED_TO_ZERO (info,
-                                          bed->target_id,
-                                          elf_x86_hash_entry (h)->has_got_reloc,
-                                          elf_x86_hash_entry (h)))
-       {
-         h->dynindx = -1;
-         _bfd_elf_strtab_delref (elf_hash_table (info)->dynstr,
-                                 h->dynstr_index);
-       }
+      h->dynindx = -1;
+      _bfd_elf_strtab_delref (elf_hash_table (info)->dynstr,
+                             h->dynstr_index);
     }
   return TRUE;
 }
@@ -1701,15 +1691,14 @@ _bfd_x86_elf_link_symbol_references_local (struct bfd_link_info *info,
      by linker version script.  A weak undefined symbol is forced local
      if
      1. It has non-default visibility.  Or
-     2. When building executable, it has non-GOT/non-PLT relocations
-       in text section or there is no dynamic linker.  Or
+     2. When building executable, there is no dynamic linker.  Or
      3. or "-z nodynamic-undefined-weak" is used.
    */
   if (SYMBOL_REFERENCES_LOCAL (info, h)
       || (h->root.type == bfd_link_hash_undefweak
          && (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
              || (bfd_link_executable (info)
-                 && (htab->interp == NULL || eh->has_non_got_reloc))
+                 && htab->interp == NULL)
              || info->dynamic_undefined_weak == 0))
       || ((h->def_regular || ELF_COMMON_DEF_P (h))
          && h->versioned == unversioned
This page took 0.02325 seconds and 4 git commands to generate.