diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2012-12-03 14:34:06 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2012-12-03 14:34:06 +0000 |
commit | d82184d78220ce42e0f54ce9fbb0688860ff0388 (patch) | |
tree | 1546be4daa2443faede76fa4131484e4fc13b347 /ld/testsuite | |
parent | dc9589e9756c8719b355472080fa8095a0ba68a7 (diff) | |
download | gdb-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/testsuite')
-rw-r--r-- | ld/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | ld/testsuite/ld-plugin/plugin-2.d | 2 | ||||
-rw-r--r-- | ld/testsuite/ld-plugin/plugin-4.d | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 493d4ba..fd49cd6 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2012-12-03 H.J. Lu <hongjiu.lu@intel.com> + + PR ld/14904 + * ld-plugin/plugin-2.d: Update expected error message. + * ld-plugin/plugin-4.d: Likewise. + 2012-11-30 Roland McGrath <mcgrathr@google.com> * ld-elf/ehdr_start.s: Put reference in .rodata section, not .data. diff --git a/ld/testsuite/ld-plugin/plugin-2.d b/ld/testsuite/ld-plugin/plugin-2.d index 0ce111f..d0190a7 100644 --- a/ld/testsuite/ld-plugin/plugin-2.d +++ b/ld/testsuite/ld-plugin/plugin-2.d @@ -18,5 +18,5 @@ Hello from testplugin. .*: LDPT_OPTION 'failonload' .*: LDPT_NULL value 0x0 \(0\) #... -.*ld.*:.*ldtestplug.*: error loading plugin +.*ld.*:.*ldtestplug.*: plugin error: 3 #... diff --git a/ld/testsuite/ld-plugin/plugin-4.d b/ld/testsuite/ld-plugin/plugin-4.d index e17565e..9f25fc6 100644 --- a/ld/testsuite/ld-plugin/plugin-4.d +++ b/ld/testsuite/ld-plugin/plugin-4.d @@ -20,5 +20,5 @@ Hello from testplugin. .*: LDPT_NULL value 0x0 \(0\) #... hook called: cleanup. -.*ld.*:.*ldtestplug.*: error in plugin cleanup \(ignored\) +.*ld.*:.*ldtestplug.*: error in plugin cleanup: 3 \(ignored\) #... |