objcopy: bfd_alloc orelocation

This fixes an inconsequential objcopy memory leak.  I'd normally
ignore reports of leaks like this one, that are merely one block or
fewer per section processed, since objcopy soon exits and frees all
memory.  However I thought it worth providing support for allocating
memory on a bfd objalloc in objcopy and other utils.

	PR 29233
	* bucomm.c (bfd_xalloc): New function.
	* bucomm.h (bfd_xalloc): Declare.
	* objcopy.c (copy_relocations_in_section): Use it to allocate
	array of reloc pointers.  Rewrite code stripping relocs to do
	without extra memory allocation.
3 files changed