aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2018-01-12 11:12:55 -0800
committerEric Christopher <echristo@gmail.com>2018-01-12 11:12:55 -0800
commit1e4d2a179d04d08bf113706939dd502c46301261 (patch)
tree6ebe8f4546b8cab056257076cea6c27221a90404
parent462fd94a64b5bceff98bb2ff7202974a756595e9 (diff)
downloadgdb-1e4d2a179d04d08bf113706939dd502c46301261.zip
gdb-1e4d2a179d04d08bf113706939dd502c46301261.tar.gz
gdb-1e4d2a179d04d08bf113706939dd502c46301261.tar.bz2
2018-01-12 Eric Christopher <echristo@gmail.com>
Apply from master: 2018-01-12 Sterling Augustine <saugustine@google.com> * cref.cc (Cref_inputs::Cref_table_compare::operator): Add conditionals and calls to is_forwarder.
-rw-r--r--gold/ChangeLog8
-rw-r--r--gold/cref.cc6
2 files changed, 13 insertions, 1 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index 208dc1f..e2eebd1 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,11 @@
+2018-01-12 Eric Christopher <echristo@gmail.com>
+
+ Apply from master:
+ 2018-01-12 Sterling Augustine <saugustine@google.com>
+
+ * cref.cc (Cref_inputs::Cref_table_compare::operator): Add
+ conditionals and calls to is_forwarder.
+
2017-11-21 Ian Lance Taylor <iant@google.com>
Apply from master:
diff --git a/gold/cref.cc b/gold/cref.cc
index d3337b9..ff9e217 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();
}