From 1e4d2a179d04d08bf113706939dd502c46301261 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Fri, 12 Jan 2018 11:12:55 -0800 Subject: [PATCH] 2018-01-12 Eric Christopher Apply from master: 2018-01-12 Sterling Augustine * cref.cc (Cref_inputs::Cref_table_compare::operator): Add conditionals and calls to is_forwarder. --- gold/ChangeLog | 8 ++++++++ gold/cref.cc | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/gold/ChangeLog b/gold/ChangeLog index 208dc1fe59e..e2eebd1b712 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,11 @@ +2018-01-12 Eric Christopher + + Apply from master: + 2018-01-12 Sterling Augustine + + * cref.cc (Cref_inputs::Cref_table_compare::operator): Add + conditionals and calls to is_forwarder. + 2017-11-21 Ian Lance Taylor Apply from master: diff --git a/gold/cref.cc b/gold/cref.cc index d3337b9d6b5..ff9e2173342 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(); } -- 2.39.5