summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYaakov Selkowitz <yselkowi@redhat.com>2020-04-01 15:08:03 -0400
committerYaakov Selkowitz <yselkowi@redhat.com>2020-04-01 15:08:03 -0400
commita9bf03e3ec0a624e553e5a099c440fe85a8cfcf4 (patch)
tree35f79fc89aa8a4d64c38c438a9a5a0587284be30
parent8d8470e4d35e3c07c585d802ea86ddc8e262e156 (diff)
downloadcygwin-binutils-a9bf03e3ec0a624e553e5a099c440fe85a8cfcf4.tar.gz
cygwin-binutils-a9bf03e3ec0a624e553e5a099c440fe85a8cfcf4.tar.xz
cygwin-binutils-a9bf03e3ec0a624e553e5a099c440fe85a8cfcf4.zip
cygwin-binutils 2.34
-rw-r--r--.gitignore4
-rw-r--r--0001-PR25447.patch35
-rw-r--r--0002-PR24511.patch32
-rw-r--r--binutils-textdomain.patch12
-rw-r--r--cygwin-binutils.spec19
-rw-r--r--sources2
-rw-r--r--w32api-sysroot.patch22
7 files changed, 98 insertions, 28 deletions
diff --git a/.gitignore b/.gitignore
index 52bd323..e8b2898 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1 @@
-/binutils-2.25.1.tar.bz2
-/binutils-2.29.1.tar.xz
-/binutils-2.31.1.tar.xz
+/binutils-2.34.tar.xz
diff --git a/0001-PR25447.patch b/0001-PR25447.patch
new file mode 100644
index 0000000..9f24939
--- /dev/null
+++ b/0001-PR25447.patch
@@ -0,0 +1,35 @@
+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/ChangeLog | 9 +++++++++
+ bfd/coffgen.c | 6 ++++--
+ 2 files changed, 13 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
+
diff --git a/0002-PR24511.patch b/0002-PR24511.patch
new file mode 100644
index 0000000..a763d41
--- /dev/null
+++ b/0002-PR24511.patch
@@ -0,0 +1,32 @@
+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/ChangeLog | 6 ++++++
+ bfd/syms.c | 4 ++--
+ 2 files changed, 8 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
+
diff --git a/binutils-textdomain.patch b/binutils-textdomain.patch
index e573a63..be7f57a 100644
--- a/binutils-textdomain.patch
+++ b/binutils-textdomain.patch
@@ -6,7 +6,7 @@
# Define the identity of the package.
- PACKAGE='bfd'
+ PACKAGE=cygwin-bfd
- VERSION='2.31.1'
+ VERSION='2.34'
--- a/binutils/configure
@@ -17,7 +17,7 @@
# Define the identity of the package.
- PACKAGE='binutils'
+ PACKAGE=cygwin-binutils
- VERSION='2.31.1'
+ VERSION='2.34'
--- a/gas/configure
@@ -28,7 +28,7 @@
# Define the identity of the package.
- PACKAGE='gas'
+ PACKAGE=cygwin-gas
- VERSION='2.31.1'
+ VERSION='2.34'
--- a/gprof/configure
@@ -39,7 +39,7 @@
# Define the identity of the package.
- PACKAGE='gprof'
+ PACKAGE=cygwin-gprof
- VERSION='2.31.1'
+ VERSION='2.34'
--- a/ld/configure
@@ -50,7 +50,7 @@
# Define the identity of the package.
- PACKAGE='ld'
+ PACKAGE=cygwin-ld
- VERSION='2.31.1'
+ VERSION='2.34'
--- a/opcodes/configure
@@ -61,6 +61,6 @@
# Define the identity of the package.
- PACKAGE='opcodes'
+ PACKAGE=cygwin-opcodes
- VERSION='2.31.1'
+ VERSION='2.34'
diff --git a/cygwin-binutils.spec b/cygwin-binutils.spec
index 510939b..fb77515 100644
--- a/cygwin-binutils.spec
+++ b/cygwin-binutils.spec
@@ -1,17 +1,19 @@
%global run_testsuite 0
Name: cygwin-binutils
-Version: 2.31.1
+Version: 2.34
Release: 1%{?dist}
Summary: Cross-compiled version of binutils for Cygwin environments
License: GPLv2+ and LGPLv2+ and GPLv3+ and LGPLv3+
Group: Development/Libraries
-URL: http://www.gnu.org/software/binutils/
-Source0: http://ftpmirror.gnu.org/binutils/binutils-%{version}.tar.xz
-Patch0: w32api-sysroot.patch
-Patch1: binutils-textdomain.patch
+URL: https://www.gnu.org/software/binutils/
+Source0: https://ftpmirror.gnu.org/binutils/binutils-%{version}.tar.xz
+Patch1: 0001-PR25447.patch
+Patch2: 0002-PR24511.patch
+Patch1000: w32api-sysroot.patch
+Patch1001: binutils-textdomain.patch
BuildRequires: gcc
@@ -61,9 +63,7 @@ understand Cygwin executables and DLLs.
%prep
-%setup -q -n binutils-%{version}
-%patch0 -p1
-%patch1 -p1
+%autosetup -n binutils-%{version} -p1
%build
@@ -276,6 +276,9 @@ cat cygwin-opcodes.lang >> cygwin-binutils.lang
%changelog
+* Wed Apr 01 2020 Yaakov Selkowitz <yselkowi@redhat.com> - 2.34-1
+- new version
+
* Wed Dec 19 2018 Yaakov Selkowitz <yselkowi@redhat.com> - 2.31.1-1
- new version
diff --git a/sources b/sources
index fe5ad02..ef80505 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-5b7c9d4ce96f507d95c1b9a255e52418 binutils-2.31.1.tar.xz
+SHA512 (binutils-2.34.tar.xz) = 2c7976939dcf5e8c5b7374cccd39bfe803b1bec73c6abfa0eb17c24e1942574c6bdb874c66a092a82adc443182eacd8a5a8001c19a76101f0c7ba40c27de0bbd
diff --git a/w32api-sysroot.patch b/w32api-sysroot.patch
index cdf8d3c..0220d9d 100644
--- a/w32api-sysroot.patch
+++ b/w32api-sysroot.patch
@@ -1,20 +1,22 @@
+diff --git a/ld/configure.tgt b/ld/configure.tgt
+index 23194e357f..5953f0a119 100644
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
-@@ -263,7 +263,7 @@ i[3-7]86-*-pe) targ_emul=i386pe ;
- targ_extra_ofiles="deffilep.o pe-dll.o" ;;
+@@ -387,7 +387,7 @@ i[3-7]86-*-pe) targ_emul=i386pe ;
+ ;;
i[3-7]86-*-cygwin*) targ_emul=i386pe ;
targ_extra_ofiles="deffilep.o pe-dll.o" ;
-- test "$targ" != "$host" && LIB_PATH='${tooldir}/lib/w32api' ;;
-+ test "$targ" != "$host" && LIB_PATH='${tooldir}/lib/w32api:=/usr/lib/w32api' ;;
+- test "$targ" != "$host" && LIB_PATH='${tooldir}/lib/w32api'
++ test "$targ" != "$host" && LIB_PATH='${tooldir}/lib/w32api:=/usr/lib/w32api'
+ ;;
i[3-7]86-*-mingw32*) targ_emul=i386pe ;
- targ_extra_ofiles="deffilep.o pe-dll.o" ;;
- x86_64-*-pe | x86_64-*-pep) targ_emul=i386pep ;
-@@ -319,7 +319,7 @@ x86_64-*-pe | x86_64-*-pep) targ_emul=i3
+ targ_extra_ofiles="deffilep.o pe-dll.o"
+@@ -991,7 +991,7 @@ x86_64-*-pe | x86_64-*-pep) targ_emul=i386pep ;
x86_64-*-cygwin) targ_emul=i386pep ;
targ_extra_emuls=i386pe
targ_extra_ofiles="deffilep.o pep-dll.o pe-dll.o"
-- test "$targ" != "$host" && LIB_PATH='${tooldir}/lib/w32api' ;;
-+ test "$targ" != "$host" && LIB_PATH='${tooldir}/lib/w32api:=/usr/lib/w32api' ;;
+- test "$targ" != "$host" && LIB_PATH='${tooldir}/lib/w32api'
++ test "$targ" != "$host" && LIB_PATH='${tooldir}/lib/w32api:=/usr/lib/w32api'
+ ;;
x86_64-*-mingw*) targ_emul=i386pep ;
targ_extra_emuls=i386pe
- targ_extra_ofiles="deffilep.o pep-dll.o pe-dll.o" ;;