summaryrefslogtreecommitdiff
path: root/ld/plugin.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2011-02-14 09:53:14 +0000
committerAlan Modra <amodra@bigpond.net.au>2011-02-14 09:53:14 +0000
commitfdbc4035db118d5a46d2c8361f8eb441dd5a8021 (patch)
tree0253489ca62ecebeea2b0e3a2a7a9524feb5798f /ld/plugin.c
parentd47681947dc50501f85c9b794542855c36261800 (diff)
downloadbinutils-redhat-fdbc4035db118d5a46d2c8361f8eb441dd5a8021.tar.gz
* ldmain.c (remove_output): Rename to..
(ld_cleanup): ..this. Call bfd_cache_close_all and plugin_call_cleanup. (main): Adjust. * plugin.c (plugin_call_cleanup): Make global. (plugin_load_plugins): Don't register plugin_call_cleanup with xatexit. * plugin.h (plugin_call_cleanup): Declare.
Diffstat (limited to 'ld/plugin.c')
-rw-r--r--ld/plugin.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/ld/plugin.c b/ld/plugin.c
index b285787694..86d80ca4a1 100644
--- a/ld/plugin.c
+++ b/ld/plugin.c
@@ -108,9 +108,6 @@ static bfd_boolean no_more_claiming = FALSE;
TRUE is returned from the hook. */
static bfd_boolean plugin_cached_allow_multiple_defs = FALSE;
-/* Call 'cleanup' hook for all plugins at exit. */
-static void plugin_call_cleanup (void);
-
/* List of tags to set in the constant leading part of the tv array. */
static const enum ld_plugin_tag tv_header_tags[] =
{
@@ -721,8 +718,6 @@ plugin_load_plugins (void)
if (!curplug)
return 0;
- xatexit (plugin_call_cleanup);
-
/* First pass over plugins to find max # args needed so that we
can size and allocate the tv array. */
while (curplug)
@@ -820,7 +815,7 @@ plugin_call_all_symbols_read (void)
}
/* Call 'cleanup' hook for all plugins at exit. */
-static void
+void
plugin_call_cleanup (void)
{
plugin_t *curplug = plugins_list;