aboutsummaryrefslogtreecommitdiff
path: root/ld/ldlang.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2011-01-14 02:18:22 +0000
committerAlan Modra <amodra@gmail.com>2011-01-14 02:18:22 +0000
commita05e447ffb99623aa0bb6b730052fa543e975a49 (patch)
tree1f73582f31cb2b0d9b4bb648017fa329f1e98065 /ld/ldlang.c
parente6a6bb22ab75ecdba2c4a44a33b730829acace11 (diff)
downloadgdb-a05e447ffb99623aa0bb6b730052fa543e975a49.zip
gdb-a05e447ffb99623aa0bb6b730052fa543e975a49.tar.gz
gdb-a05e447ffb99623aa0bb6b730052fa543e975a49.tar.bz2
PR ld/12339
* ldlang.c (sort_def_symbol): Handle bfd_link_hash_warning symbols.
Diffstat (limited to 'ld/ldlang.c')
-rw-r--r--ld/ldlang.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c
index c2a768e..7ffe760 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)
{