ppc: sanity check writing relocs

Check for output buffer overruns.

	* elf32-ppc.c (swap_reloc_out, count_and_swap_reloc_out): New
	functions.  Use throughout file.
	* elf64-ppc.c (swap_reloc_out, count_and_swap_reloc_out): Likewise.
2 files changed