Rebase to GNU Binutils 2.34. (#1793098)

Retire: binutils-improved-note-merging.patch
Retire: binutils-CVE-2019-17451.patch
Retire: binutils-CVE-2019-17450.patch
Retire: binutils-addr2line-fixes.patch
This commit is contained in:
Nick Clifton 2020-02-02 14:55:39 +00:00
parent bf57373ec8
commit 657e3d5a3e
8 changed files with 28 additions and 3678 deletions

1
.gitignore vendored
View File

@ -18,3 +18,4 @@ build-sources
/binutils-special-sections-in-groups.patch /binutils-special-sections-in-groups.patch
/binutils-2.32.tar.xz /binutils-2.32.tar.xz
/binutils-2.33.1.tar.xz /binutils-2.33.1.tar.xz
/binutils-2.34.tar.xz

View File

@ -1,62 +0,0 @@
--- binutils.orig/bfd/dwarf2.c 2019-11-13 11:49:52.211121564 +0000
+++ binutils-2.33.1/bfd/dwarf2.c 2019-11-13 11:53:26.991423055 +0000
@@ -2813,8 +2813,8 @@ static bfd_boolean comp_unit_maybe_decod
static bfd_boolean
find_abstract_instance (struct comp_unit * unit,
- bfd_byte * orig_info_ptr,
struct attribute * attr_ptr,
+ unsigned int recur_count,
const char ** pname,
bfd_boolean * is_linkage,
char ** filename_ptr,
@@ -2829,6 +2829,14 @@ find_abstract_instance (struct comp_unit
struct attribute attr;
const char *name = NULL;
+ if (recur_count == 100)
+ {
+ _bfd_error_handler
+ (_("DWARF error: abstract instance recursion detected"));
+ bfd_set_error (bfd_error_bad_value);
+ return FALSE;
+ }
+
/* DW_FORM_ref_addr can reference an entry in a different CU. It
is an offset from the .debug_info section, not the current CU. */
if (attr_ptr->form == DW_FORM_ref_addr)
@@ -2962,15 +2970,7 @@ find_abstract_instance (struct comp_unit
info_ptr, info_ptr_end);
if (info_ptr == NULL)
break;
- /* It doesn't ever make sense for DW_AT_specification to
- refer to the same DIE. Stop simple recursion. */
- if (info_ptr == orig_info_ptr)
- {
- _bfd_error_handler
- (_("DWARF error: abstract instance recursion detected"));
- bfd_set_error (bfd_error_bad_value);
- return FALSE;
- }
+
switch (attr.name)
{
case DW_AT_name:
@@ -2984,7 +2984,7 @@ find_abstract_instance (struct comp_unit
}
break;
case DW_AT_specification:
- if (!find_abstract_instance (unit, info_ptr, &attr,
+ if (!find_abstract_instance (unit, &attr, recur_count + 1,
&name, is_linkage,
filename_ptr, linenumber_ptr))
return FALSE;
@@ -3200,7 +3200,7 @@ scan_unit_for_symbols (struct comp_unit
case DW_AT_abstract_origin:
case DW_AT_specification:
- if (!find_abstract_instance (unit, info_ptr, &attr,
+ if (!find_abstract_instance (unit, &attr, 0,
&func->name,
&func->is_linkage,
&func->file,

View File

@ -1,20 +0,0 @@
--- binutils.orig/bfd/dwarf2.c 2019-11-13 11:32:09.395430104 +0000
+++ binutils-2.33.1/bfd/dwarf2.c 2019-11-13 11:33:17.272899503 +0000
@@ -4440,7 +4440,16 @@ _bfd_dwarf2_slurp_debug_info (bfd *abfd,
for (total_size = 0;
msec;
msec = find_debug_info (debug_bfd, debug_sections, msec))
- total_size += msec->size;
+ {
+ /* Catch PR25070 testcase overflowing size calculation here. */
+ if (total_size + msec->size < total_size
+ || total_size + msec->size < msec->size)
+ {
+ bfd_set_error (bfd_error_no_memory);
+ return FALSE;
+ }
+ total_size += msec->size;
+ }
stash->info_ptr_memory = (bfd_byte *) bfd_malloc (total_size);
if (stash->info_ptr_memory == NULL)

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
diff -rup binutils.orig/gas/config/obj-elf.c binutils-2.30/gas/config/obj-elf.c diff -rup binutils.orig/gas/config/obj-elf.c binutils-2.34/gas/config/obj-elf.c
--- binutils.orig/gas/config/obj-elf.c 2018-09-24 17:50:06.974172867 +0100 --- binutils.orig/gas/config/obj-elf.c 2020-02-02 11:34:11.858321477 +0000
+++ binutils-2.30/gas/config/obj-elf.c 2018-09-25 15:19:33.559830794 +0100 +++ binutils-2.34/gas/config/obj-elf.c 2020-02-02 11:34:30.099247619 +0000
@@ -82,9 +82,11 @@ static void obj_elf_gnu_attribute (int); @@ -78,9 +78,11 @@ static void obj_elf_gnu_attribute (int);
static void obj_elf_tls_common (int); static void obj_elf_tls_common (int);
static void obj_elf_lcomm (int); static void obj_elf_lcomm (int);
static void obj_elf_struct (int); static void obj_elf_struct (int);
@ -13,7 +13,7 @@ diff -rup binutils.orig/gas/config/obj-elf.c binutils-2.30/gas/config/obj-elf.c
{"comm", obj_elf_common, 0}, {"comm", obj_elf_common, 0},
{"common", obj_elf_common, 1}, {"common", obj_elf_common, 1},
{"ident", obj_elf_ident, 0}, {"ident", obj_elf_ident, 0},
@@ -1007,6 +1009,27 @@ obj_elf_section_name (void) @@ -1003,6 +1005,27 @@ obj_elf_section_name (void)
return name; return name;
} }
@ -41,18 +41,19 @@ diff -rup binutils.orig/gas/config/obj-elf.c binutils-2.30/gas/config/obj-elf.c
void void
obj_elf_section (int push) obj_elf_section (int push)
{ {
diff -rup binutils.orig/gas/doc/as.texinfo binutils-2.30/gas/doc/as.texinfo Only in binutils-2.34/gas/config: obj-elf.c.orig
--- binutils.orig/gas/doc/as.texi 2018-09-24 17:50:06.984172788 +0100 diff -rup binutils.orig/gas/doc/as.texi binutils-2.34/gas/doc/as.texi
+++ binutils-2.30/gas/doc/as.texi 2018-09-25 15:19:43.557748972 +0100 --- binutils.orig/gas/doc/as.texi 2020-02-02 11:34:11.850321509 +0000
@@ -4407,6 +4407,7 @@ Some machine configurations provide addi +++ binutils-2.34/gas/doc/as.texi 2020-02-02 11:35:11.359080560 +0000
@@ -4359,6 +4359,7 @@ Some machine configurations provide addi
* Altmacro:: @code{.altmacro} * Altmacro:: @code{.altmacro}
* Ascii:: @code{.ascii "@var{string}"}@dots{} * Ascii:: @code{.ascii "@var{string}"}@dots{}
* Asciz:: @code{.asciz "@var{string}"}@dots{} * Asciz:: @code{.asciz "@var{string}"}@dots{}
+* Attach_to_group:: @code{.attach_to_group @var{name}} +* Attach_to_group:: @code{.attach_to_group @var{name}}
* Balign:: @code{.balign @var{abs-expr} , @var{abs-expr}} * Balign:: @code{.balign [@var{abs-expr}[, @var{abs-expr}]]}
* Bundle directives:: @code{.bundle_align_mode @var{abs-expr}}, etc * Bundle directives:: @code{.bundle_align_mode @var{abs-expr}}, etc
* Byte:: @code{.byte @var{expressions}} * Byte:: @code{.byte @var{expressions}}
@@ -4703,6 +4704,12 @@ trailing zero byte) into consecutive add @@ -4656,6 +4657,12 @@ trailing zero byte) into consecutive add
@code{.asciz} is just like @code{.ascii}, but each string is followed by @code{.asciz} is just like @code{.ascii}, but each string is followed by
a zero byte. The ``z'' in @samp{.asciz} stands for ``zero''. a zero byte. The ``z'' in @samp{.asciz} stands for ``zero''.
@ -63,6 +64,7 @@ diff -rup binutils.orig/gas/doc/as.texinfo binutils-2.30/gas/doc/as.texinfo
+has been created. +has been created.
+ +
@node Balign @node Balign
@section @code{.balign[wl] @var{abs-expr}, @var{abs-expr}, @var{abs-expr}} @section @code{.balign[wl] [@var{abs-expr}[, @var{abs-expr}[, @var{abs-expr}]]]}
Only in binutils-2.34/gas/doc: as.texi.orig
Only in binutils-2.34/gas/doc: as.texi.rej

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,8 @@
Summary: A GNU collection of binary utilities Summary: A GNU collection of binary utilities
Name: %{?cross}binutils%{?_with_debug:-debug} Name: %{?cross}binutils%{?_with_debug:-debug}
Version: 2.33.1 Version: 2.34
Release: 13%{?dist} Release: 1%{?dist}
License: GPLv3+ License: GPLv3+
URL: https://sourceware.org/binutils URL: https://sourceware.org/binutils
@ -204,24 +204,6 @@ Patch14: binutils-gold-mismatched-section-flags.patch
# Lifetime: Fixed in 2.34 (maybe) # Lifetime: Fixed in 2.34 (maybe)
Patch15: binutils-CVE-2019-1010204.patch Patch15: binutils-CVE-2019-1010204.patch
# Purpose: Improve objdump's ability to merge GNU build attribute notes.
# Lifetime: Fixed in 2.34
Patch16: binutils-improved-note-merging.patch
# Purpose: Fix a potential seg-fault in the BFD library when parsing
# pathalogical debug_info sections.
# Lifetime: Fixed in 2.34
Patch17: binutils-CVE-2019-17451.patch
# Purpose: Fix a memory exhaustion bug in the BFD library when parsing
# corrupt DWARF debug information.
# Lifetime: Fixed in 2.34
Patch18: binutils-CVE-2019-17450.patch
# Purpose: Improve addr2line's ability to translate addresses into file/line numbers.
# Lifetime: Fixed in 2.34
Patch19: binutils-addr2line-fixes.patch
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
Provides: bundled(libiberty) Provides: bundled(libiberty)
@ -349,7 +331,7 @@ Conflicts: gcc-c++ < 4.0.0
# The higher of these two numbers determines the default ld. # The higher of these two numbers determines the default ld.
%{!?ld_gold_priority:%global ld_gold_priority 30} %{!?ld_gold_priority:%global ld_gold_priority 30}
%endif %%# with gold %endif # with gold
%{!?ld_bfd_priority: %global ld_bfd_priority 50} %{!?ld_bfd_priority: %global ld_bfd_priority 50}
@ -372,10 +354,6 @@ Conflicts: gcc-c++ < 4.0.0
%patch13 -p1 %patch13 -p1
%patch14 -p1 %patch14 -p1
%patch15 -p1 %patch15 -p1
%patch16 -p1
%patch17 -p1
%patch18 -p1
%patch19 -p1
# We cannot run autotools as there is an exact requirement of autoconf-2.59. # 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 ? # FIXME - this is no longer true. Maybe try reinstating autotool use ?
@ -759,6 +737,7 @@ exit 0
%if %{enable_shared} %if %{enable_shared}
%{_libdir}/lib*.so %{_libdir}/lib*.so
%{_libdir}/libctf*
%exclude %{_libdir}/libbfd.so %exclude %{_libdir}/libbfd.so
%exclude %{_libdir}/libopcodes.so %exclude %{_libdir}/libopcodes.so
%endif %endif
@ -782,6 +761,13 @@ exit 0
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
%changelog %changelog
* Sun Feb 02 2020 Nick Clifton <nickc@redhat.com> - 2.34-1
- Rebase to GNU Binutils 2.34. (#1793098)
- Retire: binutils-improved-note-merging.patch
- Retire: binutils-CVE-2019-17451.patch
- Retire: binutils-CVE-2019-17450.patch
- Retire: binutils-addr2line-fixes.patch
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.33.1-13 * Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.33.1-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

View File

@ -1,2 +1,2 @@
SHA512 (binutils-2.33.1.tar.xz) = b7a6767c6c7ca6b5cafa7080e6820b7bb3a53b7148348c438d99905defbdf0d30c9744a484ee01c9441a8153901808513366b15ba9533e20c9673c262ade36ac SHA512 (binutils-2.34.tar.xz) = 2c7976939dcf5e8c5b7374cccd39bfe803b1bec73c6abfa0eb17c24e1942574c6bdb874c66a092a82adc443182eacd8a5a8001c19a76101f0c7ba40c27de0bbd
SHA512 (binutils-2.19.50.0.1-output-format.sed) = 2f8686b0c8af13c98cda056824c2820416f6e2d003f70b78ccf5314525b9ee3684d421dfa83e638a2d42d06ea4d4bdaf5226b64d6ec26f7ff59c44ffb2a23dd2 SHA512 (binutils-2.19.50.0.1-output-format.sed) = 2f8686b0c8af13c98cda056824c2820416f6e2d003f70b78ccf5314525b9ee3684d421dfa83e638a2d42d06ea4d4bdaf5226b64d6ec26f7ff59c44ffb2a23dd2