aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2024-03-05 14:33:40 +1030
committerAlan Modra <amodra@gmail.com>2024-03-06 11:22:29 +1030
commit55e01dbd7623941373ee500032119a124fd2d673 (patch)
treee6601caf095c4e3a3e49820ba124beb936d25c7f /bfd
parentea1b1dc0b5dea7871d4828f7ab85745cd6f34ffc (diff)
downloadgdb-55e01dbd7623941373ee500032119a124fd2d673.zip
gdb-55e01dbd7623941373ee500032119a124fd2d673.tar.gz
gdb-55e01dbd7623941373ee500032119a124fd2d673.tar.bz2
Don't use bfd_error_handler in bfd_abort
We don't want to lose an abort message when bfd_set_error_handler has been called to ignore or cache errors. PR ld/31444 * bfd.c (_bfd_abort): Don't use _bfd_error_handler.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/bfd.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/bfd/bfd.c b/bfd/bfd.c
index 6c82265..71732a0 100644
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -2050,17 +2050,17 @@ bfd_assert (const char *file, int line)
void
_bfd_abort (const char *file, int line, const char *fn)
{
+ fflush (stdout);
+
if (fn != NULL)
- _bfd_error_handler
- /* xgettext:c-format */
- (_("BFD %s internal error, aborting at %s:%d in %s\n"),
- BFD_VERSION_STRING, file, line, fn);
+ fprintf (stderr, _("%s: BFD %s internal error, aborting at %s:%d in %s\n"),
+ _bfd_get_error_program_name (), BFD_VERSION_STRING,
+ file, line, fn);
else
- _bfd_error_handler
- /* xgettext:c-format */
- (_("BFD %s internal error, aborting at %s:%d\n"),
- BFD_VERSION_STRING, file, line);
- _bfd_error_handler (_("Please report this bug.\n"));
+ fprintf (stderr, _("%s: BFD %s internal error, aborting at %s:%d\n"),
+ _bfd_get_error_program_name (), BFD_VERSION_STRING,
+ file, line);
+ fprintf (stderr, _("Please report this bug.\n"));
_exit (EXIT_FAILURE);
}