* coffcode.h (coff_set_alignment_hook): With PE_COFF reloc

overflow, set reloc start position to after the count
	reloc. Subtract one from num relocs. Give error on 0xffff relocs
	and no overflow.
	* cofflink.c (_bfd_coff_final_link): Deal with PE_COFF reloc
	overflow.
	* peXXigen.c (_bfd_XXi_swap_scnhdr_out): Do overflow if >=
	0xffff.
This commit is contained in:
Nathan Sidwell
2003-10-07 08:49:11 +00:00
parent 2f9626f3fd
commit cd339148de
4 changed files with 46 additions and 8 deletions

View File

@ -990,7 +990,11 @@ _bfd_XXi_swap_scnhdr_out (abfd, in, out)
ret = 0;
}
if (scnhdr_int->s_nreloc <= 0xffff)
/* Although we could encode 0xffff relocs here, we do not, to be
consistent with other parts of bfd. Also it lets us warn, as
we should never see 0xffff here w/o having the overflow flag
set. */
if (scnhdr_int->s_nreloc < 0xffff)
H_PUT_16 (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc);
else
{