diff options
author | Ian Lance Taylor <iant@google.com> | 2007-09-11 22:57:35 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2007-09-11 22:57:35 +0000 |
commit | 92f0e169b4932e9e143a10788b448d2cac35f770 (patch) | |
tree | 479992576fc2f8e1191a28992797f7db934ff1eb /gold | |
parent | 50c7215d2f16cc6c31f613dde45a1696b6e2b43e (diff) | |
download | gdb-92f0e169b4932e9e143a10788b448d2cac35f770.zip gdb-92f0e169b4932e9e143a10788b448d2cac35f770.tar.gz gdb-92f0e169b4932e9e143a10788b448d2cac35f770.tar.bz2 |
Only create a version definition for a shared library. Set the
dynamic symbol index for a version definition when finalizing
versions.
Diffstat (limited to 'gold')
-rw-r--r-- | gold/dynobj.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gold/dynobj.cc b/gold/dynobj.cc index 874b4e7..96488d8 100644 --- a/gold/dynobj.cc +++ b/gold/dynobj.cc @@ -1195,7 +1195,10 @@ Versions::record_version(const General_options* options, const char* version = dynpool->add(sym->version(), &version_key); if (!sym->is_from_dynobj()) - this->add_def(options, sym, version, version_key); + { + if (options->is_shared()) + this->add_def(options, sym, version, version_key); + } else { // This is a version reference. @@ -1331,6 +1334,7 @@ Versions::finalize(const Target* target, Symbol_table* symtab, elfcpp::STV_DEFAULT, 0, false); vsym->set_needs_dynsym_entry(); + vsym->set_dynsym_index(dynsym_index); ++dynsym_index; syms->push_back(vsym); // The name is already in the dynamic pool. |