PATCH COMMITTED: Common symbol vs. shared library versioned symbol

Ian Lance Taylor iant@google.com
Thu Mar 27 18:23:00 GMT 2008


gold had a bug when the main program defined a common symbol which had
the same name as a symbol in a shared library, when common symbol has
no version and the symbol in the shared library had a default version.
(I found this bug by running the gcc testsuite with gold.)

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

Ian


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

	* symtab.cc (Symbol_table::add_from_object): Handle saw_undefined_
	and commons_ correctly when NAME/VERSION does not override
	NAME/NULL.
	* testsuite/ver_test_6.c: New file.
	* testsuite/Makefile.am (check_PROGRAMS): Add ver_test_6
	(ver_test_6_SOURCES, ver_test_6_DEPENDENCIES): New variables.
	(ver_test_6_LDFLAGS, ver_test_6_LDADD): New variables.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.patch
Type: text/x-patch
Size: 3240 bytes
Desc: Common symbol vs. shared library versioned symbol
URL: <https://sourceware.org/pipermail/binutils/attachments/20080327/2bf3715d/attachment.bin>


More information about the Binutils mailing list