objcopy of archives tidy
authorAlan Modra <amodra@gmail.com>
Sat, 22 Apr 2023 06:31:02 +0000 (16:01 +0930)
committerAlan Modra <amodra@gmail.com>
Mon, 24 Apr 2023 11:29:38 +0000 (20:59 +0930)
commitc1eb3cd205921fb7af668f2032ab2c7142c4f24c
tree6ebf39de52d1df4227683f7dd29355cfb8528df0
parent596a7c72b2eb3da8247651805f4afc2c0da4c275
objcopy of archives tidy

This makes sure the input element bfd is closed before exiting the
loop copying elements.

* objcopy.c (copy_archive): Rename output_bfd to output_element.
Localise last_element.  Close this_element in more error cases.
binutils/objcopy.c