gdb: add inferior::{arch, set_arch}
[binutils-gdb.git] / binutils / arsup.c
index 1d4d1ac70b039e6a3e3803ad5e23a04f6b0f1747..744a8d423af751ab988f1b736f9832cd634f4eec 100644 (file)
@@ -1,5 +1,5 @@
 /* arsup.c - Archive support for MRI compatibility
-   Copyright (C) 1992-2021 Free Software Foundation, Inc.
+   Copyright (C) 1992-2023 Free Software Foundation, Inc.
 
    This file is part of GNU Binutils.
 
@@ -469,8 +469,9 @@ ar_end (void)
 {
   if (obfd)
     {
-      bfd_cache_close (obfd);
-      unlink (bfd_get_filename (obfd));
+      const char *filename = bfd_get_filename (obfd);
+      bfd_close_all_done (obfd);
+      unlink (filename);
     }
 }