diff options
Diffstat (limited to 'gold/resolve.cc')
-rw-r--r-- | gold/resolve.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gold/resolve.cc b/gold/resolve.cc index 7299c55..45a4a7a 100644 --- a/gold/resolve.cc +++ b/gold/resolve.cc @@ -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. |