aboutsummaryrefslogtreecommitdiff
path: root/gold/dynobj.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gold/dynobj.cc')
-rw-r--r--gold/dynobj.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/gold/dynobj.cc b/gold/dynobj.cc
index d85adbc..7012802 100644
--- a/gold/dynobj.cc
+++ b/gold/dynobj.cc
@@ -1776,7 +1776,10 @@ Versions::symbol_section_contents(const Symbol_table* symtab,
version_index = this->version_index(symtab, dynpool, *p);
// If the symbol was defined as foo@V1 instead of foo@@V1, add
// the hidden bit.
- if ((*p)->version() != NULL && !(*p)->is_default())
+ if ((*p)->version() != NULL
+ && (*p)->is_defined()
+ && !(*p)->is_default()
+ && !(*p)->from_dyn())
version_index |= elfcpp::VERSYM_HIDDEN;
elfcpp::Swap<16, big_endian>::writeval(pbuf + (*p)->dynsym_index() * 2,
version_index);