diff --git a/binutils-dwarf-DW_FORM_ref8.patch b/binutils-dwarf-DW_FORM_ref8.patch new file mode 100644 index 0000000..ce6627f --- /dev/null +++ b/binutils-dwarf-DW_FORM_ref8.patch @@ -0,0 +1,34 @@ +diff --git a/binutils/dwarf.c b/binutils/dwarf.c +index 5807744729..cf68ebaff7 100644 +--- a/binutils/dwarf.c ++++ b/binutils/dwarf.c +@@ -2025,6 +2025,21 @@ skip_attr_bytes (unsigned long form, + break; + + case DW_FORM_ref8: ++ { ++ dwarf_vma high_bits; ++ ++ SAFE_BYTE_GET64 (data, &high_bits, &uvalue, end); ++ data += 8; ++ if (sizeof (uvalue) > 4) ++ uvalue += high_bits << 32; ++ else if (high_bits != 0) ++ { ++ /* FIXME: What to do ? */ ++ return NULL; ++ } ++ break; ++ } ++ + case DW_FORM_data8: + case DW_FORM_ref_sig8: + data += 8; +@@ -2115,6 +2130,7 @@ get_type_abbrev_from_form (unsigned long form, + case DW_FORM_ref1: + case DW_FORM_ref2: + case DW_FORM_ref4: ++ case DW_FORM_ref8: + case DW_FORM_ref_udata: + if (uvalue + cu_offset > section->size) + { diff --git a/binutils.spec b/binutils.spec index 412943f..3686c0e 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.35.1 -Release: 13%{?dist} +Release: 14%{?dist} License: GPLv3+ URL: https://sourceware.org/binutils @@ -262,6 +262,7 @@ Patch27: binutils-recursive-debuglink-following.patch # Lifetime: Fixed in 2.36 Patch28: binutils-dwarf-type-sign.patch Patch29: binutils-dwarf-type-sign-2.patch +Patch30: binutils-dwarf-DW_FORM_ref8.patch #---------------------------------------------------------------------------- @@ -839,8 +840,11 @@ exit 0 #---------------------------------------------------------------------------- %changelog +* Tue Nov 10 2020 Nick Clifton - 2.35.1-14 +- Add support for DW_FORM_ref8 when parsing DWARF types. (#1893921) + * Tue Nov 03 2020 Nick Clifton - 2.35.1-13 -- Extend fix erroneous decoding of LEB128 values. (#1893921) +- Extend fix for erroneous decoding of LEB128 values. * Tue Nov 03 2020 Nick Clifton - 2.35.1-12 - Another correction for plugin as-needed patch. (#1889763)