summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2004-02-15 02:24:53 +0000
committerAndrew Cagney <cagney@redhat.com>2004-02-15 02:24:53 +0000
commit7183e1cdb71e0533bc48a1c5619622aaececffe2 (patch)
tree3dc2f07bee82f3528f55e7a99cb83c53734e5bfa
parenta3c4a418f339e4ef2e051c9ac154da24d70a5e7d (diff)
downloadbinutils-redhat-7183e1cdb71e0533bc48a1c5619622aaececffe2.tar.gz
Use bfd_cache_close, instead of accessing bfd->iostream directly.
-rw-r--r--binutils/ChangeLog5
-rw-r--r--binutils/ar.c4
-rw-r--r--binutils/arsup.c2
-rw-r--r--ld/ChangeLog4
-rw-r--r--ld/ldmain.c4
5 files changed, 14 insertions, 5 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 49ce6e7fb1..9c9ce85c26 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -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.
diff --git a/binutils/ar.c b/binutils/ar.c
index 57714279a7..b85d62ecf0 100644
--- a/binutils/ar.c
+++ b/binutils/ar.c
@@ -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);
diff --git a/binutils/arsup.c b/binutils/arsup.c
index 676a6bc14c..a621bf9b3f 100644
--- a/binutils/arsup.c
+++ b/binutils/arsup.c
@@ -433,7 +433,7 @@ ar_end (void)
{
if (obfd)
{
- fclose ((FILE *)(obfd->iostream));
+ bfd_cache_close (obfd);
unlink (bfd_get_filename (obfd));
}
}
diff --git a/ld/ChangeLog b/ld/ChangeLog
index b2a7766ccf..358b76717b 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -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
diff --git a/ld/ldmain.c b/ld/ldmain.c
index bbafcdb2c5..88b5c75bf3 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -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);
}