Use bfd_cache_close, instead of accessing bfd->iostream directly.
authorAndrew Cagney <cagney@redhat.com>
Sun, 15 Feb 2004 02:24:53 +0000 (02:24 +0000)
committerAndrew Cagney <cagney@redhat.com>
Sun, 15 Feb 2004 02:24:53 +0000 (02:24 +0000)
binutils/ChangeLog
binutils/ar.c
binutils/arsup.c
ld/ChangeLog
ld/ldmain.c

index 49ce6e7fb19d6c68b98fe763197dfef85595fcec..9c9ce85c26af9aee165a599b89fe88a0f1cca080 100644 (file)
@@ -1,3 +1,8 @@
+2004-02-14  Andrew Cagney  <cagney@redhat.com>
+
+       * ar.c (remove_output): Use bfd_cache_close.
+       * arsup.c (ar_end): Ditto.
+
 2004-01-21  Roland McGrath  <roland@redhat.com>
 
        * readelf.c (get_note_type): Match NT_AUXV.
index 57714279a79008669f7d5ae21b10705a6cf26503..b85d62ecf0d7ba26fd543c04a1be5e5f038230a0 100644 (file)
@@ -324,8 +324,8 @@ remove_output (void)
 {
   if (output_filename != NULL)
     {
-      if (output_bfd != NULL && output_bfd->iostream != NULL)
-       fclose ((FILE *) (output_bfd->iostream));
+      if (output_bfd != NULL)
+       bfd_cache_close (output_bfd);
       if (output_file != NULL)
        fclose (output_file);
       unlink (output_filename);
index 676a6bc14cdf5bcca84fde463061aa6a27ba116d..a621bf9b3f1ac3c31d3c3c335ce84aaeed197dff 100644 (file)
@@ -433,7 +433,7 @@ ar_end (void)
 {
   if (obfd)
     {
-      fclose ((FILE *)(obfd->iostream));
+      bfd_cache_close (obfd);
       unlink (bfd_get_filename (obfd));
     }
 }
index b2a7766ccfc138ff855c8ba3e277ae9b49fa19f4..358b76717b0ba7292f0b2258c034606907557980 100644 (file)
@@ -1,3 +1,7 @@
+2004-02-14  Andrew Cagney  <cagney@redhat.com>
+
+       * ldmain.c (remove_output): Call bfd_cache_close.
+
 2004-02-14  Richard Sandiford  <rsandifo@redhat.com>
 
        * emulparams/elf32bmipn32-defs.sh (OTHER_SECTIONS): Discard
index bbafcdb2c59fd15369745abac2c1eaa84f862bad..88b5c75bf3371dcc57cf15da4791b9241c3ef6d6 100644 (file)
@@ -159,8 +159,8 @@ remove_output (void)
 {
   if (output_filename)
     {
-      if (output_bfd && output_bfd->iostream)
-       fclose ((FILE *) (output_bfd->iostream));
+      if (output_bfd)
+       bfd_cache_close (output_bfd);
       if (delete_output_file_on_failure)
        unlink (output_filename);
     }