/* output-file.c - Deal with the output file
- Copyright (C) 1987-2019 Free Software Foundation, Inc.
+ Copyright (C) 1987-2022 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
void
output_file_close (const char *filename)
{
- bfd_boolean res;
+ bool res;
if (stdoutput == NULL)
return;
/* Close the bfd. */
- if (had_errors ())
+ if (!flag_always_generate_output && had_errors ())
res = bfd_cache_close_all ();
else
res = bfd_close (stdoutput);
stdoutput = NULL;
if (! res)
- as_fatal (_("can't close %s: %s"), filename,
- bfd_errmsg (bfd_get_error ()));
+ as_fatal ("%s: %s", filename, bfd_errmsg (bfd_get_error ()));
}