binutils: Update to 2.35

This commit is contained in:
Christoph Reiter
2020-08-26 23:00:28 +02:00
parent f102fa6147
commit b84eb4eecf
4 changed files with 18 additions and 90 deletions

View File

@@ -59,9 +59,9 @@ diff -urN binutils-2.27.orig/binutils/prdbg.c binutils-2.27/binutils/prdbg.c
sprintf (buf, "0x%llx", (unsigned long long) vma);
else if (unsignedp)
diff -urN binutils-2.27.orig/binutils/readelf.c binutils-2.27/binutils/readelf.c
--- binutils-2.27.orig/binutils/readelf.c 2016-08-03 09:36:51.000000000 +0200
+++ binutils-2.27/binutils/readelf.c 2016-09-21 21:13:49.240194700 +0200
@@ -1154,7 +1154,7 @@
--- binutils-2.35/binutils/readelf.c.orig 2020-07-24 11:12:19.000000000 +0200
+++ binutils-2.35/binutils/readelf.c 2020-08-26 22:30:15.008358800 +0200
@@ -1274,7 +1274,7 @@
: "%12.12lx %12.12lx ",
offset, inf);
#elif BFD_HOST_64BIT_LONG_LONG
@@ -70,15 +70,15 @@ diff -urN binutils-2.27.orig/binutils/readelf.c binutils-2.27/binutils/readelf.c
printf (do_wide
? "%16.16llx %16.16llx "
: "%12.12llx %12.12llx ",
@@ -12372,7 +12372,7 @@
{
size_t maxlen = end - data;
@@ -13927,7 +13927,7 @@
}
else
{
-#ifndef __MSVCRT__
+#if !defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO)
/* PR 11128: Use two separate invocations in order to work
around bugs in the Solaris 8 implementation of printf. */
printf (" [%6tx] ", data - start);
/* PR 11128: Use two separate invocations in order to work
around bugs in the Solaris 8 implementation of printf. */
printf (" [%6tx] ", data - start);
diff -urN binutils-2.27.orig/binutils/strings.c binutils-2.27/binutils/strings.c
--- binutils-2.27.orig/binutils/strings.c 2016-08-03 09:36:51.000000000 +0200
+++ binutils-2.27/binutils/strings.c 2016-09-21 21:13:49.251195600 +0200

View File

@@ -1,31 +0,0 @@
From 40bfb9762747f8336b17c70a0173d10200fa62eb Mon Sep 17 00:00:00 2001
From: Alan Modra <amodra@gmail.com>
Date: Thu, 27 Feb 2020 17:28:47 +1030
Subject: [PATCH] Re: PR24511, nm should not mark symbols in .init_array as "t"
PR 24511
* syms.c (bfd_decode_symclass): Reverse order of coff_section_type
and decode_section_type calls.
---
bfd/syms.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/bfd/syms.c b/bfd/syms.c
index 128cf191453..8a8b74f3f92 100644
--- a/bfd/syms.c
+++ b/bfd/syms.c
@@ -705,9 +705,9 @@ bfd_decode_symclass (asymbol *symbol)
c = 'a';
else if (symbol->section)
{
- c = decode_section_type (symbol->section);
+ c = coff_section_type (symbol->section->name);
if (c == '?')
- c = coff_section_type (symbol->section->name);
+ c = decode_section_type (symbol->section);
}
else
return '?';
--
2.18.2

View File

@@ -1,34 +0,0 @@
From 82f439d028c65663a0baf0a17ef5c4a2ea5c84a7 Mon Sep 17 00:00:00 2001
From: Nick Clifton <nickc@redhat.com>
Date: Tue, 11 Feb 2020 15:55:25 +0000
Subject: [PATCH] Import a fix from the mainline sources that prevents a
potential illegal memory access when parsing PE binaries.
PR 25447
* coffgen.c (_bfd_coff_close_and_cleanup): Do not clear the keep
syms and keep strings flags as these may have been set in order to
prevent a bogus call to free.
---
bfd/coffgen.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/bfd/coffgen.c b/bfd/coffgen.c
index 2bfcf1a6b14..3ddd2d89a83 100644
--- a/bfd/coffgen.c
+++ b/bfd/coffgen.c
@@ -3175,8 +3175,10 @@ _bfd_coff_close_and_cleanup (bfd *abfd)
&& bfd_family_coff (abfd)
&& coff_data (abfd) != NULL)
{
- obj_coff_keep_syms (abfd) = FALSE;
- obj_coff_keep_strings (abfd) = FALSE;
+ /* PR 25447:
+ Do not clear the keep_syms and keep_strings flags.
+ These may have been set by pe_ILF_build_a_bfd() indicating
+ that the syms and strings pointers are not to be freed. */
if (!_bfd_coff_free_symbols (abfd))
return FALSE;
}
--
2.18.2

View File

@@ -5,8 +5,8 @@
_realname=binutils
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=2.34
pkgrel=3
pkgver=2.35
pkgrel=1
pkgdesc="A set of programs to assemble and manipulate binary and object files (mingw-w64)"
arch=('any')
url="https://www.gnu.org/software/binutils/"
@@ -23,20 +23,17 @@ source=(https://ftp.gnu.org/gnu/binutils/${_realname}-${pkgver}.tar.xz{,.sig}
0010-bfd-Increase-_bfd_coff_max_nscns-to-65279.patch
0020-binutils_2.31_mkdtemp_impl.patch
0110-binutils-mingw-gnu-print.patch
0120-windres-handle-spaces.patch
1000-PR24511.patch
1001-PR25447.patch)
sha256sums=('f00b0e8803dc9bab1e2165bd568528135be734df3fabf8d0161828cd56028952'
0120-windres-handle-spaces.patch)
sha256sums=('1b11659fb49e20e18db460d44485f09442c8c56d5df165de9461eb09c8302f85'
'SKIP'
'93296b909e1a4f9d8a4bbe2437aafa17ca565ef6642a9812b0360c05be228c9d'
'2c99345fc575c3a060d6677537f636c6c4154fac0fde508070f3b6296c1060d4'
'604e76e0f702ced493ee22aa3c1768b4776b2008a7d70ae0dd35fe5be3522141'
'34ba6c001ff7f95ae1da0619c73130112b76d0d2a31bb8a00602eb22f1f84cb8'
'd0d5d7fbf26b4ea902583ca5cd03fe1721adc0582f05f4ce9595f6b0a1f3c4d8'
'86ae90d997e986a54aaebb5251f3a71800b0c5c3f5b57b9094a42995e9f5c478'
'ee802df23360ad8b51cbc52aa0845916bb36098fbe6940e93a8f4c74ac5f18e9'
'c1363575e0a13c7cacc696b68bedf2937c872422d6af286a7dc25f8b9c678ba7')
validpgpkeys=('EAF1C276A747E9ED86210CBAC3126D3B4AE55E93')
'76658ef1bb8c5fc3fe6c26e2b5dd9ee0f1d12661988c0c65562b0a3e2d32ae1f'
'86ae90d997e986a54aaebb5251f3a71800b0c5c3f5b57b9094a42995e9f5c478')
validpgpkeys=('EAF1C276A747E9ED86210CBAC3126D3B4AE55E93'
'3A24BC1E8FB409FA9F14371813FCEF89DD9E3C4F')
prepare() {
cd ${srcdir}/${_realname}-${pkgver}
@@ -46,10 +43,6 @@ prepare() {
patch -p1 -i "${srcdir}"/0020-binutils_2.31_mkdtemp_impl.patch
patch -p1 -i "${srcdir}"/0110-binutils-mingw-gnu-print.patch
patch -p1 -i "${srcdir}"/0120-windres-handle-spaces.patch
# Upstream patches
patch -p1 -i "${srcdir}"/1000-PR24511.patch
patch -p1 -i "${srcdir}"/1001-PR25447.patch
}
build() {