]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
PR ld/13311
authorAlan Modra <amodra@gmail.com>
Tue, 25 Oct 2011 03:13:32 +0000 (03:13 +0000)
committerAlan Modra <amodra@gmail.com>
Tue, 25 Oct 2011 03:13:32 +0000 (03:13 +0000)
2011-10-19  Alan Modra  <amodra@gmail.com>
* elflink.c (elf_link_output_extsym): Correct test for warning when
forced local executable syms are referenced from shared libraries.

bfd/ChangeLog
bfd/elflink.c

index 9513fb737f9526ff8816a10df05c5643625566c2..a5227905bb9e7e2daa4e3b328d4f2f416a9a338d 100644 (file)
@@ -1,6 +1,11 @@
 2011-10-25  Alan Modra  <amodra@gmail.com>
 
        Apply mainline patches
+       2011-10-19  Alan Modra  <amodra@gmail.com>
+       PR ld/13311
+       * elflink.c (elf_link_output_extsym): Correct test for warning when
+       forced local executable syms are referenced from shared libraries.
+
        2011-10-19  Alan Modra  <amodra@gmail.com>
        PR ld/13254
        * elflink.c (bfd_elf_final_link): Emit error_textrel error.
index be0a6ce1cbe3d97c4dcd054c6186c25c8797c295..dfd9b43c93ce19b9e428b510d144d138a1b7c28d 100644 (file)
@@ -8659,10 +8659,11 @@ elf_link_output_extsym (struct bfd_hash_entry *bh, void *data)
 
   /* We should also warn if a forced local symbol is referenced from
      shared libraries.  */
-  if (! finfo->info->relocatable
-      && (! finfo->info->shared)
+  if (!finfo->info->relocatable
+      && finfo->info->executable
       && h->forced_local
       && h->ref_dynamic
+      && h->def_regular
       && !h->dynamic_def
       && !h->dynamic_weak
       && ! elf_link_check_versioned_symbol (finfo->info, bed, h))