From 9167e5c6b080baae619af527ee43cf89e1898b6f Mon Sep 17 00:00:00 2001 From: Dave Korn Date: Fri, 5 Nov 2010 07:20:06 +0000 Subject: * plugin.h (plugin_active_plugins_p): New prototype. (is_ir_dummy_bfd): Delete prototype. * plugin.c: Fix formatting issues. (is_ir_dummy_bfd): Make static. (plugin_active_plugins_p): New function. * ldfile.c (ldfile_try_open_bfd): Use it to save work if no plugins are loaded. Always close file descriptor after claim handler returns. * ldmain.c (add_archive_element): Likewise. --- ld/plugin.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'ld/plugin.h') diff --git a/ld/plugin.h b/ld/plugin.h index 5bd083f060..b79e739223 100644 --- a/ld/plugin.h +++ b/ld/plugin.h @@ -33,6 +33,10 @@ extern int plugin_opt_plugin (const char *plugin); error if none. */ extern int plugin_opt_plugin_arg (const char *arg); +/* Return true if any plugins are active this run. Only valid + after options have been processed. */ +extern bfd_boolean plugin_active_plugins_p (void); + /* Load up and initialise all plugins after argument parsing. */ extern int plugin_load_plugins (void); @@ -56,9 +60,6 @@ extern int plugin_call_cleanup (void); add_symbols hook has been called so that it can be read when linking. */ extern bfd *plugin_get_ir_dummy_bfd (const char *name, bfd *template); -/* Check if the BFD passed in is an IR dummy object file. */ -extern bfd_boolean is_ir_dummy_bfd (const bfd *abfd); - /* Notice-symbol bfd linker callback hook. */ extern bfd_boolean plugin_notice (struct bfd_link_info *info, const char *name, bfd *abfd, asection *section, -- cgit v1.2.1