aboutsummaryrefslogtreecommitdiff
path: root/ld/lexsup.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-12-03 14:34:06 +0000
committerH.J. Lu <hjl.tools@gmail.com>2012-12-03 14:34:06 +0000
commitd82184d78220ce42e0f54ce9fbb0688860ff0388 (patch)
tree1546be4daa2443faede76fa4131484e4fc13b347 /ld/lexsup.c
parentdc9589e9756c8719b355472080fa8095a0ba68a7 (diff)
downloadgdb-d82184d78220ce42e0f54ce9fbb0688860ff0388.zip
gdb-d82184d78220ce42e0f54ce9fbb0688860ff0388.tar.gz
gdb-d82184d78220ce42e0f54ce9fbb0688860ff0388.tar.bz2
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.
Diffstat (limited to 'ld/lexsup.c')
-rw-r--r--ld/lexsup.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/ld/lexsup.c b/ld/lexsup.c
index c6baebe..be8a897 100644
--- a/ld/lexsup.c
+++ b/ld/lexsup.c
@@ -954,9 +954,7 @@ parse_args (unsigned argc, char **argv)
break;
#ifdef ENABLE_PLUGINS
case OPTION_PLUGIN:
- if (plugin_opt_plugin (optarg))
- einfo (_("%P%F: %s: error loading plugin\n"),
- plugin_error_plugin ());
+ plugin_opt_plugin (optarg);
break;
case OPTION_PLUGIN_OPT:
if (plugin_opt_plugin_arg (optarg))