diff options
author | Cary Coutant <ccoutant@google.com> | 2008-12-24 06:17:18 +0000 |
---|---|---|
committer | Cary Coutant <ccoutant@google.com> | 2008-12-24 06:17:18 +0000 |
commit | 483620e86f09fcb4bc923c9f4b0c211e10efd334 (patch) | |
tree | 2e24f24e6eee98a246bb3da678e6348a31309549 /gold/gold.cc | |
parent | 7fe893f8f0c0e1964745aa2b2f8dab5babe173e9 (diff) | |
download | gdb-483620e86f09fcb4bc923c9f4b0c211e10efd334.zip gdb-483620e86f09fcb4bc923c9f4b0c211e10efd334.tar.gz gdb-483620e86f09fcb4bc923c9f4b0c211e10efd334.tar.bz2 |
* gold.cc (gold_exit): Call plugin cleanup handlers on exit.
* plugin.cc (Plugin_manager::finish): Rename as
layout_deferred_objects. Move cleanup to separate function.
(Plugin_manager::cleanup): New function.
(Plugin_finish::run): Call layout_deferred_objects and cleanup
separately.
* plugin.h (Plugin_manager::finish): Rename as
layout_deferred_objects.
(Plugin_manager::cleanup): New function.
(Plugin_manager::cleanup_done): New field.
Diffstat (limited to 'gold/gold.cc')
-rw-r--r-- | gold/gold.cc | 4 |
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); |