summaryrefslogtreecommitdiff
path: root/gold/cref.cc
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2018-01-12 11:05:58 -0800
committerEric Christopher <echristo@gmail.com>2018-01-12 11:05:58 -0800
commitb4b07ef1d11452018477d6a4166a0cfe1122d09d (patch)
tree63a303fccc00603cdd8356760a4184af2ba8c14a /gold/cref.cc
parenteea61984abfea2c0acdc7e46ec182a14698b3bf9 (diff)
downloadbinutils-gdb-b4b07ef1d11452018477d6a4166a0cfe1122d09d.tar.gz
Apply:
2018-01-12 Sterling Augustine <saugustine@google.com> * cref.cc (Cref_inputs::Cref_table_compare::operator): Add conditionals and calls to is_forwarder.
Diffstat (limited to 'gold/cref.cc')
-rw-r--r--gold/cref.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/gold/cref.cc b/gold/cref.cc
index 84a9e46c84c..07774535015 100644
--- a/gold/cref.cc
+++ b/gold/cref.cc
@@ -236,9 +236,13 @@ Cref_inputs::Cref_table_compare::operator()(const Symbol* s1,
}
// We should never have two different symbols with the same name and
- // version.
+ // version, where one doesn't forward to the other.
if (s1 == s2)
return false;
+ if (s1->is_forwarder() && !s2->is_forwarder())
+ return true;
+ if (!s1->is_forwarder() && s2->is_forwarder())
+ return false;
gold_unreachable();
}