aboutsummaryrefslogtreecommitdiff
path: root/gold/gold.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gold/gold.cc')
-rw-r--r--gold/gold.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/gold/gold.cc b/gold/gold.cc
index ac321be..8d86a1b 100644
--- a/gold/gold.cc
+++ b/gold/gold.cc
@@ -50,6 +50,10 @@ const char* program_name;
void
gold_exit(bool status)
{
+ if (parameters != NULL
+ && parameters->options_valid()
+ && parameters->options().has_plugins())
+ parameters->options().plugins()->cleanup();
if (!status && parameters != NULL && parameters->options_valid())
unlink_if_ordinary(parameters->options().output_file_name());
exit(status ? EXIT_SUCCESS : EXIT_FAILURE);