diff --git a/binutils-gold-empty-dwp.patch b/binutils-gold-empty-dwp.patch new file mode 100644 index 0000000..b716565 --- /dev/null +++ b/binutils-gold-empty-dwp.patch @@ -0,0 +1,11 @@ +--- binutils.orig/gold/dwp.cc 2023-05-02 13:26:44.075148082 +0100 ++++ binutils-2.40/gold/dwp.cc 2023-05-02 13:27:16.189130127 +0100 +@@ -2418,6 +2418,8 @@ main(int argc, char** argv) + { + Dwo_file exe_file(exe_filename); + exe_file.read_executable(&files); ++ if (files.empty()) ++ gold_fatal(_("Could not find any dwo links in specified EXE")); + } + + // Add any additional files listed on command line. diff --git a/binutils.spec b/binutils.spec index cea98c5..9e09248 100644 --- a/binutils.spec +++ b/binutils.spec @@ -2,7 +2,7 @@ Summary: A GNU collection of binary utilities Name: binutils%{?_with_debug:-debug} Version: 2.40 -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv3+ URL: https://sourceware.org/binutils @@ -275,6 +275,10 @@ Patch20: binutils-reloc-symtab.patch # Lifetime: Fixed in 2.41 Patch21: binutils-CVE-2023-1972.patch +# Purpose: Stop an abort when using dwp to process a file with no dwo links. +# Lifetime: Fixed in 2.41 (maybe) +Patch22: binutils-gold-empty-dwp.patch + #---------------------------------------------------------------------------- Provides: bundled(libiberty) @@ -909,7 +913,7 @@ install_binutils() local native="$2" local shared="$3" - local local_root=%{buildroot}/usr + local local_root=%{buildroot}/%{_prefix} local local_bindir=$local_root/bin local local_libdir=%{buildroot}%{_libdir} local local_mandir=$local_root/share/man/man1 @@ -1241,6 +1245,10 @@ exit 0 #---------------------------------------------------------------------------- %changelog +* Tue May 02 2023 Nick Clifton - 2.40-8 +- GOLD: Stop an abort triggered by running dwp on a file with no dwo links. (#2192226) +- Spec File: Use _prefix. (#2192118) + * Mon Apr 17 2023 Nick Clifton - 2.40-7 - Spec File: Fix typo. (#2186396) - BFD library: Fix illegal memory access when loading corrupt symbol version info. (#2186579)