PR ld/12339
authorAlan Modra <amodra@gmail.com>
Fri, 14 Jan 2011 02:18:22 +0000 (02:18 +0000)
committerAlan Modra <amodra@gmail.com>
Fri, 14 Jan 2011 02:18:22 +0000 (02:18 +0000)
* ldlang.c (sort_def_symbol): Handle bfd_link_hash_warning symbols.

ld/ChangeLog
ld/ldlang.c

index c5539d487d963edc495f55160b36611bd6fdda0e..1dc63c1f876cbc6f95c70dd45d65c7dfed216add 100644 (file)
@@ -1,3 +1,8 @@
+2011-01-14  J. Park  <grassman@gmail.com>
+
+       PR ld/12339
+       * ldlang.c (sort_def_symbol): Handle bfd_link_hash_warning symbols.
+
 2011-01-14  Alan Modra  <amodra@gmail.com>
 
        * Makefile.am: Sort emulation rules.
index c2a768ece39e3ea1b836cee5abb1cbff366f071a..7ffe760371d11078ca77319a2a4667601521d4c3 100644 (file)
@@ -2089,6 +2089,9 @@ static bfd_boolean
 sort_def_symbol (struct bfd_link_hash_entry *hash_entry,
                 void *info ATTRIBUTE_UNUSED)
 {
+  if (hash_entry->type == bfd_link_hash_warning)
+    hash_entry = (struct bfd_link_hash_entry *) hash_entry->u.i.link;
+
   if (hash_entry->type == bfd_link_hash_defined
       || hash_entry->type == bfd_link_hash_defweak)
     {