binutils-gdb/ld/testsuite/ld-undefined
Alan Modra 954b63d4c8 Implement -z dynamic-undefined-weak
-z nodynamic-undefined-weak is only implemented for x86.  (The sparc
backend has some support code but doesn't enable the option by
including ld/emulparams/dynamic_undefined_weak.sh, and since the
support looks like it may be broken I haven't enabled it.)  This patch
adds the complementary -z dynamic-undefined-weak, extends both options
to affect building of shared libraries as well as executables, and
adds support for the option on powerpc.

include/
	* bfdlink.h (struct bfd_link_info <dynamic_undefined_weak>):
	Revise comment.
bfd/
	* elflink.c (_bfd_elf_adjust_dynamic_symbol): Hide undefweak
	or make dynamic for info->dynamic_undefined_weak 0 and 1.
	* elf32-ppc.c:Formatting.
	(ensure_undefweak_dynamic): Don't make dynamic when
	info->dynamic_undefined_weak is zero.
	(allocate_dynrelocs): Discard undefweak dyn_relocs for
	info->dynamic_undefined_weak.  Discard undef dyn_relocs when
	not default visibility.  Discard undef and undefweak
	dyn_relocs earlier.
	(ppc_elf_relocate_section): Adjust to suit.
	* elf64-ppc.c: Formatting.
	(ensure_undefweak_dynamic): Don't make dynamic when
	info->dynamic_undefined_weak is zero.
	(allocate_dynrelocs): Discard undefweak dyn_relocs for
	info->dynamic_undefined_weak.  Discard them earlier.
ld/
	* ld.texinfo (dynamic-undefined-weak): Document.
	(nodynamic-undefined-weak): Document that this option now can
	be used with shared libs.
	* emulparams/dynamic_undefined_weak.sh: Support -z
	dynamic-undefined-weak.
	* emulparams/elf32ppccommon.sh: Include dynamic_undefined_weak.sh.
	* testsuite/ld-undefined/weak-undef.exp (undef_weak_so),
	(undef_weak_exe): New.  Use them.  Add -z dynamic-undefined-weak
	and -z nodynamic-undefined-weak tests.
	* Makefile.am: Update powerpc dependencies.
	* Makefile.in: Regenerate.
2017-04-19 20:39:52 +09:30
..
dummy.s ld/ 2009-03-18 12:11:38 +00:00
entry-1.d ld/ 2009-03-18 12:11:38 +00:00
entry-2.d ld/ 2009-03-18 12:11:38 +00:00
entry-3.d Improve binutils testsuite coverage for GNU/Hurd. 2010-11-08 06:43:40 +00:00
entry-4.d Improve binutils testsuite coverage for GNU/Hurd. 2010-11-08 06:43:40 +00:00
entry-5.d ld/ 2009-03-18 12:11:38 +00:00
entry-6.d ld/ 2009-03-18 12:11:38 +00:00
entry-7.d 2009-09-14 H.J. Lu <hongjiu.lu@intel.com> 2009-09-14 14:07:26 +00:00
entry.exp Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
entry.s ld/ 2009-03-18 12:11:38 +00:00
require-defined-1.d ld: Add '--require-defined' command line option. 2015-08-04 10:00:05 +01:00
require-defined-2.d ld: Add '--require-defined' command line option. 2015-08-04 10:00:05 +01:00
require-defined-3.d ld: Add '--require-defined' command line option. 2015-08-04 10:00:05 +01:00
require-defined-4.d ld: Add '--require-defined' command line option. 2015-08-04 10:00:05 +01:00
require-defined-5.d ld: Add '--require-defined' command line option. 2015-08-04 10:00:05 +01:00
require-defined.exp Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
require-defined.s ld: Add '--require-defined' command line option. 2015-08-04 10:00:05 +01:00
undefined.c
undefined.exp Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
weak-fundef.s Add undefined weak function tests 2016-08-12 14:34:49 +09:30
weak-undef.exp Implement -z dynamic-undefined-weak 2017-04-19 20:39:52 +09:30
weak-undef.s gas/testsuite/ 2005-03-22 14:20:38 +00:00
weak-undef.t Add undefined weak function tests 2016-08-12 14:34:49 +09:30