diff --git a/SOURCES/binutils-plugin-error.patch b/SOURCES/binutils-plugin-error.patch new file mode 100644 index 0000000..8d9b580 --- /dev/null +++ b/SOURCES/binutils-plugin-error.patch @@ -0,0 +1,42 @@ +--- binutils.orig/bfd/plugin.c 2022-01-19 16:17:33.290999966 +0000 ++++ binutils-2.30/bfd/plugin.c 2022-01-19 16:23:33.704473426 +0000 +@@ -349,7 +349,7 @@ try_claim (bfd *abfd) + } + + static int +-try_load_plugin (const char *pname, bfd *abfd, int *has_plugin_p) ++try_load_plugin (const char *pname, bfd *abfd, int *has_plugin_p, bfd_boolean build_list_p) + { + void *plugin_handle; + struct ld_plugin_tv tv[4]; +@@ -362,7 +362,11 @@ try_load_plugin (const char *pname, bfd + plugin_handle = dlopen (pname, RTLD_NOW); + if (!plugin_handle) + { +- _bfd_error_handler ("%s\n", dlerror ()); ++ /* If we are building a list of viable plugins, then ++ we do not bother the user with the details of any ++ plugins that cannot be loaded. */ ++ if (! build_list_p) ++ _bfd_error_handler ("%s\n", dlerror ()); + return 0; + } + +@@ -477,7 +481,7 @@ load_plugin (bfd *abfd) + return found; + + if (plugin_name) +- return try_load_plugin (plugin_name, abfd, &has_plugin); ++ return try_load_plugin (plugin_name, abfd, &has_plugin, FALSE); + + if (plugin_program_name == NULL) + return found; +@@ -501,7 +505,7 @@ load_plugin (bfd *abfd) + + full_name = concat (p, "/", ent->d_name, NULL); + if (stat(full_name, &s) == 0 && S_ISREG (s.st_mode)) +- found = try_load_plugin (full_name, abfd, &valid_plugin); ++ found = try_load_plugin (full_name, abfd, &valid_plugin, TRUE); + if (has_plugin <= 0) + has_plugin = valid_plugin; + free (full_name); diff --git a/SPECS/binutils.spec b/SPECS/binutils.spec index 2ca5881..de1e0df 100644 --- a/SPECS/binutils.spec +++ b/SPECS/binutils.spec @@ -43,7 +43,7 @@ Summary: A GNU collection of binary utilities Name: binutils%{?name_cross}%{?_with_debug:-debug} Version: 2.30 -Release: 112%{?dist} +Release: 113%{?dist} License: GPLv3+ URL: https://sourceware.org/binutils @@ -607,6 +607,10 @@ Patch95: binutils.unicode.patch # Lifetime: Fixed in 2.37 Patch96: binutils-undefined-unversioned-symbols.patch +# Purpose: When searching for plugins, do not complain if incompatible ones are found. +# Lifetime: Fixed in 2.35 +Patch97: binutils-plugin-error.patch + #---------------------------------------------------------------------------- Provides: bundled(libiberty) @@ -840,6 +844,7 @@ using libelf instead of BFD. %patch94 -p1 %patch95 -p1 %patch96 -p1 +%patch97 -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 ? @@ -1289,6 +1294,9 @@ exit 0 #---------------------------------------------------------------------------- %changelog +* Wed Jan 19 2022 Nick Clifton - 2.30-113 +- When searching for plugins, do not complain if incompatible ones are found. (#2039117) + * Thu Dec 09 2021 Nick Clifton - 2.30-112 - Make undefined unversioned dynamic symbols global rather than local. (#2005176)