From aa86f06bb6dbe70fb2b8b65ff54e9304c7b5eed7 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 24 Jul 2008 07:26:27 +0000 Subject: [PATCH] * dynobj.cc (Versions::Versions): If there is an soname, use it as the base version name. --- gold/ChangeLog | 3 +++ gold/dynobj.cc | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gold/ChangeLog b/gold/ChangeLog index 3d5d94a7f9c..8f4d3f90051 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,5 +1,8 @@ 2008-07-24 Ian Lance Taylor + * dynobj.cc (Versions::Versions): If there is an soname, use it as + the base version name. + * stringpool.cc (Stringpool_template::add_with_length): Set key to array size plus one. (Stringpool_template::set_string_offsets): Subtract one from key diff --git a/gold/dynobj.cc b/gold/dynobj.cc index 9247a79d7d5..349d472417f 100644 --- a/gold/dynobj.cc +++ b/gold/dynobj.cc @@ -1313,8 +1313,10 @@ Versions::Versions(const Version_script_info& version_script, // to me. if (parameters->options().shared()) { - const char* name = dynpool->add(parameters->options().output_file_name(), - false, NULL); + const char* name = parameters->options().soname(); + if (name == NULL) + name = parameters->options().output_file_name(); + name = dynpool->add(name, false, NULL); Verdef* vdbase = new Verdef(name, std::vector(), true, false, true); this->defs_.push_back(vdbase); -- 2.30.2