* dynobj.cc (Versions::Versions): If there is an soname, use it as
authorIan Lance Taylor <ian@airs.com>
Thu, 24 Jul 2008 07:26:27 +0000 (07:26 +0000)
committerIan Lance Taylor <ian@airs.com>
Thu, 24 Jul 2008 07:26:27 +0000 (07:26 +0000)
the base version name.

gold/ChangeLog
gold/dynobj.cc

index 3d5d94a7f9c6dc165eb7306319d9f28543ec667f..8f4d3f900515f708fd75739108dd3b18a712b7dc 100644 (file)
@@ -1,5 +1,8 @@
 2008-07-24  Ian Lance Taylor  <iant@google.com>
 
+       * 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
index 9247a79d7d51484dbef7f32dbae58ae93a2a0f52..349d472417ff0a20d1e015d54d8bd9be6cb6862e 100644 (file)
@@ -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<std::string>(),
                                   true, false, true);
       this->defs_.push_back(vdbase);