From 347bbd0dc509955d62624aeeef861f235f654dac Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Tue, 26 May 2020 14:05:33 +0100 Subject: [PATCH] Enhance the error message displayed by the BFD library when it fails to load a plugin. Resolves: #1836618 --- binutils-bad-plugin-err-message.patch | 12 ++++++++++++ binutils.spec | 11 ++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 binutils-bad-plugin-err-message.patch diff --git a/binutils-bad-plugin-err-message.patch b/binutils-bad-plugin-err-message.patch new file mode 100644 index 0000000..79cac9e --- /dev/null +++ b/binutils-bad-plugin-err-message.patch @@ -0,0 +1,12 @@ +--- binutils.orig/bfd/plugin.c 2020-05-26 12:48:41.604021632 +0100 ++++ binutils-2.34.0/bfd/plugin.c 2020-05-26 12:50:02.553762744 +0100 +@@ -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; + } + diff --git a/binutils.spec b/binutils.spec index fa6973a..9274d4e 100644 --- a/binutils.spec +++ b/binutils.spec @@ -2,7 +2,7 @@ Summary: A GNU collection of binary utilities Name: %{?cross}binutils%{?_with_debug:-debug} Version: 2.34.0 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv3+ URL: https://sourceware.org/binutils @@ -230,6 +230,11 @@ Patch16: binutils-readelf-compression-header-size.patch # Lifetime: Permanent. Patch17: binutils-gold-warn-unsupported.patch +# Purpose: Enhance the error message displayed by the BFD library when +# to fails to load a plugin. +# Lifetime: Should be fixed in 2.35. +Patch18: binutils-bad-plugin-err-message.patch + #---------------------------------------------------------------------------- Provides: bundled(libiberty) @@ -382,6 +387,7 @@ Conflicts: gcc-c++ < 4.0.0 %patch15 -p1 %patch16 -p1 %patch17 -p1 +%patch18 -p1 # We cannot run autotools as there is an exact requirement of autoconf-2.59. # FIXME - this is no longer true. Maybe try reinstating autotool use ? @@ -791,6 +797,9 @@ exit 0 #---------------------------------------------------------------------------- %changelog +* Tue May 26 2020 Nick Clifton - 2.34-6 +- Enhance the error message displayed by the BFD library when it fails to load a plugin. (#1836618) + * Fri May 22 2020 Nick Clifton - 2.34-5 - Rebase to tip of GNU Binutils 2.34 branch, brining in LTO fixes. - Retire: binutils-nm-lto-plugin.patch