* elfxx-ia64.c (elfNN_ia64_relocate_section): Test r_symndx rather

than sym_sec->output_section to detect relocs against discarded
	sections.
This commit is contained in:
Alan Modra 2001-11-21 14:58:26 +00:00
parent add55e1f31
commit d7458677f4
2 changed files with 44 additions and 37 deletions

View File

@ -1,3 +1,9 @@
2001-11-21 Alan Modra <amodra@bigpond.net.au>
* elfxx-ia64.c (elfNN_ia64_relocate_section): Test r_symndx rather
than sym_sec->output_section to detect relocs against discarded
sections.
2001-11-19 H.J. Lu <hjl@gnu.org>
* elflink.h (elf_link_input_bfd): Assert r_symndx != 0 when

View File

@ -3835,6 +3835,13 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
case R_IA64_SEGREL32LSB:
case R_IA64_SEGREL64MSB:
case R_IA64_SEGREL64LSB:
if (r_symndx == 0)
{
/* If the input section was discarded from the output, then
do nothing. */
r = bfd_reloc_ok;
}
else
{
struct elf_segment_map *m;
Elf_Internal_Phdr *p;
@ -3855,12 +3862,6 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
if (m == NULL)
{
/* If the input section was discarded from the output, then
do nothing. */
if (bfd_is_abs_section (sym_sec->output_section))
r = bfd_reloc_ok;
else
r = bfd_reloc_notsupported;
}
else