From 2da73f13b5a30647720a7744350ef84ce7e222d1 Mon Sep 17 00:00:00 2001 From: Cary Coutant Date: Wed, 19 Aug 2009 17:53:50 +0000 Subject: [PATCH] * resolve.cc (Symbol_table::resolve): Don't complain about defined symbols in shared libraries overridden by hidden or internal symbols in the main program. --- gold/ChangeLog | 6 ++++++ gold/resolve.cc | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gold/ChangeLog b/gold/ChangeLog index 9084d68a9c5..c57002ca905 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,9 @@ +2009-08-19 Cary Coutant + + * resolve.cc (Symbol_table::resolve): Don't complain about defined + symbols in shared libraries overridden by hidden or internal symbols + in the main program. + 2009-08-19 Chris Demetriou * testsuite/debug_msg.sh: Match .* rather than ${srcdir} when diff --git a/gold/resolve.cc b/gold/resolve.cc index 7299c5589a2..45a4a7aabda 100644 --- a/gold/resolve.cc +++ b/gold/resolve.cc @@ -257,8 +257,9 @@ Symbol_table::resolve(Sized_symbol* to, // Record that we've seen this symbol in a regular object. to->set_in_reg(); } - else if (to->visibility() == elfcpp::STV_HIDDEN - || to->visibility() == elfcpp::STV_INTERNAL) + else if (st_shndx == elfcpp::SHN_UNDEF + && (to->visibility() == elfcpp::STV_HIDDEN + || to->visibility() == elfcpp::STV_INTERNAL)) { // A dynamic object cannot reference a hidden or internal symbol // defined in another object. -- 2.30.2