This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gold patch committed: Use soname as base version name


If a shared library has an soname, we should it as the name of the
base version.  Before this patch, we always used the output file name.
I committed this patch to use the soname if there is one.  I noticed
this while testing a Linux kernel build.

Ian


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.


Index: dynobj.cc
===================================================================
RCS file: /cvs/src/src/gold/dynobj.cc,v
retrieving revision 1.40
diff -u -p -r1.40 dynobj.cc
--- dynobj.cc	22 Jul 2008 22:08:43 -0000	1.40
+++ dynobj.cc	24 Jul 2008 07:25:21 -0000
@@ -1313,8 +1313,10 @@ Versions::Versions(const 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);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]