Commit: Extend error message when a plugin does not load.

Nick Clifton nickc@redhat.com
Tue May 26 13:49:34 GMT 2020


Hi Guys,

  I am applying the patch below to extend the error message when the BFD
  library fails to load a plugin.  Previously only the message provided
  by the libdl library was displayed, which might not be enough for the
  user to realise what was being attempted at the time.

Cheers
  Nick

bfd/ChangeLog
2020-05-26  Nick Clifton  <nickc@redhat.com>

	* plugin.c (try_load_plugin): Extend error message when a plugin
	fails to open.

diff --git a/bfd/plugin.c b/bfd/plugin.c
index 9439366f4b..97f1c9c773 100644
--- a/bfd/plugin.c
+++ b/bfd/plugin.c
@@ -273,7 +273,8 @@ try_load_plugin (const char *pname,
   plugin_handle = dlopen (pname, RTLD_NOW);
   if (!plugin_handle)
     {
-      _bfd_error_handler ("%s\n", dlerror ());
+      _bfd_error_handler ("Failed to load plugin '%s', reason: %s\n",
+			  pname, dlerror ());
       return 0;
     }
 



More information about the Binutils mailing list