gold patch committed: Add -z notext, use it in testsuite

Ian Lance Taylor iant@google.com
Sat Jul 2 00:41:00 GMT 2011


One of the gold tests fails on Solaris because on Solaris gcc passes -z
text when using -shared.  The GNU linker does not support -z text and
simply ignores it (as is true of all unrecognized -z options).  Gold
does support -z text, which causes it to reject shared libraries with
dynamic relocations in the text segment.  Some of the tests are
specifically testing that that works, and those tests fails.  This patch
adds -z notext, which overrides a -z text appearing earlier on the
command line, and uses it for all tests which might need it.  Committed
to mainline.

Ian


2011-07-01  Ian Lance Taylor  <iant@google.com>

	PR gold/12525
	* options.h (class General_options): Support -z notext.
	* testsuite/Makefile.am (two_file_shared_1_nonpic.so): Use
	-Wl,-z,notext.
	(two_file_shared_nonpic.so): Likewise.
	(two_file_shared_mixed.so): Likewise.
	(two_file_shared_mixed_1.so): Likewise.
	(weak_undef_lib_nonpic.so): Likewise.
	(alt/weak_undef_lib_nonpic.so): Likewise.
	(tls_test_shared_nonpic.so): Likewise.
	* testsuite/Makefile.in: Rebuild.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.patch
Type: text/x-diff
Size: 3595 bytes
Desc: patch
URL: <https://sourceware.org/pipermail/binutils/attachments/20110702/7844053f/attachment.bin>


More information about the Binutils mailing list