From 3b8525f821f1b9180dd5bd3073414e7d13883a69 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Mon, 6 Dec 2010 05:38:11 +0000 Subject: [PATCH] Call plugin_call_cleanup on plugin fatal error. 2010-12-05 H.J. Lu PR ld/12289 * plugin.c (message): Call plugin_call_cleanup on fatal error. --- ld/ChangeLog | 6 ++++++ ld/plugin.c | 3 +++ 2 files changed, 9 insertions(+) diff --git a/ld/ChangeLog b/ld/ChangeLog index 63858ee00fa..55e320e98f3 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +2010-12-05 H.J. Lu + + PR ld/12289 + * plugin.c (message): Call plugin_call_cleanup on fatal + error. + 2010-12-05 H.J. Lu * plugin.c (message): Add a space after `:' in error message. diff --git a/ld/plugin.c b/ld/plugin.c index 34d76bd8433..3d7809c2c40 100644 --- a/ld/plugin.c +++ b/ld/plugin.c @@ -590,6 +590,9 @@ message (int level, const char *format, ...) char *newfmt = ACONCAT ((level == LDPL_FATAL ? "%P%F: " : "%P%X: ", format, "\n", NULL)); + if (plugin_call_cleanup ()) + info_msg (_("%P: %s: error in plugin cleanup (ignored)\n"), + plugin_error_plugin ()); vfinfo (stderr, newfmt, args, TRUE); } break; -- 2.30.2