mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-29 02:20:51 +00:00
Improve plugin error handling
ld/ PR ld/14904 * ldmain.c (main): Don't check plugin_load_plugins return. * lexsup.c (parse_args): Don't check plugin_opt_plugin return. * plugin.c (dlerror): New. Defined if HAVE_DLFCN_H isn't defined. (plugin_opt_plugin): Change return type to void. Stop on dlopen error and report error with dlerror (). (plugin_load_plugins): Change return type to void. Stop on dlsym error and report error with dlerror (). Don't use set_plugin_error. (plugin_call_cleanup): Issue an error for each plugin. * plugin.h (plugin_opt_plugin): Change return type to void. (plugin_load_plugins): Likewise. ld/testsuite/ PR ld/14904 * ld-plugin/plugin-2.d: Update expected error message. * ld-plugin/plugin-4.d: Likewise.
This commit is contained in:
@@ -32,8 +32,8 @@ extern bfd_boolean no_more_claiming;
|
||||
to include the plugin-api.h header in order to use this file. */
|
||||
struct ld_plugin_input_file;
|
||||
|
||||
/* Handle -plugin arg: find and load plugin, or return error. */
|
||||
extern int plugin_opt_plugin (const char *plugin);
|
||||
/* Handle -plugin arg: find and load plugin. */
|
||||
extern void plugin_opt_plugin (const char *plugin);
|
||||
|
||||
/* Accumulate option arguments for last-loaded plugin, or return
|
||||
error if none. */
|
||||
@@ -44,7 +44,7 @@ extern int plugin_opt_plugin_arg (const char *arg);
|
||||
extern bfd_boolean plugin_active_plugins_p (void);
|
||||
|
||||
/* Load up and initialise all plugins after argument parsing. */
|
||||
extern int plugin_load_plugins (void);
|
||||
extern void plugin_load_plugins (void);
|
||||
|
||||
/* Return name of plugin which caused an error in any of the above. */
|
||||
extern const char *plugin_error_plugin (void);
|
||||
|
||||
Reference in New Issue
Block a user