PR ld/13311
authorAlan Modra <amodra@gmail.com>
Wed, 19 Oct 2011 05:24:38 +0000 (05:24 +0000)
committerAlan Modra <amodra@gmail.com>
Wed, 19 Oct 2011 05:24:38 +0000 (05:24 +0000)
* 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 956e3c745f689e27c9668e14778d5169ba258039..ec54e217ecf5fe92394f8a5cb0c34c9fea17821b 100644 (file)
@@ -1,3 +1,9 @@
+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
index bd1f2f23d5c3e0099d422c7f8a57f235159845df..9956e814817b5888901a7e436fa004737ba440ea 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))