From a05e447ffb99623aa0bb6b730052fa543e975a49 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Fri, 14 Jan 2011 02:18:22 +0000 Subject: [PATCH] PR ld/12339 * ldlang.c (sort_def_symbol): Handle bfd_link_hash_warning symbols. --- ld/ChangeLog | 5 +++++ ld/ldlang.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/ld/ChangeLog b/ld/ChangeLog index c5539d487d9..1dc63c1f876 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2011-01-14 J. Park + + PR ld/12339 + * ldlang.c (sort_def_symbol): Handle bfd_link_hash_warning symbols. + 2011-01-14 Alan Modra * Makefile.am: Sort emulation rules. diff --git a/ld/ldlang.c b/ld/ldlang.c index c2a768ece39..7ffe760371d 100644 --- a/ld/ldlang.c +++ b/ld/ldlang.c @@ -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) { -- 2.30.2