2005-04-25  H.J. Lu  <hongjiu.lu@intel.com>

	PR 858
	* elflink.c (elf_link_input_bfd): Make non-debugging reference
	to discarded section an error.

ld/testsuite/

2005-04-25  H.J. Lu  <hongjiu.lu@intel.com>

	* ld-discard/extern.d: Expect error.
	* ld-discard/start.d: Likewise.
	* ld-discard/static.d: Likewise.
This commit is contained in:
H.J. Lu 2005-04-25 14:59:09 +00:00
parent bee59fd28b
commit 6d633fd282
6 changed files with 17 additions and 3 deletions

View file

@ -7048,6 +7048,8 @@ elf_link_input_bfd (struct elf_final_link_info *finfo, bfd *input_bfd)
(_("`%s' referenced in section `%A' of %B: "
"defined in discarded section `%A' of %B"),
o, input_bfd, sec, sec->owner, sym_name);
bfd_set_error (bfd_error_bad_value);
return FALSE;
}
/* Try to do the best we can to support buggy old