gold patch committed: Fix symbol visibility (PR 9836)

Ian Lance Taylor iant@google.com
Fri Feb 27 19:59:00 GMT 2009


PR 9836 is about a bug in gold's symbol visibility handling: it was not
forcing symbols with hidden visibility to be local.  I committed this
patch to fix the bug, along with a test.

Ian


2009-02-27  Ian Lance Taylor  <iant@google.com>

	PR 9836
	* symtab.cc (Symbol_table::add_from_object): If the visibility is
	hidden or internal, force the symbol to be local.
	* resolve.cc (Symbol::override_visibility): Define.
	(Symbol::override_base): Use override_visibility.
	(Symbol_table::resolve): Likewise.
	(Symbol::override_base_with_special): Likewise.
	(Symbol_table::override_with_special): If the visibility is hidden
	or internal, force the symbol to be local.
	* symtab.h (class Symbol): Add set_visibility and
	override_visibility.
	* testsuite/ver_test_1.sh: New file.
	* testsuite/Makefile.am (check_SCRIPTS): Add ver_test_1.sh.
	(check_DATA): Add ver_test_1.syms.
	(ver_test_1.syms): New target.
	* testsuite/Makefile.in: Rebuild.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.patch
Type: text/x-patch
Size: 7697 bytes
Desc: Fix symbol visibility
URL: <https://sourceware.org/pipermail/binutils/attachments/20090227/8f2e536c/attachment.bin>


More information about the Binutils mailing list