Use bfd_cache_close, instead of accessing bfd->iostream directly.

This commit is contained in:
Andrew Cagney 2004-02-15 02:24:53 +00:00
parent 832b640263
commit c92c35e706
5 changed files with 14 additions and 5 deletions

View 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> 2004-01-21 Roland McGrath <roland@redhat.com>
* readelf.c (get_note_type): Match NT_AUXV. * readelf.c (get_note_type): Match NT_AUXV.

View file

@ -324,8 +324,8 @@ remove_output (void)
{ {
if (output_filename != NULL) if (output_filename != NULL)
{ {
if (output_bfd != NULL && output_bfd->iostream != NULL) if (output_bfd != NULL)
fclose ((FILE *) (output_bfd->iostream)); bfd_cache_close (output_bfd);
if (output_file != NULL) if (output_file != NULL)
fclose (output_file); fclose (output_file);
unlink (output_filename); unlink (output_filename);

View file

@ -433,7 +433,7 @@ ar_end (void)
{ {
if (obfd) if (obfd)
{ {
fclose ((FILE *)(obfd->iostream)); bfd_cache_close (obfd);
unlink (bfd_get_filename (obfd)); unlink (bfd_get_filename (obfd));
} }
} }

View 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> 2004-02-14 Richard Sandiford <rsandifo@redhat.com>
* emulparams/elf32bmipn32-defs.sh (OTHER_SECTIONS): Discard * emulparams/elf32bmipn32-defs.sh (OTHER_SECTIONS): Discard

View file

@ -159,8 +159,8 @@ remove_output (void)
{ {
if (output_filename) if (output_filename)
{ {
if (output_bfd && output_bfd->iostream) if (output_bfd)
fclose ((FILE *) (output_bfd->iostream)); bfd_cache_close (output_bfd);
if (delete_output_file_on_failure) if (delete_output_file_on_failure)
unlink (output_filename); unlink (output_filename);
} }