mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-22 19:09:31 +08:00
Call bfd_cache_close_all on error
2011-08-04 H.J. Lu <hongjiu.lu@intel.com> PR gas/13056 * output-file.c (output_file_close): Call bfd_cache_close_all on error. * write.c (write_object_file): Revert the last change.
This commit is contained in:
@ -1,3 +1,11 @@
|
|||||||
|
2011-08-04 H.J. Lu <hongjiu.lu@intel.com>
|
||||||
|
|
||||||
|
PR gas/13056
|
||||||
|
* output-file.c (output_file_close): Call bfd_cache_close_all
|
||||||
|
on error.
|
||||||
|
|
||||||
|
* write.c (write_object_file): Revert the last change.
|
||||||
|
|
||||||
2011-08-04 Alan Modra <amodra@gmail.com>
|
2011-08-04 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
* write.c (write_object_file): Call set_symtab even if we had
|
* write.c (write_object_file): Call set_symtab even if we had
|
||||||
|
@ -59,7 +59,10 @@ output_file_close (char *filename)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
/* Close the bfd. */
|
/* Close the bfd. */
|
||||||
res = bfd_close (stdoutput);
|
if (had_errors ())
|
||||||
|
res = bfd_cache_close_all ();
|
||||||
|
else
|
||||||
|
res = bfd_close (stdoutput);
|
||||||
|
|
||||||
/* Prevent an infinite loop - if the close failed we will call as_fatal
|
/* Prevent an infinite loop - if the close failed we will call as_fatal
|
||||||
which will call xexit() which may call this function again... */
|
which will call xexit() which may call this function again... */
|
||||||
|
@ -2073,14 +2073,13 @@ write_object_file (void)
|
|||||||
obj_adjust_symtab ();
|
obj_adjust_symtab ();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
set_symtab ();
|
|
||||||
|
|
||||||
/* Stop if there is an error. */
|
/* Stop if there is an error. */
|
||||||
if (had_errors ())
|
if (had_errors ())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Now that all the sizes are known, and contents correct, we can
|
/* Now that all the sizes are known, and contents correct, we can
|
||||||
start writing to the file. */
|
start writing to the file. */
|
||||||
|
set_symtab ();
|
||||||
|
|
||||||
/* If *_frob_file changes the symbol value at this point, it is
|
/* If *_frob_file changes the symbol value at this point, it is
|
||||||
responsible for moving the changed value into symp->bsym->value
|
responsible for moving the changed value into symp->bsym->value
|
||||||
|
Reference in New Issue
Block a user