From becdb085d9e6fa9e3766dc2eb608c2ef717cd2e8 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Thu, 26 Aug 2021 18:37:07 -0400 Subject: cygwin-libbfd 2.37 --- 0001-PR25447.patch | 35 --------------------------------- 0002-PR24511.patch | 32 ------------------------------ binutils-2.37-cygwin-config-rpath.patch | 19 ++++++++++++++++++ binutils-2.37-cygwin-peflags.patch | 31 +++++++++++++++++++++++++++++ cygwin-libbfd.spec | 29 +++++++++++++++++++-------- sources | 2 +- 6 files changed, 72 insertions(+), 76 deletions(-) delete mode 100644 0001-PR25447.patch delete mode 100644 0002-PR24511.patch create mode 100644 binutils-2.37-cygwin-config-rpath.patch create mode 100644 binutils-2.37-cygwin-peflags.patch diff --git a/0001-PR25447.patch b/0001-PR25447.patch deleted file mode 100644 index 9f24939..0000000 --- a/0001-PR25447.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 82f439d028c65663a0baf0a17ef5c4a2ea5c84a7 Mon Sep 17 00:00:00 2001 -From: Nick Clifton -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 deleted file mode 100644 index a763d41..0000000 --- a/0002-PR24511.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 40bfb9762747f8336b17c70a0173d10200fa62eb Mon Sep 17 00:00:00 2001 -From: Alan Modra -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-2.37-cygwin-config-rpath.patch b/binutils-2.37-cygwin-config-rpath.patch new file mode 100644 index 0000000..1fe0b1b --- /dev/null +++ b/binutils-2.37-cygwin-config-rpath.patch @@ -0,0 +1,19 @@ +--- a/config.rpath ++++ b/config.rpath +@@ -438,7 +438,14 @@ + bsdi4*) + ;; + cygwin* | mingw* | pw32*) +- shrext=.dll ++ case "$TOOLCHAIN_TARGET" in ++ i686-w64-mingw32 | x86_64-w64-mingw32) ++ shrext=.dll.a ++ ;; ++ *) ++ shrext=.dll ++ ;; ++ esac + ;; + darwin* | rhapsody*) + shrext=.dylib + diff --git a/binutils-2.37-cygwin-peflags.patch b/binutils-2.37-cygwin-peflags.patch new file mode 100644 index 0000000..d4356c6 --- /dev/null +++ b/binutils-2.37-cygwin-peflags.patch @@ -0,0 +1,31 @@ +--- a/ld/emultempl/pe.em 2021-01-09 11:47:34.000000000 +0100 ++++ b/ld/emultempl/pe.em 2021-02-28 09:40:12.547395700 +0100 +@@ -104,8 +104,12 @@ fragment < - 2.37-1 +- new version + +* Wed Apr 1 2020 Yaakov Selkowitz - 2.34-1 +- new version + * Thu Dec 20 2018 Yaakov Selkowitz - 2.31.1-1 - new version diff --git a/sources b/sources index ef80505..b8c6109 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (binutils-2.34.tar.xz) = 2c7976939dcf5e8c5b7374cccd39bfe803b1bec73c6abfa0eb17c24e1942574c6bdb874c66a092a82adc443182eacd8a5a8001c19a76101f0c7ba40c27de0bbd +SHA512 (binutils-2.37.tar.xz) = 5c11aeef6935860a6819ed3a3c93371f052e52b4bdc5033da36037c1544d013b7f12cb8d561ec954fe7469a68f1b66f1a3cd53d5a3af7293635a90d69edd15e7 -- cgit