XCOFF: use bfd_coff_close_and_cleanup
authorAlan Modra <amodra@gmail.com>
Tue, 21 Mar 2023 22:25:19 +0000 (08:55 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 21 Mar 2023 22:25:19 +0000 (08:55 +1030)
commit509ab0875d598dc36edb80d4d6a957b41540d992
tree36169eca726ebd4b2c95d292cb2b571bb0c8abdf
parentca26b8030e8c184bdeca7280e31c10c6e9fc3f78
XCOFF: use bfd_coff_close_and_cleanup

Free memory on closing bfds.  The COFF close_and_cleanup does more
work than _bfd_generic_close_and_cleanup (defined as
_bfd_archive_close_and_cleanup).

* coff-rs6000.c (_bfd_xcoff_close_and_cleanup): Define as
_bfd_coff_close_and_cleanup.
* coff64-rs6000.c (rs6000_xcoff64_vec, rs6000_xcoff64_aix_vec): Use
_bfd_coff_close_and_cleanup.
bfd/coff-rs6000.c
bfd/coff64-rs6000.c