commit | 4739b9137e1fe1cfaf2e0de6924c122035942b26 | [log] [tgz] |
---|---|---|
author | Alan Modra <amodra@gmail.com> | Wed Jan 01 22:52:06 2025 +1030 |
committer | Alan Modra <amodra@gmail.com> | Wed Jan 01 22:52:06 2025 +1030 |
tree | 25ade2d868896b772fc4c80f32bb7a8285cc9a4a | |
parent | d58fbef40d70057b83d3773aa409b402236a7e62 [diff] |
Close elements of output archive When cleaning up an archive, close all its elements. This fixes a number of ar memory leaks. bfd/ * archive.c (_bfd_archive_close_and_cleanup): Close elements of an archive open for writing. binutils/ * objcopy.c (copy_archive): Don't close output archive elements here. * dlltool.c (gen_lib_file): Likewise. ld/ * pe-dll.c (pe_dll_generate_implib): Don't close output archive elements here.