a few minor gold notes

Ian Lance Taylor iant@google.com
Thu Mar 27 06:16:00 GMT 2008


Tom Tromey <tromey@redhat.com> writes:

> Ian> This should all be better now, I hope.  gold now prints what
> Ian> config.guess is looking for.
>
> I did a new gcc configure/build with gold in my path.
> It crashes building libgfortran:
>
> /home/tromey/gnu/baseline-gdb/install/bin/ld: internal error in override_base, at ../../src/gold/resolve.cc:46

Thanks for trying it out.

The version script sets the version of a symbol which is not defined
in the library.  It is instead defined in a shared library included in
the link.  gold was incorrectly applying the version from the version
script, and then crashing when the symbol was defined with a different
version.

I committed this patch to fix this problem, with a test case.

Ian


2008-03-26  Ian Lance Taylor  <iant@google.com>

	* symtab.cc (Symbol_table::add_from_relobj): Don't set the version
	of an undefined symbol from a version script.
	* testsuite/Makefile.am (ver_test_5.so): New target.
	(ver_test_5.o): New target.
	(check_SCRIPTS): Add ver_test_5.sh.
	(check_DATA): Add ver_test_5.syms.
	(ver_test_5.syms): New target.
	* testsuite/ver_test_5.cc: New file.
	* testsuite/ver_test_5.script: New file.
	* testsuite/ver_test_5.sh: New file.
	* Makefile.in, testsuite/Makefile.in: Rebuild.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.patch
Type: text/x-patch
Size: 5986 bytes
Desc: Don't set version of an undefined symbol from a script
URL: <https://sourceware.org/pipermail/binutils/attachments/20080327/78b29f22/attachment.bin>


More information about the Binutils mailing list