From 4520d6bee11b130d3f05175db13d3000f7ecf1a8 Mon Sep 17 00:00:00 2001 From: Rahul Chaudhry Date: Tue, 28 Jun 2016 14:17:59 -0700 Subject: Revert "Disable the warning of a hidden symbol matches a reference to be resolved." Bug: 21502954 This change reverts https://android-review.googlesource.com/#/c/155101/, to be replaced by the upstream patch with tests. - https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=c20ceeb226168ffd84078ef74d890c2b7f69a435 Change-Id: Id929c8422a016638f860ac508eeafc7080584600 --- binutils-2.25/gold/ChangeLog | 9 +++++++++ binutils-2.25/gold/resolve.cc | 11 +++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/binutils-2.25/gold/ChangeLog b/binutils-2.25/gold/ChangeLog index c222155..cd95752 100644 --- a/binutils-2.25/gold/ChangeLog +++ b/binutils-2.25/gold/ChangeLog @@ -1,3 +1,12 @@ +2016-06-28 Rahul Chaudhry + + Revert patch -- to be replaced by the upstream patch with tests. + + 2015-06-16 Yiran Wang + + * resolve.cc disable the warning of a hidden symbol matches a + reference to be resolved + 2016-02-05 Sriraman Tallam * icf.cc (get_rel_addend): New function. diff --git a/binutils-2.25/gold/resolve.cc b/binutils-2.25/gold/resolve.cc index 54de87d..07dff4a 100644 --- a/binutils-2.25/gold/resolve.cc +++ b/binutils-2.25/gold/resolve.cc @@ -279,8 +279,15 @@ Symbol_table::resolve(Sized_symbol* to, && (to->visibility() == elfcpp::STV_HIDDEN || to->visibility() == elfcpp::STV_INTERNAL)) { - // it is good to be helpful, but the warning leads to build error - // for some users, so disable it if not really wanted. + // A dynamic object cannot reference a hidden or internal symbol + // defined in another object. + gold_warning(_("%s symbol '%s' in %s is referenced by DSO %s"), + (to->visibility() == elfcpp::STV_HIDDEN + ? "hidden" + : "internal"), + to->demangled_name().c_str(), + to->object()->name().c_str(), + object->name().c_str()); return; } else -- cgit v1.1