Correct elf_merge_st_other arguments for weak symbols
authorAlan Modra <amodra@gmail.com>
Sat, 14 Dec 2013 02:40:04 +0000 (13:10 +1030)
committerAlan Modra <amodra@gmail.com>
Sat, 14 Dec 2013 02:44:03 +0000 (13:14 +1030)
* elflink.c (_bfd_elf_merge_symbol): If merging a new weak
symbol that will be skipped, we don't have a new definition.

bfd/ChangeLog
bfd/elflink.c

index ce6fc956deb560f7229fda7b3b4dd5b2aab814b0..60d6e0cd089ec4e04118d968eea5be6418d22cb5 100644 (file)
@@ -1,3 +1,8 @@
+2013-12-14  Alan Modra  <amodra@gmail.com>
+
+       * elflink.c (_bfd_elf_merge_symbol): If merging a new weak
+       symbol that will be skipped, we don't have a new definition.
+
 2013-12-13  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
            Wei-Cheng Wang  <cole945@gmail.com>
 
index 6fa62f9b0bec20106c3f7fa50c4d33b42c9607ce..7dcafd67f1e1c2e2c90c16cda96be6ca96642795 100644 (file)
@@ -1437,7 +1437,10 @@ _bfd_elf_merge_symbol (bfd *abfd,
       if (!(oldbfd != NULL
            && (oldbfd->flags & BFD_PLUGIN) != 0
            && (abfd->flags & BFD_PLUGIN) == 0))
-       *skip = TRUE;
+       {
+         newdef = FALSE;
+         *skip = TRUE;
+       }
 
       /* Merge st_other.  If the symbol already has a dynamic index,
         but visibility says it should not be visible, turn it into a