Cary Coutant 1f25b93bc6 Fix problem where -u is ignored when a weak undef is seen.
When the linker has a weak undefined symbol, it normally does not
select an archive library member just to satisfy the reference.
If the same symbol is also listed in a -u option, however, we
should select the archive library member.  This patch reorders
the code in Library_base::should_include_member so that the
additional checks are performed in the case of a weak undef.

gold/

2014-02-06  Cary Coutant  <ccoutant@google.com>

	* archive.cc (Library_base::should_include_member): Reorder
	code to check for -u option if a weak undef has already been seen.
	* testsuite/Makefile.am (weak_undef_test_2): New test case.
	* testsuite/Makefile.in: Regenerate.
	* testsuite/weak_undef_file3.cc: New file.
	* testsuite/weak_undef_file4.cc: New file.
	* testsuite/weak_undef_test_2.cc: New file.
2014-02-06 17:15:02 -08:00
..
2012-12-10 17:38:42 +00:00
2013-05-21 20:56:13 +00:00
2012-10-24 02:32:15 +00:00
2012-10-24 02:32:15 +00:00
2012-10-24 02:32:15 +00:00
2012-10-24 02:32:15 +00:00
2012-10-24 02:32:15 +00:00
2012-10-24 02:32:15 +00:00
2012-10-24 02:32:15 +00:00
2012-10-24 02:32:15 +00:00
2012-10-24 02:32:15 +00:00
2012-10-24 02:32:15 +00:00
2012-10-24 02:32:15 +00:00
2013-06-06 06:06:56 +00:00
2013-10-11 21:56:16 +00:00
2013-10-11 21:56:16 +00:00
2013-05-21 21:14:40 +00:00
2013-05-21 21:14:40 +00:00
2013-06-14 20:07:18 +00:00
2013-04-15 16:34:12 +00:00
2013-04-15 16:34:12 +00:00
2013-07-30 21:26:53 +00:00
2013-06-14 20:07:18 +00:00
2013-06-14 20:07:18 +00:00
2013-10-11 21:59:46 +00:00