From 88880dcb0579533015ebfa0bdbb2ae5999b9f6e0 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Mon, 25 Jan 2021 11:53:12 +0000 Subject: [PATCH] Update the BFD library to handle DWARF-5 line number ranges. --- binutils-DWARF-5-line-number-parsing.patch | 24 ++++++++++++++++++++++ binutils.spec | 9 +++++++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 binutils-DWARF-5-line-number-parsing.patch diff --git a/binutils-DWARF-5-line-number-parsing.patch b/binutils-DWARF-5-line-number-parsing.patch new file mode 100644 index 0000000..15849f9 --- /dev/null +++ b/binutils-DWARF-5-line-number-parsing.patch @@ -0,0 +1,24 @@ +--- binutils.orig/bfd/dwarf2.c 2021-01-25 11:26:26.761405305 +0000 ++++ binutils-2.35.1/bfd/dwarf2.c 2021-01-25 11:28:51.838572824 +0000 +@@ -3252,9 +3252,11 @@ read_rnglists (struct comp_unit *unit, s + low_pc = base_address; + low_pc += _bfd_safe_read_leb128 (abfd, rngs_ptr, &bytes_read, + FALSE, rngs_end); ++ rngs_ptr += bytes_read; + high_pc = base_address; + high_pc += _bfd_safe_read_leb128 (abfd, rngs_ptr, &bytes_read, + FALSE, rngs_end); ++ rngs_ptr += bytes_read; + break; + + case DW_RLE_start_end: +@@ -3274,9 +3276,6 @@ read_rnglists (struct comp_unit *unit, s + return FALSE; + } + +- if ((low_pc == 0 && high_pc == 0) || low_pc == high_pc) +- return FALSE; +- + if (!arange_add (unit, arange, low_pc, high_pc)) + return FALSE; + } diff --git a/binutils.spec b/binutils.spec index 7dd2ca0..443a48a 100644 --- a/binutils.spec +++ b/binutils.spec @@ -39,7 +39,7 @@ Summary: A GNU collection of binary utilities Name: binutils%{?name_cross}%{?_with_debug:-debug} Version: 2.35.1 -Release: 24%{?dist} +Release: 25%{?dist} License: GPLv3+ URL: https://sourceware.org/binutils @@ -316,6 +316,10 @@ Patch31: binutils-gas-auto-dwarf-5.patch # Lifetime: Fixed in 2.36 Patch32: binutils-gold-gnu-properties.patch +# Purpose: Update the BFD library to handle DWARF-5 line number ranges. +# Lifetime: Fixed in 2.36 +Patch33: binutils-DWARF-5-line-number-parsing.patch + #---------------------------------------------------------------------------- Provides: bundled(libiberty) @@ -900,6 +904,9 @@ exit 0 #---------------------------------------------------------------------------- %changelog +* Mon Jan 25 2021 Nick Clifton - 2.35.1-25 +- Update the BFD library to handle DWARF-5 line number ranges. + * Thu Jan 21 2021 Nick Clifton - 2.35.1-24 - Update the GOLD linker to handle x86 .note.gnu.property sections. (#1916925)