From patchwork Wed Jul 29 15:26:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Schmutzler X-Patchwork-Id: 1338383 X-Patchwork-Delegate: freifunk@adrianschmutzler.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=adrianschmutzler.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=eaXZT5D2; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BGyBF6kH8z9sRN for ; Thu, 30 Jul 2020 01:28:51 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe :List-Id:MIME-Version:Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=zXiOu4qFIjjjF5oVeSIL7ixg+ifAgIQVOpIUIv18Fso=; b=eaXZT5D2fgsGD+OWOOt00YPhmB ZI419+BYqF3A/rTaFvySWAMzkyGdwSmHaQEMvNExPQCMJbAe3WnLviQEZSPDn+R/Isopq/NIVkWs/ /r5cOTTfKbWR2spCwK7fYsiRC+lvnk7xGRAGfoxInFeBzxa0zhJIGGj2yHf0zTlWsHl5XxQ6215wC RSxYBPWxVaxLvnzJjrMOzH1f/OaZRi9yu/0Rm7WCZm9MZy3hNyXwo05/k3sDE1pGYSKW36YVhFAbP G8yc6B6pBbL8TexzA9YDAmnUihgIvhbEWgdFdQyC4RiUJ6KrwGnJ80Q/DzNkleoIhvBrV9suSKS6i u44nicAg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k0nyx-0000uV-Kl; Wed, 29 Jul 2020 15:27:03 +0000 Received: from mout.kundenserver.de ([212.227.17.10]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k0nyv-0000tc-8Q for openwrt-devel@lists.openwrt.org; Wed, 29 Jul 2020 15:27:02 +0000 Received: from buildfff.adridolf.com ([188.192.134.246]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.183]) with ESMTPSA (Nemesis) id 1M3UhQ-1k1MDD17vW-000bCQ for ; Wed, 29 Jul 2020 17:26:57 +0200 From: Adrian Schmutzler To: openwrt-devel@lists.openwrt.org Subject: [PATCH] toolchain/binutils: remove versions 2.29.1 and 2.31.1 Date: Wed, 29 Jul 2020 17:26:08 +0200 Message-Id: <20200729152608.4349-1-freifunk@adrianschmutzler.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Provags-ID: V03:K1:O1MVxjT6WwID4PxoWJ3TqxMqkqLvps/1yJorK5bBkNbtYOktL2f IsWu1scW6HuJYLYhOUTl/IpdauQON0YYLzi02xcYLQvrSWpZpweSfjN7gCM6ZEb9/YhVJxh 2d1ObigCqD36M7kCiYKTjlhOQ2TBnQIuxhB9g0GJ1um8lZspRyX/u0Wj7pEk0FNwPneb9If tHpFYX8gDpWFymlQnMsyA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:uDtiJ2Dtrxs=:bUh6IVDxsnCFuh4Or+vp+v awP+20K8VQdEWKA93tHNuDzRh6OI3wAC/Ue4GLpPj88S35Kj3RcP7kZT58f74oVtK1Y53an// ZRQ743M9aYykiyKw+tUye3Fs9OoeGrv9+Xa0TVqGw1K47FPDwX8t+19FbJtR82ljOcDfWSnAy BLndiHUaj9tBKtkz/WHXQrULRd5wGwbtVnTaYzfMVBRPcTbfZ1IrSSaTo8was9/hXtNUtMxiC 4kITsjZpjzCPb2cvcPm8scr0huREWG7bmcyhfSmCMTJ+VgNgV/MYWTB0y6qBsLfyKefe04P77 qYtR9bhFEBDmqFVBm5kDMxKd5/FDpacfmMWmFXAR0EwZZI+mr7CaaykoYmSpKxM2uKl49TNNk rJJF1HN5iGQBAClof68+2XFH+9xjWM4zFZDLj/v72fogcgi4aSrZ+n8SC6XTLD36dnZbo9nIq t6cxnGwAFCB11KdPQY8UqjFLo0IfgcaZ2Kdqd6NrKDLeRNME8ViqcucyLBfABR9ECiAPl8+bc V4b/heQuC8n5BY4KpWZipRR+5OMcPIR7bAKHRw8KzNNEEgITfy6VXnkqfsMCQLRUpy4dDta8P 5DcKj8IWPmk33lz/3qvWDC1fw4egrNlk3+pzJ/RnpHV5/F4y40sfFvq1tROBMhzlKGplMFWXI /8TNPsalZd2FuOOd6C0VsXu7AvuJMoyrD07hDmtrh3RarFMYEoaUBXsN6sBvyzGpEik47pyMm o8qwWNzrsfolvEvgAaNaXwn0r6X7MX/96KmejET/5eO/ceq22+O8YNQLCEN6+JtmUPREzcFRr v0NurgT0RixO/xWSft/9HYVkKPD1ZoUv2s7cIr2D2rwQ/4Lap9ie7ilnjRz0toTbA7uq+8AE4 DFCrWpkvtcPI0iYx2GRQ== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200729_112701_551488_73683E29 X-CRM114-Status: GOOD ( 18.07 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [212.227.17.10 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.17.10 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org We currently support four versions of binutils in parallel. Let's just keep the latest two and drop the older ones before the next one comes around. Signed-off-by: Adrian Schmutzler --- toolchain/binutils/Config.in | 10 - toolchain/binutils/Config.version | 8 - toolchain/binutils/Makefile | 8 - .../2.29.1/300-001_ld_makefile_patch.patch | 22 -- .../300-012_check_ldrunpath_length.patch | 20 -- .../400-mips_no_dynamic_linking_sym.patch | 18 -- ...e-default-emulation-for-mips64-linux.patch | 37 --- ...nment_expressions_in_output_sections.patch | 276 ------------------ .../2.31.1/300-001_ld_makefile_patch.patch | 22 -- .../300-012_check_ldrunpath_length.patch | 20 -- .../400-mips_no_dynamic_linking_sym.patch | 18 -- ...e-default-emulation-for-mips64-linux.patch | 37 --- 12 files changed, 496 deletions(-) delete mode 100644 toolchain/binutils/patches/2.29.1/300-001_ld_makefile_patch.patch delete mode 100644 toolchain/binutils/patches/2.29.1/300-012_check_ldrunpath_length.patch delete mode 100644 toolchain/binutils/patches/2.29.1/400-mips_no_dynamic_linking_sym.patch delete mode 100644 toolchain/binutils/patches/2.29.1/500-Change-default-emulation-for-mips64-linux.patch delete mode 100644 toolchain/binutils/patches/2.31.1/100-delay_evaluation_of_alignment_expressions_in_output_sections.patch delete mode 100644 toolchain/binutils/patches/2.31.1/300-001_ld_makefile_patch.patch delete mode 100644 toolchain/binutils/patches/2.31.1/300-012_check_ldrunpath_length.patch delete mode 100644 toolchain/binutils/patches/2.31.1/400-mips_no_dynamic_linking_sym.patch delete mode 100644 toolchain/binutils/patches/2.31.1/500-Change-default-emulation-for-mips64-linux.patch diff --git a/toolchain/binutils/Config.in b/toolchain/binutils/Config.in index e9b2d30422..9d77137f4b 100644 --- a/toolchain/binutils/Config.in +++ b/toolchain/binutils/Config.in @@ -6,16 +6,6 @@ choice help Select the version of binutils you wish to use. - config BINUTILS_USE_VERSION_2_29_1 - depends on !arc - bool "Binutils 2.29.1" - select BINUTILS_VERSION_2_29_1 - - config BINUTILS_USE_VERSION_2_31_1 - depends on !arc - bool "Binutils 2.31.1" - select BINUTILS_VERSION_2_31_1 - config BINUTILS_USE_VERSION_2_32 bool "Binutils 2.32" select BINUTILS_VERSION_2_32 diff --git a/toolchain/binutils/Config.version b/toolchain/binutils/Config.version index e7924f89c3..5350b546a6 100644 --- a/toolchain/binutils/Config.version +++ b/toolchain/binutils/Config.version @@ -1,9 +1,3 @@ -config BINUTILS_VERSION_2_29_1 - bool - -config BINUTILS_VERSION_2_31_1 - bool - config BINUTILS_VERSION_2_32 bool @@ -13,7 +7,5 @@ config BINUTILS_VERSION_2_34 config BINUTILS_VERSION string - default "2.29.1" if BINUTILS_VERSION_2_29_1 - default "2.31.1" if BINUTILS_VERSION_2_31_1 default "2.32" if BINUTILS_VERSION_2_32 default "2.34" if BINUTILS_VERSION_2_34 diff --git a/toolchain/binutils/Makefile b/toolchain/binutils/Makefile index c5c8bf588c..b5e121a442 100644 --- a/toolchain/binutils/Makefile +++ b/toolchain/binutils/Makefile @@ -15,14 +15,6 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz TAR_OPTIONS += --exclude='*.rej' -ifeq ($(PKG_VERSION),2.29.1) - PKG_HASH:=e7010a46969f9d3e53b650a518663f98a5dde3c3ae21b7d71e5e6803bc36b577 -endif - -ifeq ($(PKG_VERSION),2.31.1) - PKG_HASH:=5d20086ecf5752cc7d9134246e9588fa201740d540f7eb84d795b1f7a93bca86 -endif - ifeq ($(PKG_VERSION),2.32) PKG_HASH:=0ab6c55dd86a92ed561972ba15b9b70a8b9f75557f896446c82e8b36e473ee04 endif diff --git a/toolchain/binutils/patches/2.29.1/300-001_ld_makefile_patch.patch b/toolchain/binutils/patches/2.29.1/300-001_ld_makefile_patch.patch deleted file mode 100644 index 4365197f74..0000000000 --- a/toolchain/binutils/patches/2.29.1/300-001_ld_makefile_patch.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/ld/Makefile.am -+++ b/ld/Makefile.am -@@ -57,7 +57,7 @@ endif - # We put the scripts in the directory $(scriptdir)/ldscripts. - # We can't put the scripts in $(datadir) because the SEARCH_DIR - # directives need to be different for native and cross linkers. --scriptdir = $(tooldir)/lib -+scriptdir = $(libdir) - - EMUL = @EMUL@ - EMULATION_OFILES = @EMULATION_OFILES@ ---- a/ld/Makefile.in -+++ b/ld/Makefile.in -@@ -446,7 +446,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) - # We put the scripts in the directory $(scriptdir)/ldscripts. - # We can't put the scripts in $(datadir) because the SEARCH_DIR - # directives need to be different for native and cross linkers. --scriptdir = $(tooldir)/lib -+scriptdir = $(libdir) - BASEDIR = $(srcdir)/.. - BFDDIR = $(BASEDIR)/bfd - INCDIR = $(BASEDIR)/include diff --git a/toolchain/binutils/patches/2.29.1/300-012_check_ldrunpath_length.patch b/toolchain/binutils/patches/2.29.1/300-012_check_ldrunpath_length.patch deleted file mode 100644 index 0b02c55978..0000000000 --- a/toolchain/binutils/patches/2.29.1/300-012_check_ldrunpath_length.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/ld/emultempl/elf32.em -+++ b/ld/emultempl/elf32.em -@@ -1463,6 +1463,8 @@ fragment <link.next) - if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) diff --git a/toolchain/binutils/patches/2.29.1/400-mips_no_dynamic_linking_sym.patch b/toolchain/binutils/patches/2.29.1/400-mips_no_dynamic_linking_sym.patch deleted file mode 100644 index a28e9348a3..0000000000 --- a/toolchain/binutils/patches/2.29.1/400-mips_no_dynamic_linking_sym.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/bfd/elfxx-mips.c -+++ b/bfd/elfxx-mips.c -@@ -7871,6 +7871,7 @@ _bfd_mips_elf_create_dynamic_sections (b - - name = SGI_COMPAT (abfd) ? "_DYNAMIC_LINK" : "_DYNAMIC_LINKING"; - bh = NULL; -+ if (0) { - if (!(_bfd_generic_link_add_one_symbol - (info, abfd, name, BSF_GLOBAL, bfd_abs_section_ptr, 0, - NULL, FALSE, get_elf_backend_data (abfd)->collect, &bh))) -@@ -7883,6 +7884,7 @@ _bfd_mips_elf_create_dynamic_sections (b - - if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; -+ } - - if (! mips_elf_hash_table (info)->use_rld_obj_head) - { diff --git a/toolchain/binutils/patches/2.29.1/500-Change-default-emulation-for-mips64-linux.patch b/toolchain/binutils/patches/2.29.1/500-Change-default-emulation-for-mips64-linux.patch deleted file mode 100644 index 53d5b5ac5a..0000000000 --- a/toolchain/binutils/patches/2.29.1/500-Change-default-emulation-for-mips64-linux.patch +++ /dev/null @@ -1,37 +0,0 @@ ---- a/bfd/config.bfd -+++ b/bfd/config.bfd -@@ -1186,12 +1186,12 @@ case "${targ}" in - targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_be_vec mips_ecoff_le_vec" - ;; - mips64*el-*-linux*) -- targ_defvec=mips_elf32_ntrad_le_vec -- targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec" -+ targ_defvec=mips_elf64_trad_le_vec -+ targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_be_vec" - ;; - mips64*-*-linux*) -- targ_defvec=mips_elf32_ntrad_be_vec -- targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec" -+ targ_defvec=mips_elf64_trad_be_vec -+ targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_le_vec" - ;; - mips*el-*-linux*) - targ_defvec=mips_elf32_trad_le_vec ---- a/ld/configure.tgt -+++ b/ld/configure.tgt -@@ -530,11 +530,11 @@ mips*el-*-vxworks*) targ_emul=elf32elmip - mips*-*-vxworks*) targ_emul=elf32ebmipvxworks - targ_extra_emuls="elf32elmipvxworks" ;; - mips*-*-windiss) targ_emul=elf32mipswindiss ;; --mips64*el-*-linux-*) targ_emul=elf32ltsmipn32 -- targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip" -+mips64*el-*-linux-*) targ_emul=elf64ltsmip -+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32ltsmip elf32btsmip elf64btsmip" - targ_extra_libpath=$targ_extra_emuls ;; --mips64*-*-linux-*) targ_emul=elf32btsmipn32 -- targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip" -+mips64*-*-linux-*) targ_emul=elf64btsmip -+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip" - targ_extra_libpath=$targ_extra_emuls ;; - mips*el-*-linux-*) targ_emul=elf32ltsmip - targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip" diff --git a/toolchain/binutils/patches/2.31.1/100-delay_evaluation_of_alignment_expressions_in_output_sections.patch b/toolchain/binutils/patches/2.31.1/100-delay_evaluation_of_alignment_expressions_in_output_sections.patch deleted file mode 100644 index c006c94af6..0000000000 --- a/toolchain/binutils/patches/2.31.1/100-delay_evaluation_of_alignment_expressions_in_output_sections.patch +++ /dev/null @@ -1,276 +0,0 @@ -From 3d9c8f6b3f033a6092425b7344647fb51dbed5c6 Mon Sep 17 00:00:00 2001 -From: Alan Modra -Date: Sun, 26 Aug 2018 14:23:38 +0930 -Subject: [PATCH] Delay evaluation of alignment expressions in output sections - -git commit 702d16713 broke expressions using CONSTANT(COMMONPAGESIZE) -in ALIGN or SUBALIGN of output section statements, because these -optional fields were evaluated at script parse time and the patch in -question delayed setting of config.commonpagesize. The right thing to -do is keep the tree representation of those fields for later -evaluation. - - PR 23571 - * ldlang.h (section_alignment): Make it an expression tree. - (subsection_alignment): Likewise. - * ldlang.c (topower): Delete. - (output_section_statement_newfunc): Adjust initialization. - (init_os): Evaluate section_alignment. - (lang_size_sections_1): Likewise. - (size_input_section): Evaluate subsection_alignment. - (lang_enter_output_section_statement): Don't evaluate here. - (lang_new_phdr): Use exp_get_vma rather than exp_get_value_int. - * ldexp.h (exp_get_value_int): Delete. - (exp_get_power): Declare. - * ldexp.c (exp_get_value_int): Delete. - (exp_get_power): New function. - * emultempl/pe.em (place_orphan): Build expression for section - alignment. - * emultempl/pep.em (place_orphan): Likewise. - * testsuite/ld-scripts/pr23571.d, - * testsuite/ld-scripts/pr23571.t: New test. - * testsuite/ld-scripts/align.exp: Run it. ---- - ld/ChangeLog | 23 +++++++++++++++++++ - ld/emultempl/pe.em | 2 +- - ld/emultempl/pep.em | 2 +- - ld/ldexp.c | 20 ++++++++++++++-- - ld/ldexp.h | 4 ++-- - ld/ldlang.c | 48 +++++++++++++-------------------------- - ld/ldlang.h | 4 ++-- - ld/testsuite/ld-scripts/align.exp | 4 ++++ - ld/testsuite/ld-scripts/pr23571.d | 10 ++++++++ - ld/testsuite/ld-scripts/pr23571.t | 11 +++++++++ - 10 files changed, 88 insertions(+), 40 deletions(-) - create mode 100644 ld/testsuite/ld-scripts/pr23571.d - create mode 100644 ld/testsuite/ld-scripts/pr23571.t - ---- a/ld/emultempl/pe.em -+++ b/ld/emultempl/pe.em -@@ -2165,7 +2165,7 @@ gld_${EMULATION_NAME}_place_orphan (asec - &add_child); - if (bfd_link_relocatable (&link_info)) - { -- os->section_alignment = s->alignment_power; -+ os->section_alignment = exp_intop (1U << s->alignment_power); - os->bfd_section->alignment_power = s->alignment_power; - } - } ---- a/ld/emultempl/pep.em -+++ b/ld/emultempl/pep.em -@@ -1962,7 +1962,7 @@ gld_${EMULATION_NAME}_place_orphan (asec - &add_child); - if (bfd_link_relocatable (&link_info)) - { -- os->section_alignment = s->alignment_power; -+ os->section_alignment = exp_intop (1U << s->alignment_power); - os->bfd_section->alignment_power = s->alignment_power; - } - } ---- a/ld/ldexp.c -+++ b/ld/ldexp.c -@@ -1522,10 +1522,26 @@ exp_get_vma (etree_type *tree, bfd_vma d - return def; - } - -+/* Return the smallest non-negative integer such that two raised to -+ that power is at least as large as the vma evaluated at TREE, if -+ TREE is a non-NULL expression that can be resolved. If TREE is -+ NULL or cannot be resolved, return -1. */ -+ - int --exp_get_value_int (etree_type *tree, int def, char *name) -+exp_get_power (etree_type *tree, char *name) - { -- return exp_get_vma (tree, def, name); -+ bfd_vma x = exp_get_vma (tree, -1, name); -+ bfd_vma p2; -+ int n; -+ -+ if (x == (bfd_vma) -1) -+ return -1; -+ -+ for (n = 0, p2 = 1; p2 < x; ++n, p2 <<= 1) -+ if (p2 == 0) -+ break; -+ -+ return n; - } - - fill_type * ---- a/ld/ldexp.h -+++ b/ld/ldexp.h -@@ -229,8 +229,8 @@ void exp_print_tree - (etree_type *); - bfd_vma exp_get_vma - (etree_type *, bfd_vma, char *); --int exp_get_value_int -- (etree_type *, int, char *); -+int exp_get_power -+ (etree_type *, char *); - fill_type *exp_get_fill - (etree_type *, fill_type *, char *); - bfd_vma exp_get_abs_int ---- a/ld/ldlang.c -+++ b/ld/ldlang.c -@@ -1199,8 +1199,8 @@ output_section_statement_newfunc (struct - ret = (struct out_section_hash_entry *) entry; - memset (&ret->s, 0, sizeof (ret->s)); - ret->s.header.type = lang_output_section_statement_enum; -- ret->s.output_section_statement.subsection_alignment = -1; -- ret->s.output_section_statement.section_alignment = -1; -+ ret->s.output_section_statement.subsection_alignment = NULL; -+ ret->s.output_section_statement.section_alignment = NULL; - ret->s.output_section_statement.block_value = 1; - lang_list_init (&ret->s.output_section_statement.children); - lang_statement_append (stat_ptr, &ret->s, &ret->s.header.next); -@@ -2193,8 +2193,9 @@ init_os (lang_output_section_statement_t - exp_init_os (s->load_base); - - /* If supplied an alignment, set it. */ -- if (s->section_alignment != -1) -- s->bfd_section->alignment_power = s->section_alignment; -+ if (s->section_alignment != NULL) -+ s->bfd_section->alignment_power = exp_get_power (s->section_alignment, -+ "section alignment"); - } - - /* Make sure that all output sections mentioned in an expression are -@@ -4706,8 +4707,10 @@ size_input_section - is greater than any seen before, then record it too. Perform - the alignment by inserting a magic 'padding' statement. */ - -- if (output_section_statement->subsection_alignment != -1) -- i->alignment_power = output_section_statement->subsection_alignment; -+ if (output_section_statement->subsection_alignment != NULL) -+ i->alignment_power -+ = exp_get_power (output_section_statement->subsection_alignment, -+ "subsection alignment"); - - if (o->alignment_power < i->alignment_power) - o->alignment_power = i->alignment_power; -@@ -5147,7 +5150,8 @@ lang_size_sections_1 - section_alignment = os->bfd_section->alignment_power; - } - else -- section_alignment = os->section_alignment; -+ section_alignment = exp_get_power (os->section_alignment, -+ "section alignment"); - - /* Align to what the section needs. */ - if (section_alignment > 0) -@@ -5225,7 +5229,8 @@ lang_size_sections_1 - only align according to the value in the output - statement. */ - if (os->lma_region != os->region) -- section_alignment = os->section_alignment; -+ section_alignment = exp_get_power (os->section_alignment, -+ "section alignment"); - if (section_alignment > 0) - lma = align_power (lma, section_alignment); - } -@@ -6673,25 +6678,6 @@ lang_add_output (const char *name, int f - } - } - --static int --topower (int x) --{ -- unsigned int i = 1; -- int l; -- -- if (x < 0) -- return -1; -- -- for (l = 0; l < 32; l++) -- { -- if (i >= (unsigned int) x) -- return l; -- i <<= 1; -- } -- -- return 0; --} -- - lang_output_section_statement_type * - lang_enter_output_section_statement (const char *output_section_statement_name, - etree_type *address_exp, -@@ -6727,10 +6713,8 @@ lang_enter_output_section_statement (con - einfo (_("%F%P:%pS: error: align with input and explicit align specified\n"), - NULL); - -- os->subsection_alignment = -- topower (exp_get_value_int (subalign, -1, "subsection alignment")); -- os->section_alignment = -- topower (exp_get_value_int (align, -1, "section alignment")); -+ os->subsection_alignment = subalign; -+ os->section_alignment = align; - - os->load_base = ebase; - return os; -@@ -7748,7 +7732,7 @@ lang_new_phdr (const char *name, - n = (struct lang_phdr *) stat_alloc (sizeof (struct lang_phdr)); - n->next = NULL; - n->name = name; -- n->type = exp_get_value_int (type, 0, "program header type"); -+ n->type = exp_get_vma (type, 0, "program header type"); - n->filehdr = filehdr; - n->phdrs = phdrs; - n->at = at; ---- a/ld/ldlang.h -+++ b/ld/ldlang.h -@@ -143,6 +143,8 @@ typedef struct lang_output_section_state - fill_type *fill; - union etree_union *addr_tree; - union etree_union *load_base; -+ union etree_union *section_alignment; -+ union etree_union *subsection_alignment; - - /* If non-null, an expression to evaluate after setting the section's - size. The expression is evaluated inside REGION (above) with '.' -@@ -153,8 +155,6 @@ typedef struct lang_output_section_state - lang_output_section_phdr_list *phdrs; - - unsigned int block_value; -- int subsection_alignment; /* Alignment of components. */ -- int section_alignment; /* Alignment of start of section. */ - int constraint; - flagword flags; - enum section_type sectype; ---- a/ld/testsuite/ld-scripts/align.exp -+++ b/ld/testsuite/ld-scripts/align.exp -@@ -53,3 +53,7 @@ if ![is_aout_format] { - } - run_dump_test align2c - set LDFLAGS "$saved_LDFLAGS" -+ -+if { [is_elf_format] && ![is_generic_elf] } { -+ run_dump_test pr23571 -+} ---- /dev/null -+++ b/ld/testsuite/ld-scripts/pr23571.d -@@ -0,0 +1,10 @@ -+#source: align2a.s -+#ld: -T pr23571.t -z common-page-size=0x1000 -+#objdump: -h -w -+ -+.*: +file format .* -+ -+Sections: -+Idx Name +Size +VMA +LMA +File off +Algn +Flags -+ +0 \.text +[0-9a-f]* +0+1000 +0+1000 .* -+ +1 \.data +[0-9a-f]* +0+2000 +0+2000 +[0-9a-f]* +2\*\*12 .* ---- /dev/null -+++ b/ld/testsuite/ld-scripts/pr23571.t -@@ -0,0 +1,11 @@ -+SECTIONS -+{ -+ .text CONSTANT(COMMONPAGESIZE) : { -+ *(.text) -+ } -+ -+ .data : ALIGN(CONSTANT(COMMONPAGESIZE)) { -+ *(.data) -+ } -+ /DISCARD/ : {*(*)} -+} diff --git a/toolchain/binutils/patches/2.31.1/300-001_ld_makefile_patch.patch b/toolchain/binutils/patches/2.31.1/300-001_ld_makefile_patch.patch deleted file mode 100644 index 7b8300efac..0000000000 --- a/toolchain/binutils/patches/2.31.1/300-001_ld_makefile_patch.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/ld/Makefile.am -+++ b/ld/Makefile.am -@@ -57,7 +57,7 @@ endif - # We put the scripts in the directory $(scriptdir)/ldscripts. - # We can't put the scripts in $(datadir) because the SEARCH_DIR - # directives need to be different for native and cross linkers. --scriptdir = $(tooldir)/lib -+scriptdir = $(libdir) - - EMUL = @EMUL@ - EMULATION_OFILES = @EMULATION_OFILES@ ---- a/ld/Makefile.in -+++ b/ld/Makefile.in -@@ -563,7 +563,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) - # We put the scripts in the directory $(scriptdir)/ldscripts. - # We can't put the scripts in $(datadir) because the SEARCH_DIR - # directives need to be different for native and cross linkers. --scriptdir = $(tooldir)/lib -+scriptdir = $(libdir) - BASEDIR = $(srcdir)/.. - BFDDIR = $(BASEDIR)/bfd - INCDIR = $(BASEDIR)/include diff --git a/toolchain/binutils/patches/2.31.1/300-012_check_ldrunpath_length.patch b/toolchain/binutils/patches/2.31.1/300-012_check_ldrunpath_length.patch deleted file mode 100644 index 58ee759de6..0000000000 --- a/toolchain/binutils/patches/2.31.1/300-012_check_ldrunpath_length.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/ld/emultempl/elf32.em -+++ b/ld/emultempl/elf32.em -@@ -1471,6 +1471,8 @@ fragment <link.next) - if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) diff --git a/toolchain/binutils/patches/2.31.1/400-mips_no_dynamic_linking_sym.patch b/toolchain/binutils/patches/2.31.1/400-mips_no_dynamic_linking_sym.patch deleted file mode 100644 index 91ff77f827..0000000000 --- a/toolchain/binutils/patches/2.31.1/400-mips_no_dynamic_linking_sym.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- a/bfd/elfxx-mips.c -+++ b/bfd/elfxx-mips.c -@@ -7888,6 +7888,7 @@ _bfd_mips_elf_create_dynamic_sections (b - - name = SGI_COMPAT (abfd) ? "_DYNAMIC_LINK" : "_DYNAMIC_LINKING"; - bh = NULL; -+ if (0) { - if (!(_bfd_generic_link_add_one_symbol - (info, abfd, name, BSF_GLOBAL, bfd_abs_section_ptr, 0, - NULL, FALSE, get_elf_backend_data (abfd)->collect, &bh))) -@@ -7900,6 +7901,7 @@ _bfd_mips_elf_create_dynamic_sections (b - - if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; -+ } - - if (! mips_elf_hash_table (info)->use_rld_obj_head) - { diff --git a/toolchain/binutils/patches/2.31.1/500-Change-default-emulation-for-mips64-linux.patch b/toolchain/binutils/patches/2.31.1/500-Change-default-emulation-for-mips64-linux.patch deleted file mode 100644 index c6e123e88e..0000000000 --- a/toolchain/binutils/patches/2.31.1/500-Change-default-emulation-for-mips64-linux.patch +++ /dev/null @@ -1,37 +0,0 @@ ---- a/bfd/config.bfd -+++ b/bfd/config.bfd -@@ -913,12 +913,12 @@ case "${targ}" in - targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_be_vec mips_ecoff_le_vec" - ;; - mips64*el-*-linux*) -- targ_defvec=mips_elf32_ntrad_le_vec -- targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec" -+ targ_defvec=mips_elf64_trad_le_vec -+ targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_be_vec" - ;; - mips64*-*-linux*) -- targ_defvec=mips_elf32_ntrad_be_vec -- targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec" -+ targ_defvec=mips_elf64_trad_be_vec -+ targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_le_vec" - ;; - mips*el-*-linux*) - targ_defvec=mips_elf32_trad_le_vec ---- a/ld/configure.tgt -+++ b/ld/configure.tgt -@@ -464,11 +464,11 @@ mips*el-*-vxworks*) targ_emul=elf32elmip - mips*-*-vxworks*) targ_emul=elf32ebmipvxworks - targ_extra_emuls="elf32elmipvxworks" ;; - mips*-*-windiss) targ_emul=elf32mipswindiss ;; --mips64*el-*-linux-*) targ_emul=elf32ltsmipn32 -- targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip" -+mips64*el-*-linux-*) targ_emul=elf64ltsmip -+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32ltsmip elf32btsmip elf64btsmip" - targ_extra_libpath=$targ_extra_emuls ;; --mips64*-*-linux-*) targ_emul=elf32btsmipn32 -- targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip" -+mips64*-*-linux-*) targ_emul=elf64btsmip -+ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip" - targ_extra_libpath=$targ_extra_emuls ;; - mips*el-*-linux-*) targ_emul=elf32ltsmip - targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"