* resolve.cc (Symbol_table::resolve): Don't complain about defined
authorCary Coutant <ccoutant@google.com>
Wed, 19 Aug 2009 17:53:50 +0000 (17:53 +0000)
committerCary Coutant <ccoutant@google.com>
Wed, 19 Aug 2009 17:53:50 +0000 (17:53 +0000)
symbols in shared libraries overridden by hidden or internal symbols
in the main program.

gold/ChangeLog
gold/resolve.cc

index 9084d68a9c598de020201e0884ca638221779933..c57002ca9052ffb357df2e8a735771e9f3ae6ec1 100644 (file)
@@ -1,3 +1,9 @@
+2009-08-19  Cary Coutant  <ccoutant@google.com>
+
+       * 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  <cgd@google.com>
 
        * testsuite/debug_msg.sh: Match .* rather than ${srcdir} when
index 7299c5589a27bf15f16842fe25847f2bf75eaad8..45a4a7aabda34571be6bfeff74225ed46a02b720 100644 (file)
@@ -257,8 +257,9 @@ Symbol_table::resolve(Sized_symbol<size>* 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.