gold patch: Don't warn if an ABI-defined symbol is undefined

Ian Lance Taylor iant@google.com
Tue Sep 16 17:39:00 GMT 2008


When using an older glibc, one without the AS_NEEDED clause in libc.so
pointing to the dynamic linker, when building a shared library which
uses TLS variables, when using -z defs, gold can report an error about
an undefined __tls_get_addr symbol.  This is probably not a
particularly common set of circumstances, but gold already knows about
the magic __tls_get_addr symbol anyhow.  I committed this patch to
extend that knowledge to reports about undefined symbols in regular
objects.

Ian


2008-09-16  Ian Lance Taylor  <iant@google.com>

	* target-reloc.h (relocate_section): Check whether a symbol is
	defined by the ABI before reporting an undefined symbol error.
	* target.h (Target::is_defined_by_abi): Make parameter const.
	(Target::do_is_defined_by_abi): Likewise.
	* i386.cc (Target_i386::do_is_defined_by_abi): Likewise.
	* powerpc.cc (Target_powerpc::do_is_defined_by_abi): Likewise.
	* sparc.cc (Target_sparc::do_is_defined_by_abi): Likewise.
	* x86_64.cc (Target_x86_64::do_is_defined_by_abi): Likewise.
	* testsuite/Makefile.am (tls_test_shared.so): Add -Wl,-z,defs.
	* testsuite/Makefile.in: Rebuild.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: foo.patch
Type: text/x-patch
Size: 4639 bytes
Desc: Don't warn about refs to ABI-defined symbols
URL: <https://sourceware.org/pipermail/binutils/attachments/20080916/c9109eb4/attachment.bin>


More information about the Binutils mailing list