This is the mail archive of the
mailing list for the binutils project.
gold patch committed: Simply override version of special symbol
- From: Ian Lance Taylor <iant at google dot com>
- To: binutils at sourceware dot org
- Date: Tue, 05 Jul 2011 21:45:21 -0700
- Subject: gold patch committed: Simply override version of special symbol
For a linker-defined symbol such as "_end", it is possible for a version
script to force the use of a specific version in a shared library. It
is then possible for some other shared library to use a different
version script to force a different version. This would cause gold to
fail an assertion when it saw a symbol with two different default
versions. This patch fixes the problem by simply permitting this sort
of overridding. Committed to mainline.
2011-07-05 Ian Lance Taylor <firstname.lastname@example.org>
* resolve.cc (Symbol::override_base_with_special): Simply override
version with special symbol version, ignoring previous version.
RCS file: /cvs/src/src/gold/resolve.cc,v
retrieving revision 1.61
diff -u -p -r1.61 resolve.cc
--- resolve.cc 2 Jul 2011 05:29:59 -0000 1.61
+++ resolve.cc 6 Jul 2011 04:42:39 -0000
@@ -911,7 +911,15 @@ Symbol::override_base_with_special(const
+ // When overriding a versioned symbol with a special symbol, we
+ // may be changing the version. This will happen if we see a
+ // special symbol such as "_end" defined in a shared object with
+ // one version (from a version script), but we want to define it
+ // here with a different version (from a different version
+ // script).
+ this->version_ = from->version_;
this->type_ = from->type_;
this->binding_ = from->binding_;