public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Nick Clifton <nickc@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/binutils] rawhide: Remove unused patches
Date: Wed, 12 Aug 2026 10:22:20 GMT	[thread overview]
Message-ID: <178653014049.1.260353372323368620.rpms-binutils-40bef170ce8b@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/binutils
Branch : rawhide
Commit : 40bef170ce8bd81f7f65d83b8e24e851f25b7467
Author : Nick Clifton <nickc@redhat.com>
Date   : 2026-08-12T11:22:10+01:00
Stats  : +0/-1762 in 9 file(s)
URL    : https://src.fedoraproject.org/rpms/binutils/c/40bef170ce8bd81f7f65d83b8e24e851f25b7467?branch=rawhide

Log:
Remove unused patches

---
diff --git a/binutils-aarch64-ifuncs.patch b/binutils-aarch64-ifuncs.patch
deleted file mode 100644
index b6445b7..0000000
--- a/binutils-aarch64-ifuncs.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- binutils.orig/ld/testsuite/ld-elf/tls.exp	2026-06-04 15:04:55.967170259 +0100
-+++ binutils-with-gold-2.46.50-48997323b0f/ld/testsuite/ld-elf/tls.exp	2026-06-04 15:08:11.936031107 +0100
-@@ -66,6 +66,7 @@ run_ld_link_tests [list \
-     ] \
- ]
- 
-+setup_xfail "aarch64-*-*"
- run_cc_link_tests [list \
-     [list \
- 	"pr34165" \

diff --git a/binutils-aarch64-obj-attr.patch b/binutils-aarch64-obj-attr.patch
deleted file mode 100644
index 7214394..0000000
--- a/binutils-aarch64-obj-attr.patch
+++ /dev/null
@@ -1,167 +0,0 @@
-diff -rup binutils-with-gold-2.45.90/bfd/elf-attrs.c /work/sources/binutils/upstream/2.46/bfd/elf-attrs.c
---- binutils-with-gold-2.45.90/bfd/elf-attrs.c	2026-01-25 09:30:41.000000000 +0000
-+++ /work/sources/binutils/upstream/2.46/bfd/elf-attrs.c	2026-01-27 08:04:23.387789745 +0000
-@@ -3192,7 +3192,7 @@ _bfd_elf_obj_attr_v2_cmp (const obj_attr
-    This allows an early return if we find a higher numbered tag.  */
- 
- obj_attr_v2_t *
--_bfd_obj_attr_v2_find_by_tag (const obj_attr_subsection_v2_t *subsec,
-+bfd_obj_attr_v2_find_by_tag (const obj_attr_subsection_v2_t *subsec,
- 			      obj_attr_tag_t tag,
- 			      bool sorted)
- {
-@@ -3218,6 +3218,14 @@ LINKED_LIST_MUTATIVE_OPS_DECL (obj_attr_
- LINKED_LIST_MERGE_SORT_DECL (obj_attr_subsection_v2_t,
- 			     obj_attr_v2_t, /* extern */)
- 
-+/* Public API wrapper for LINKED_LIST_APPEND (obj_attr_v2_t).  */
-+
-+void bfd_obj_attr_subsection_v2_append (obj_attr_subsection_v2_t *subsec,
-+					obj_attr_v2_t *attr)
-+{
-+  LINKED_LIST_APPEND (obj_attr_v2_t) (subsec, attr);
-+}
-+
- /* Create a new object attribute subsection with the following properties:
-    - NAME: the name of the subsection.  Note: this parameter never holds a
-      string literal, so the value has to be freeable.
-@@ -3364,6 +3372,24 @@ LINKED_LIST_MUTATIVE_OPS_DECL (obj_attr_
- LINKED_LIST_MERGE_SORT_DECL (obj_attr_subsection_list_t,
- 			     obj_attr_subsection_v2_t, /* extern */)
- 
-+/* Public API wrapper for LINKED_LIST_APPEND (obj_attr_subsection_v2_t).  */
-+
-+void
-+bfd_obj_attr_subsection_v2_list_append (obj_attr_subsection_list_t *l,
-+					obj_attr_subsection_v2_t *subsec)
-+{
-+  LINKED_LIST_APPEND (obj_attr_subsection_v2_t) (l, subsec);
-+}
-+
-+/* Public API wrapper for LINKED_LIST_REMOVE (obj_attr_subsection_v2_t).  */
-+
-+obj_attr_subsection_v2_t *
-+bfd_obj_attr_subsection_v2_list_remove (obj_attr_subsection_list_t *l,
-+					obj_attr_subsection_v2_t *subsec)
-+{
-+  return LINKED_LIST_REMOVE (obj_attr_subsection_v2_t) (l, subsec);
-+}
-+
- /* Serialize the object attributes in ABFD into the vendor section of
-    OUTPUT_BFD.  */
- 
-diff -rup binutils-with-gold-2.45.90/bfd/elf-bfd.h /work/sources/binutils/upstream/2.46/bfd/elf-bfd.h
---- binutils-with-gold-2.45.90/bfd/elf-bfd.h	2026-01-25 09:30:41.000000000 +0000
-+++ /work/sources/binutils/upstream/2.46/bfd/elf-bfd.h	2026-01-27 08:04:23.387789745 +0000
-@@ -3216,15 +3216,17 @@ extern bool _bfd_elf_read_notes
-   (bfd *, file_ptr, bfd_size_type, size_t) ATTRIBUTE_HIDDEN;
- 
- extern obj_attr_v2_t *bfd_elf_obj_attr_v2_init (obj_attr_tag_t,
--  union obj_attr_value_v2) ATTRIBUTE_HIDDEN;
-+  union obj_attr_value_v2);
- extern void _bfd_elf_obj_attr_v2_free (obj_attr_v2_t *, obj_attr_encoding_v2_t)
-   ATTRIBUTE_HIDDEN;
- extern obj_attr_v2_t *_bfd_elf_obj_attr_v2_copy (const obj_attr_v2_t *,
-   obj_attr_encoding_v2_t) ATTRIBUTE_HIDDEN;
- extern int _bfd_elf_obj_attr_v2_cmp (const obj_attr_v2_t *,
-   const obj_attr_v2_t *) ATTRIBUTE_HIDDEN;
--extern obj_attr_v2_t * _bfd_obj_attr_v2_find_by_tag
--  (const obj_attr_subsection_v2_t *, obj_attr_tag_t, bool) ATTRIBUTE_HIDDEN;
-+extern obj_attr_v2_t *bfd_obj_attr_v2_find_by_tag
-+  (const obj_attr_subsection_v2_t *, obj_attr_tag_t, bool);
-+extern void bfd_obj_attr_subsection_v2_append
-+  (obj_attr_subsection_v2_t *, obj_attr_v2_t *);
- LINKED_LIST_MUTATIVE_OPS_PROTOTYPE (obj_attr_subsection_v2_t,
- 				    obj_attr_v2_t, ATTRIBUTE_HIDDEN);
- LINKED_LIST_MERGE_SORT_PROTOTYPE_ (obj_attr_v2_t, ATTRIBUTE_HIDDEN);
-@@ -3241,6 +3243,10 @@ extern obj_attr_subsection_v2_t *bfd_obj
-   (obj_attr_subsection_v2_t *, const char *, bool);
- extern obj_attr_subsection_scope_v2_t bfd_elf_obj_attr_subsection_v2_scope
-   (const bfd *, const char *);
-+extern void bfd_obj_attr_subsection_v2_list_append
-+  (obj_attr_subsection_list_t *, obj_attr_subsection_v2_t *);
-+extern obj_attr_subsection_v2_t *bfd_obj_attr_subsection_v2_list_remove
-+  (obj_attr_subsection_list_t *, obj_attr_subsection_v2_t *);
- LINKED_LIST_MUTATIVE_OPS_PROTOTYPE (obj_attr_subsection_list_t,
- 				    obj_attr_subsection_v2_t,
- 				    ATTRIBUTE_HIDDEN);
-diff -rup binutils-with-gold-2.45.90/bfd/elfnn-aarch64.c /work/sources/binutils/upstream/2.46/bfd/elfnn-aarch64.c
---- binutils-with-gold-2.45.90/bfd/elfnn-aarch64.c	2026-01-25 09:30:41.000000000 +0000
-+++ /work/sources/binutils/upstream/2.46/bfd/elfnn-aarch64.c	2026-01-27 08:04:23.388789835 +0000
-@@ -10632,7 +10632,7 @@ elfNN_aarch64_link_setup_object_attribut
-   if (aeabi_feature_and_bits_subsec != NULL)
-     {
-       const obj_attr_v2_t *attr_bti
--	= _bfd_obj_attr_v2_find_by_tag (aeabi_feature_and_bits_subsec,
-+	= bfd_obj_attr_v2_find_by_tag (aeabi_feature_and_bits_subsec,
- 					Tag_Feature_BTI, true);
-       if (attr_bti && attr_bti->val.uint == 1)
- 	tdata->sw_protections.plt_type |= PLT_BTI;
-diff -rup binutils-with-gold-2.45.90/bfd/elfxx-aarch64.c /work/sources/binutils/upstream/2.46/bfd/elfxx-aarch64.c
---- binutils-with-gold-2.45.90/bfd/elfxx-aarch64.c	2026-01-25 09:30:41.000000000 +0000
-+++ /work/sources/binutils/upstream/2.46/bfd/elfxx-aarch64.c	2026-01-27 08:04:23.388789835 +0000
-@@ -956,7 +956,7 @@ obj_attr_v2_record_tag_value (obj_attr_s
- 			      bool value)
- {
-   obj_attr_v2_t *attr;
--  attr = _bfd_obj_attr_v2_find_by_tag (subsec, tag, false);
-+  attr = bfd_obj_attr_v2_find_by_tag (subsec, tag, false);
-   if (attr != NULL)
-     {
-       if (attr->val.uint != value)
-@@ -1175,11 +1175,11 @@ aarch64_check_pauthabi_attributes (const
-   int version_id = 0;
- 
-   const obj_attr_v2_t *attr
--    = _bfd_obj_attr_v2_find_by_tag (subsec, Tag_PAuth_Platform, true);
-+    = bfd_obj_attr_v2_find_by_tag (subsec, Tag_PAuth_Platform, true);
-   if (attr != NULL)
-     platform_id = attr->val.uint;
- 
--  attr = _bfd_obj_attr_v2_find_by_tag (subsec, Tag_PAuth_Schema, true);
-+  attr = bfd_obj_attr_v2_find_by_tag (subsec, Tag_PAuth_Schema, true);
-   if (attr != NULL)
-     version_id = attr->val.uint;
- 
-diff -rup binutils-with-gold-2.45.90/gas/config/obj-elf-attr.c /work/sources/binutils/upstream/2.46/gas/config/obj-elf-attr.c
---- binutils-with-gold-2.45.90/gas/config/obj-elf-attr.c	2026-01-25 09:30:41.000000000 +0000
-+++ /work/sources/binutils/upstream/2.46/gas/config/obj-elf-attr.c	2026-01-27 08:04:23.388789835 +0000
-@@ -1063,7 +1063,7 @@ obj_attr_v2_record (obj_attr_tag_t key,
-   /* Go over the list of already recorded attributes and check for
-      redefinitions (which are forbidden).  */
-   bool skip_recording = false;
--  obj_attr_v2_t *recorded_attr = _bfd_obj_attr_v2_find_by_tag
-+  obj_attr_v2_t *recorded_attr = bfd_obj_attr_v2_find_by_tag
-     (elf_obj_attr_subsections (stdoutput).last, obj_attr->tag, false);
-   if (recorded_attr != NULL)
-     {
-@@ -1084,7 +1084,7 @@ obj_attr_v2_record (obj_attr_tag_t key,
-       return;
-     }
- 
--  LINKED_LIST_APPEND (obj_attr_v2_t)
-+  bfd_obj_attr_subsection_v2_append
-     (elf_obj_attr_subsections (stdoutput).last, obj_attr);
- }
- 
-@@ -1133,9 +1133,9 @@ obj_attr_v2_subsection_record (const cha
- 	}
- 
-       /* Move the existing subsection to the last position.  */
--      LINKED_LIST_REMOVE (obj_attr_subsection_v2_t)
-+      bfd_obj_attr_subsection_v2_list_remove
- 	(&elf_obj_attr_subsections (stdoutput), already_recorded_subsec);
--      LINKED_LIST_APPEND (obj_attr_subsection_v2_t)
-+      bfd_obj_attr_subsection_v2_list_append
- 	(&elf_obj_attr_subsections (stdoutput), already_recorded_subsec);
-       /* Note: 'name' was unused, and will be freed on exit.  */
-     }
-@@ -1158,7 +1158,7 @@ obj_attr_v2_subsection_record (const cha
- 	= bfd_elf_obj_attr_subsection_v2_init (name, scope,
- 					       comprehension_optional,
- 					       encoding);
--      LINKED_LIST_APPEND (obj_attr_subsection_v2_t)
-+      bfd_obj_attr_subsection_v2_list_append
- 	(&elf_obj_attr_subsections (stdoutput), new_subsection);
-       return;
-     }

diff --git a/binutils-disable-gcs-report-dynamic-tests.patch b/binutils-disable-gcs-report-dynamic-tests.patch
deleted file mode 100644
index c7edc50..0000000
--- a/binutils-disable-gcs-report-dynamic-tests.patch
+++ /dev/null
@@ -1,413 +0,0 @@
-From 9e7085f2700d698dfbb37aef24c0489c2d09a978 Mon Sep 17 00:00:00 2001
-From: Siddhesh Poyarekar <siddhesh@gotplt.org>
-Date: Thu, 6 Feb 2025 12:06:27 -0500
-Subject: [PATCH] Revert "aarch64: GCS tests for linking issues with dynamic
- objects"
-
-This reverts commit 1c136b8ee9b9fb402b66957bd51e89e47b94a0f6.
----
- .../protections/aarch64-protections.exp       | 15 ----------
- .../ld-aarch64/protections/gcs-dynamic-1-a.d  | 12 --------
- .../ld-aarch64/protections/gcs-dynamic-1-b.d  | 12 --------
- .../protections/gcs-dynamic-2-a-i.d           | 15 ----------
- .../protections/gcs-dynamic-2-a-ii.d          |  8 ------
- .../protections/gcs-dynamic-2-a-iii.d         | 15 ----------
- .../protections/gcs-dynamic-2-a-iv.d          | 12 --------
- .../ld-aarch64/protections/gcs-dynamic-2-b.d  | 14 ----------
- .../ld-aarch64/protections/gcs-dynamic-2-c.d  | 12 --------
- .../ld-aarch64/protections/gcs-dynamic-2-d.d  | 14 ----------
- .../ld-aarch64/protections/gcs-dynamic-3-a.d  | 15 ----------
- .../ld-aarch64/protections/gcs-dynamic-3-b.d  | 14 ----------
- .../ld-aarch64/protections/gcs-dynamic-3-c.d  | 12 --------
- .../ld-aarch64/protections/gcs-dynamic-4-a.d  |  7 -----
- .../ld-aarch64/protections/gcs-dynamic-4-b.d  |  7 -----
- .../ld-aarch64/protections/gcs-dynamic-4-c.d  |  7 -----
- ld/testsuite/ld-aarch64/protections/gcs-so.s  | 28 -------------------
- ld/testsuite/ld-aarch64/protections/gcs-so2.s | 28 -------------------
- 18 files changed, 247 deletions(-)
- delete mode 100644 ld/testsuite/ld-aarch64/protections/gcs-dynamic-1-a.d
- delete mode 100644 ld/testsuite/ld-aarch64/protections/gcs-dynamic-1-b.d
- delete mode 100644 ld/testsuite/ld-aarch64/protections/gcs-dynamic-2-a-i.d
- delete mode 100644 ld/testsuite/ld-aarch64/protections/gcs-dynamic-2-a-ii.d
- delete mode 100644 ld/testsuite/ld-aarch64/protections/gcs-dynamic-2-a-iii.d
- delete mode 100644 ld/testsuite/ld-aarch64/protections/gcs-dynamic-2-a-iv.d
- delete mode 100644 ld/testsuite/ld-aarch64/protections/gcs-dynamic-2-b.d
- delete mode 100644 ld/testsuite/ld-aarch64/protections/gcs-dynamic-2-c.d
- delete mode 100644 ld/testsuite/ld-aarch64/protections/gcs-dynamic-2-d.d
- delete mode 100644 ld/testsuite/ld-aarch64/protections/gcs-dynamic-3-a.d
- delete mode 100644 ld/testsuite/ld-aarch64/protections/gcs-dynamic-3-b.d
- delete mode 100644 ld/testsuite/ld-aarch64/protections/gcs-dynamic-3-c.d
- delete mode 100644 ld/testsuite/ld-aarch64/protections/gcs-dynamic-4-a.d
- delete mode 100644 ld/testsuite/ld-aarch64/protections/gcs-dynamic-4-b.d
- delete mode 100644 ld/testsuite/ld-aarch64/protections/gcs-dynamic-4-c.d
- delete mode 100644 ld/testsuite/ld-aarch64/protections/gcs-so.s
- delete mode 100644 ld/testsuite/ld-aarch64/protections/gcs-so2.s
-
-diff --git a/ld/testsuite/ld-aarch64/protections/aarch64-protections.exp b/ld/testsuite/ld-aarch64/protections/aarch64-protections.exp
-index cf0f03daee6..b49428d1039 100644
---- a/ld/testsuite/ld-aarch64/protections/aarch64-protections.exp
-+++ b/ld/testsuite/ld-aarch64/protections/aarch64-protections.exp
-@@ -42,21 +42,6 @@ set aarch64elflinktests {
-    "-shared" ""
-    "-I$srcdir/$subdir -defsym __property_bti__=1"
-    {bti-plt-so.s} {} "libbti-plt-so.so"}
--
--  {"Build gcs-so for GCS tests"
--   "-shared" ""
--   "-I$srcdir/$subdir -defsym __property_gcs__=1"
--   {gcs-so.s} {} "libgcs-so.so"}
--
--  {"Build nogcs-so for GCS tests"
--   "-shared" ""
--   "-I$srcdir/$subdir"
--   {gcs-so.s} {} "libnogcs-so.so"}
--
--  {"Build gcs-so2 for GCS tests"
--   "-shared" ""
--   "-I$srcdir/$subdir -defsym __property_gcs__=1"
--   {gcs-so2.s} {} "libgcs-so2.so"}
- }
- 
- if [check_shared_lib_support] {
-diff --git a/ld/testsuite/ld-aarch64/protections/gcs-dynamic-1-a.d b/ld/testsuite/ld-aarch64/protections/gcs-dynamic-1-a.d
-deleted file mode 100644
-index be8a301f6c0..00000000000
---- a/ld/testsuite/ld-aarch64/protections/gcs-dynamic-1-a.d
-+++ /dev/null
-@@ -1,12 +0,0 @@
--#name: '-z gcs=always -z gcs-report=error' and shared library with GCS feature reports no error.
--#source: gcs.s
--#source: gcs2.s
--#alltargets: [check_shared_lib_support] *linux*
--#as: -march=armv9.4-a+gcs -defsym __property_gcs__=1
--#ld: -z gcs=always -z gcs-report=error -L./tmpdir -lgcs-so
--#readelf: -n
--
--Displaying notes found in: .note.gnu.property
--[ 	]+Owner[ 	]+Data size[ 	]+Description
--  GNU                  0x00000010	NT_GNU_PROPERTY_TYPE_0
--      Properties: AArch64 feature: GCS
-diff --git a/ld/testsuite/ld-aarch64/protections/gcs-dynamic-1-b.d b/ld/testsuite/ld-aarch64/protections/gcs-dynamic-1-b.d
-deleted file mode 100644
-index d53d45ae598..00000000000
---- a/ld/testsuite/ld-aarch64/protections/gcs-dynamic-1-b.d
-+++ /dev/null
-@@ -1,12 +0,0 @@
--#name: '-z gcs=always -z gcs-report=error -z gcs-report-dynamic=error' and shared library with GCS feature reports no error.
--#source: gcs.s
--#source: gcs2.s
--#alltargets: [check_shared_lib_support] *linux*
--#as: -march=armv9.4-a+gcs -defsym __property_gcs__=1
--#ld: -z gcs=always -z gcs-report=error -z gcs-report-dynamic=error -L./tmpdir -lgcs-so
--#readelf: -n
--
--Displaying notes found in: .note.gnu.property
--[ 	]+Owner[ 	]+Data size[ 	]+Description
--  GNU                  0x00000010	NT_GNU_PROPERTY_TYPE_0
--      Properties: AArch64 feature: GCS
-diff --git a/ld/testsuite/ld-aarch64/protections/gcs-dynamic-2-a-i.d b/ld/testsuite/ld-aarch64/protections/gcs-dynamic-2-a-i.d
-deleted file mode 100644
-index 903d14099be..00000000000
---- a/ld/testsuite/ld-aarch64/protections/gcs-dynamic-2-a-i.d
-+++ /dev/null
-@@ -1,15 +0,0 @@
--#name: '-z gcs=always -z gcs-report=error' and shared libraries without GCS feature reports warnings.
--#source: gcs.s
--#source: gcs2.s
--#alltargets: [check_shared_lib_support] *linux*
--#as: -march=armv9.4-a+gcs  -defsym __property_gcs__=1
--#ld: -z gcs=always -z gcs-report=error -L./tmpdir -lnogcs-so -lbti-plt-so -lgcs-so2
--#warning: \A[^\n]*libnogcs-so\.so: warning: GCS is required by -z gcs[^\n]*\n
--#warning:   [^\n]*libbti-plt-so\.so: warning: GCS is required by -z gcs[^\n]*
--
--#readelf: -n
--
--Displaying notes found in: .note.gnu.property
--[ 	]+Owner[ 	]+Data size[ 	]+Description
--  GNU                  0x00000010	NT_GNU_PROPERTY_TYPE_0
--      Properties: AArch64 feature: GCS
-diff --git a/ld/testsuite/ld-aarch64/protections/gcs-dynamic-2-a-ii.d b/ld/testsuite/ld-aarch64/protections/gcs-dynamic-2-a-ii.d
-deleted file mode 100644
-index 7adb481bc30..00000000000
---- a/ld/testsuite/ld-aarch64/protections/gcs-dynamic-2-a-ii.d
-+++ /dev/null
-@@ -1,8 +0,0 @@
--#name: '-z gcs=always -z gcs-report=error -z gcs-report-dynamic=error' and shared libraries without GCS feature reports errors.
--#source: gcs.s
--#source: gcs2.s
--#alltargets: [check_shared_lib_support] *linux*
--#as: -march=armv9.4-a+gcs  -defsym __property_gcs__=1
--#ld: -z gcs=always -z gcs-report=error -z gcs-report-dynamic=error -L./tmpdir -lnogcs-so -lbti-plt-so -lgcs-so2
--#error: \A[^\n]*libnogcs-so\.so: error: GCS is required by -z gcs[^\n]*\n
--#error:   [^\n]*libbti-plt-so\.so: error: GCS is required by -z gcs[^\n]*
-\ No newline at end of file
-diff --git a/ld/testsuite/ld-aarch64/protections/gcs-dynamic-2-a-iii.d b/ld/testsuite/ld-aarch64/protections/gcs-dynamic-2-a-iii.d
-deleted file mode 100644
-index 76a7c461347..00000000000
---- a/ld/testsuite/ld-aarch64/protections/gcs-dynamic-2-a-iii.d
-+++ /dev/null
-@@ -1,15 +0,0 @@
--#name: '-z gcs=always -z gcs-report=error -z gcs-report-dynamic=warning' and shared libraries without GCS feature reports warnings.
--#source: gcs.s
--#source: gcs2.s
--#alltargets: [check_shared_lib_support] *linux*
--#as: -march=armv9.4-a+gcs  -defsym __property_gcs__=1
--#ld: -z gcs=always -z gcs-report=error -z gcs-report-dynamic=warning -L./tmpdir -lnogcs-so -lbti-plt-so -lgcs-so2
--#warning: \A[^\n]*libnogcs-so\.so: warning: GCS is required by -z gcs[^\n]*\n
--#warning:   [^\n]*libbti-plt-so\.so: warning: GCS is required by -z gcs[^\n]*
--
--#readelf: -n
--
--Displaying notes found in: .note.gnu.property
--[ 	]+Owner[ 	]+Data size[ 	]+Description
--  GNU                  0x00000010	NT_GNU_PROPERTY_TYPE_0
--      Properties: AArch64 feature: GCS
-\ No newline at end of file
-diff --git a/ld/testsuite/ld-aarch64/protections/gcs-dynamic-2-a-iv.d b/ld/testsuite/ld-aarch64/protections/gcs-dynamic-2-a-iv.d
-deleted file mode 100644
-index 554ca1186ef..00000000000
---- a/ld/testsuite/ld-aarch64/protections/gcs-dynamic-2-a-iv.d
-+++ /dev/null
-@@ -1,12 +0,0 @@
--#name: '-z gcs=always -z gcs-report=error -z gcs-report-dynamic=none' and shared libraries without GCS feature reports nothing.
--#source: gcs.s
--#source: gcs2.s
--#alltargets: [check_shared_lib_support] *linux*
--#as: -march=armv9.4-a+gcs  -defsym __property_gcs__=1
--#ld: -z gcs=always -z gcs-report=error -z gcs-report-dynamic=none -L./tmpdir -lnogcs-so -lbti-plt-so -lgcs-so2
--#readelf: -n
--
--Displaying notes found in: .note.gnu.property
--[ 	]+Owner[ 	]+Data size[ 	]+Description
--  GNU                  0x00000010	NT_GNU_PROPERTY_TYPE_0
--      Properties: AArch64 feature: GCS
-\ No newline at end of file
-diff --git a/ld/testsuite/ld-aarch64/protections/gcs-dynamic-2-b.d b/ld/testsuite/ld-aarch64/protections/gcs-dynamic-2-b.d
-deleted file mode 100644
-index 36262bbc087..00000000000
---- a/ld/testsuite/ld-aarch64/protections/gcs-dynamic-2-b.d
-+++ /dev/null
-@@ -1,14 +0,0 @@
--#name: '-z gcs=always -z gcs-report=warning' and shared libraries without GCS feature reports warnings.
--#source: gcs.s
--#source: gcs2.s
--#alltargets: [check_shared_lib_support] *linux*
--#as: -march=armv9.4-a+gcs  -defsym __property_gcs__=1
--#ld: -z gcs=always -z gcs-report=warning -L./tmpdir -lnogcs-so -lbti-plt-so -lgcs-so2
--#warning: \A[^\n]*libnogcs-so\.so: warning: GCS is required by -z gcs[^\n]*\n
--#warning:   [^\n]*libbti-plt-so\.so: warning: GCS is required by -z gcs[^\n]*
--#readelf: -n
--
--Displaying notes found in: .note.gnu.property
--[ 	]+Owner[ 	]+Data size[ 	]+Description
--  GNU                  0x00000010	NT_GNU_PROPERTY_TYPE_0
--      Properties: AArch64 feature: GCS
-diff --git a/ld/testsuite/ld-aarch64/protections/gcs-dynamic-2-c.d b/ld/testsuite/ld-aarch64/protections/gcs-dynamic-2-c.d
-deleted file mode 100644
-index 6c7f5da8be7..00000000000
---- a/ld/testsuite/ld-aarch64/protections/gcs-dynamic-2-c.d
-+++ /dev/null
-@@ -1,12 +0,0 @@
--#name: '-z gcs=always -z gcs-report=none' and shared libraries without GCS feature reports nothing.
--#source: gcs.s
--#source: gcs2.s
--#alltargets: [check_shared_lib_support] *linux*
--#as: -march=armv9.4-a+gcs  -defsym __property_gcs__=1
--#ld: -z gcs=always -z gcs-report=none -L./tmpdir -lnogcs-so -lbti-plt-so -lgcs-so2
--#readelf: -n
--
--Displaying notes found in: .note.gnu.property
--[ 	]+Owner[ 	]+Data size[ 	]+Description
--  GNU                  0x00000010	NT_GNU_PROPERTY_TYPE_0
--      Properties: AArch64 feature: GCS
-diff --git a/ld/testsuite/ld-aarch64/protections/gcs-dynamic-2-d.d b/ld/testsuite/ld-aarch64/protections/gcs-dynamic-2-d.d
-deleted file mode 100644
-index 58498e6c00b..00000000000
---- a/ld/testsuite/ld-aarch64/protections/gcs-dynamic-2-d.d
-+++ /dev/null
-@@ -1,14 +0,0 @@
--#name: '-z gcs=always -z gcs-report' and shared libraries without GCS feature reports warnings.
--#source: gcs.s
--#source: gcs2.s
--#alltargets: [check_shared_lib_support] *linux*
--#as: -march=armv9.4-a+gcs  -defsym __property_gcs__=1
--#ld: -z gcs=always -z gcs-report -L./tmpdir -lnogcs-so -lbti-plt-so -lgcs-so2
--#warning: \A[^\n]*libnogcs-so\.so: warning: GCS is required by -z gcs[^\n]*\n
--#warning:   [^\n]*libbti-plt-so\.so: warning: GCS is required by -z gcs[^\n]*
--#readelf: -n
--
--Displaying notes found in: .note.gnu.property
--[ 	]+Owner[ 	]+Data size[ 	]+Description
--  GNU                  0x00000010	NT_GNU_PROPERTY_TYPE_0
--      Properties: AArch64 feature: GCS
-diff --git a/ld/testsuite/ld-aarch64/protections/gcs-dynamic-3-a.d b/ld/testsuite/ld-aarch64/protections/gcs-dynamic-3-a.d
-deleted file mode 100644
-index ecdaf526779..00000000000
---- a/ld/testsuite/ld-aarch64/protections/gcs-dynamic-3-a.d
-+++ /dev/null
-@@ -1,15 +0,0 @@
--#name: '-z gcs=implicit -z gcs-report=error' and shared libraries without GCS feature reports warnings.
--#source: gcs.s
--#source: gcs2.s
--#alltargets: [check_shared_lib_support] *linux*
--#as: -march=armv9.4-a+gcs  -defsym __property_gcs__=1
--#ld: -z gcs=implicit -z gcs-report=error -L./tmpdir -lnogcs-so -lbti-plt-so -lgcs-so2
--#warning: \A[^\n]*libnogcs-so\.so: warning: GCS is required by -z gcs[^\n]*\n
--#warning:   [^\n]*libbti-plt-so\.so: warning: GCS is required by -z gcs[^\n]*
--
--#readelf: -n
--
--Displaying notes found in: .note.gnu.property
--[ 	]+Owner[ 	]+Data size[ 	]+Description
--  GNU                  0x00000010	NT_GNU_PROPERTY_TYPE_0
--      Properties: AArch64 feature: GCS
-diff --git a/ld/testsuite/ld-aarch64/protections/gcs-dynamic-3-b.d b/ld/testsuite/ld-aarch64/protections/gcs-dynamic-3-b.d
-deleted file mode 100644
-index 4d32fb6aa54..00000000000
---- a/ld/testsuite/ld-aarch64/protections/gcs-dynamic-3-b.d
-+++ /dev/null
-@@ -1,14 +0,0 @@
--#name: '-z gcs=implicit -z gcs-report=warning' and shared libraries without GCS feature reports warnings.
--#source: gcs.s
--#source: gcs2.s
--#alltargets: [check_shared_lib_support] *linux*
--#as: -march=armv9.4-a+gcs  -defsym __property_gcs__=1
--#ld: -z gcs=implicit -z gcs-report=warning -L./tmpdir -lnogcs-so -lbti-plt-so -lgcs-so2
--#warning: \A[^\n]*libnogcs-so\.so: warning: GCS is required by -z gcs[^\n]*\n
--#warning:   [^\n]*libbti-plt-so\.so: warning: GCS is required by -z gcs[^\n]*
--#readelf: -n
--
--Displaying notes found in: .note.gnu.property
--[ 	]+Owner[ 	]+Data size[ 	]+Description
--  GNU                  0x00000010	NT_GNU_PROPERTY_TYPE_0
--      Properties: AArch64 feature: GCS
-\ No newline at end of file
-diff --git a/ld/testsuite/ld-aarch64/protections/gcs-dynamic-3-c.d b/ld/testsuite/ld-aarch64/protections/gcs-dynamic-3-c.d
-deleted file mode 100644
-index c0da6c1d9c6..00000000000
---- a/ld/testsuite/ld-aarch64/protections/gcs-dynamic-3-c.d
-+++ /dev/null
-@@ -1,12 +0,0 @@
--#name: '-z gcs=implicit -z gcs-report=none' and shared libraries without GCS feature reports no warning.
--#source: gcs.s
--#source: gcs2.s
--#alltargets: [check_shared_lib_support] *linux*
--#as: -march=armv9.4-a+gcs  -defsym __property_gcs__=1
--#ld: -z gcs=implicit -z gcs-report=none -L./tmpdir -lnogcs-so -lbti-plt-so -lgcs-so2
--#readelf: -n
--
--Displaying notes found in: .note.gnu.property
--[ 	]+Owner[ 	]+Data size[ 	]+Description
--  GNU                  0x00000010	NT_GNU_PROPERTY_TYPE_0
--      Properties: AArch64 feature: GCS
-\ No newline at end of file
-diff --git a/ld/testsuite/ld-aarch64/protections/gcs-dynamic-4-a.d b/ld/testsuite/ld-aarch64/protections/gcs-dynamic-4-a.d
-deleted file mode 100644
-index ae324bbba1e..00000000000
---- a/ld/testsuite/ld-aarch64/protections/gcs-dynamic-4-a.d
-+++ /dev/null
-@@ -1,7 +0,0 @@
--#name: '-z gcs=never -z gcs-report=error' and shared libraries without GCS feature reports no warning/error.
--#source: gcs.s
--#source: gcs2.s
--#alltargets: [check_shared_lib_support] *linux*
--#as: -march=armv9.4-a+gcs  -defsym __property_gcs__=1
--#ld: -z gcs=never -z gcs-report=error -L./tmpdir -lnogcs-so -lbti-plt-so -lgcs-so2
--#readelf: -n
-diff --git a/ld/testsuite/ld-aarch64/protections/gcs-dynamic-4-b.d b/ld/testsuite/ld-aarch64/protections/gcs-dynamic-4-b.d
-deleted file mode 100644
-index 6b65898b924..00000000000
---- a/ld/testsuite/ld-aarch64/protections/gcs-dynamic-4-b.d
-+++ /dev/null
-@@ -1,7 +0,0 @@
--#name: '-z gcs=never -z gcs-report=warning' and shared libraries without GCS feature reports no warning/error.
--#source: gcs.s
--#source: gcs2.s
--#alltargets: [check_shared_lib_support] *linux*
--#as: -march=armv9.4-a+gcs  -defsym __property_gcs__=1
--#ld: -z gcs=never -z gcs-report=warning -L./tmpdir -lnogcs-so -lbti-plt-so -lgcs-so2
--#readelf: -n
-diff --git a/ld/testsuite/ld-aarch64/protections/gcs-dynamic-4-c.d b/ld/testsuite/ld-aarch64/protections/gcs-dynamic-4-c.d
-deleted file mode 100644
-index 35b011f6a8e..00000000000
---- a/ld/testsuite/ld-aarch64/protections/gcs-dynamic-4-c.d
-+++ /dev/null
-@@ -1,7 +0,0 @@
--#name: '-z gcs=never -z gcs-report=none' and shared libraries without GCS feature reports no warning/error.
--#source: gcs.s
--#source: gcs2.s
--#alltargets: [check_shared_lib_support] *linux*
--#as: -march=armv9.4-a+gcs  -defsym __property_gcs__=1
--#ld: -z gcs=never -z gcs-report=none -L./tmpdir -lnogcs-so -lbti-plt-so -lgcs-so2
--#readelf: -n
-diff --git a/ld/testsuite/ld-aarch64/protections/gcs-so.s b/ld/testsuite/ld-aarch64/protections/gcs-so.s
-deleted file mode 100644
-index aa6485b9dde..00000000000
---- a/ld/testsuite/ld-aarch64/protections/gcs-so.s
-+++ /dev/null
-@@ -1,28 +0,0 @@
--	.global	foo2
--	.type	foo2, %function
--foo2:
--	sub	sp, sp, #16
--	mov	w0, 9
--	str	w0, [sp, 12]
--	ldr	w0, [sp, 12]
--	add	w0, w0, 4
--	str	w0, [sp, 12]
--	nop
--	add	sp, sp, 16
--	ret
--	.size	foo2, .-foo2
--	.global	bar2
--	.type	bar2, %function
--bar2:
--	sub	sp, sp, #16
--	mov	w0, 9
--	str	w0, [sp, 12]
--	ldr	w0, [sp, 12]
--	add	w0, w0, 4
--	str	w0, [sp, 12]
--	nop
--	add	sp, sp, 16
--	ret
--	.size	bar2, .-bar2
--
--.include "gnu-note-properties-selectable-merged.inc"
-diff --git a/ld/testsuite/ld-aarch64/protections/gcs-so2.s b/ld/testsuite/ld-aarch64/protections/gcs-so2.s
-deleted file mode 100644
-index 938ba43c69c..00000000000
---- a/ld/testsuite/ld-aarch64/protections/gcs-so2.s
-+++ /dev/null
-@@ -1,28 +0,0 @@
--	.global	foo3
--	.type	foo3, %function
--foo3:
--	sub	sp, sp, #16
--	mov	w0, 9
--	str	w0, [sp, 12]
--	ldr	w0, [sp, 12]
--	add	w0, w0, 4
--	str	w0, [sp, 12]
--	nop
--	add	sp, sp, 16
--	ret
--	.size	foo3, .-foo3
--	.global	bar3
--	.type	bar3, %function
--bar3:
--	sub	sp, sp, #16
--	mov	w0, 9
--	str	w0, [sp, 12]
--	ldr	w0, [sp, 12]
--	add	w0, w0, 4
--	str	w0, [sp, 12]
--	nop
--	add	sp, sp, 16
--	ret
--	.size	bar3, .-bar3
--
--.include "gnu-note-properties-selectable-merged.inc"
--- 
-2.48.1
-

diff --git a/binutils-disable-gcs-report-dynamic.patch b/binutils-disable-gcs-report-dynamic.patch
deleted file mode 100644
index fa91846..0000000
--- a/binutils-disable-gcs-report-dynamic.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-diff -pruN a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c
---- a/bfd/elfnn-aarch64.c	2025-02-06 10:39:49.722259921 -0500
-+++ b/bfd/elfnn-aarch64.c	2025-02-06 10:47:28.604658973 -0500
-@@ -5051,11 +5051,10 @@ bfd_elfNN_aarch64_set_options (struct bf
-      libraries.  If a user also wants to error GCS issues in the shared
-      libraries, '-z gcs-report-dynamic=error' will have to be specified
-      explicitly.  */
-+  /* XXX Fedora override: default to NONE.  */
-   if (sw_protections->gcs_report_dynamic == MARKING_UNSET)
-     elf_aarch64_tdata (output_bfd)->sw_protections.gcs_report_dynamic
--      = (sw_protections->gcs_report == MARKING_ERROR)
--      ? MARKING_WARN
--      : sw_protections->gcs_report;
-+      =  MARKING_NONE;
- 
-   elf_aarch64_tdata (output_bfd)->n_bti_issues = 0;
-   elf_aarch64_tdata (output_bfd)->n_gcs_issues = 0;

diff --git a/binutils-readelf-local-syms.patch b/binutils-readelf-local-syms.patch
deleted file mode 100644
index 7b4f906..0000000
--- a/binutils-readelf-local-syms.patch
+++ /dev/null
@@ -1,53 +0,0 @@
---- binutils-with-gold-2.45.50.orig/binutils/readelf.c	2025-12-08 10:51:19.287135564 +0000
-+++ binutils-with-gold-2.45.50-8e992ccb1e4/binutils/readelf.c	2025-12-08 10:59:34.414789154 +0000
-@@ -14667,6 +14667,18 @@ print_symbol_size (uint64_t vma, int bas
-     }
- }
- 
-+/* The AArch64, ARM and RISC-V architectures define mapping
-+   symbols (eg $d, $x, $t) which sometime should be ignored.  */
-+
-+static bool
-+is_mapping_symbol (const char * name)
-+{
-+  return name[0] == '$'
-+    && name [1] != 0
-+    /* FIXME: Check that name[1] is lower case ASCII ?  */
-+    && name [2] == 0;
-+}
-+
- /* Print information on a single symbol.  */
- 
- static void
-@@ -14803,7 +14815,9 @@ print_symbol (Filedata *           filed
- 
-   /* Local symbols whose value is larger than their section's size are suspicious
-      especially if that section is mergeable - and hence might change offsets of
--     the contents inside the section.  */
-+     the contents inside the section.
-+     Note - for some reason we can get mapping symbols that do not relate to their
-+     section's contents - so we ignore those type of symbol as well.  */
-   if (ELF_ST_BIND (psym->st_info) == STB_LOCAL
-       && ! is_special
-       && is_valid
-@@ -14811,7 +14825,8 @@ print_symbol (Filedata *           filed
-       && filedata->section_headers != NULL
-       /* FIXME: Should we warn for non-mergeable sections ? */
-       && (filedata->section_headers[psym->st_shndx].sh_flags & SHF_MERGE)
--      && psym->st_value > filedata->section_headers[psym->st_shndx].sh_size)
-+      && psym->st_value > filedata->section_headers[psym->st_shndx].sh_size
-+      && ! is_mapping_symbol (strtab + psym->st_name))
-     warn (_("local symbol %s has a value (%#" PRIx64 ") which is larger than mergeable section %s's size (%#" PRIx64 ")\n"),
- 	  strtab + psym->st_name,
- 	  psym->st_value,
-@@ -23034,9 +23049,7 @@ get_symbol_for_build_attribute (Filedata
- 
- 	/* The AArch64, ARM and RISC-V architectures define mapping symbols
- 	   (eg $d, $x, $t) which we want to ignore.  */
--	if (ba_cache.strtab[sym->st_name] == '$'
--	    && ba_cache.strtab[sym->st_name + 1] != 0
--	    && ba_cache.strtab[sym->st_name + 2] == 0)
-+	if (is_mapping_symbol (ba_cache.strtab + sym->st_name))
- 	  continue;
- 
- 	if (is_open_attr)

diff --git a/binutils-revert-PR33577.patch b/binutils-revert-PR33577.patch
deleted file mode 100644
index a556961..0000000
--- a/binutils-revert-PR33577.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-diff -rup binutils.orig/bfd/elflink.c binutils-with-gold-2.45.50-96b8a8a633a/bfd/elflink.c
---- binutils.orig/bfd/elflink.c	2025-11-20 09:01:31.653839370 +0000
-+++ binutils-with-gold-2.45.50-96b8a8a633a/bfd/elflink.c	2025-11-20 09:02:21.703952373 +0000
-@@ -11158,13 +11158,7 @@ elf_link_output_extsym (struct bfd_hash_
- 	  else
- 	    {
- 	      if (h->verinfo.vertree == NULL)
--		{
--		  iversym.vs_vers = 1;
--		  if (elf_tdata (flinfo->output_bfd)->cverdefs == 0)
--		    /* Defined symbol has no version if there is no
--		       linker version script.  */
--		    noversion = true;
--		}
-+		iversym.vs_vers = 1;
- 	      else
- 		iversym.vs_vers = h->verinfo.vertree->vernum + 1;
- 	      if (flinfo->info->create_default_symver)
-diff -rup binutils.orig/binutils/readelf.c binutils-with-gold-2.45.50-96b8a8a633a/binutils/readelf.c
---- binutils.orig/binutils/readelf.c	2025-11-20 09:01:32.656841480 +0000
-+++ binutils-with-gold-2.45.50-96b8a8a633a/binutils/readelf.c	2025-11-20 09:03:05.707055021 +0000
-@@ -14074,7 +14074,7 @@ process_version_sections (Filedata * fil
- 			  while (ivn.vn_next);
- 			}
- 
--		      if (data[cnt + j] != (VERSYM_HIDDEN | VERSYM_BASE)
-+		      if (data[cnt + j] != 0x8001
- 			  && filedata->version_info[DT_VERSIONTAGIDX (DT_VERDEF)])
- 			{
- 			  Elf_Internal_Verdef ivd;
-@@ -14500,10 +14500,6 @@ get_symbol_version_string (Filedata *fil
-   *sym_info = (vers_data & VERSYM_HIDDEN) != 0 ? symbol_hidden : symbol_public;
-   max_vd_ndx = 0;
- 
--  /* Return the empty string for the base version.  */
--  if ((vers_data & VERSYM_VERSION) == VERSYM_BASE)
--    return "";
--
-   /* Usually we'd only see verdef for defined symbols, and verneed for
-      undefined symbols.  However, symbols defined by the linker in
-      .dynbss for variables copied from a shared library in order to
-@@ -14514,7 +14510,7 @@ get_symbol_version_string (Filedata *fil
-      verneed.  .dynbss might not be mapped to a SHT_NOBITS section.  */
- 
-   if (psym->st_shndx != SHN_UNDEF
--      && vers_data != (VERSYM_HIDDEN | VERSYM_BASE)
-+      && vers_data != 0x8001
-       && filedata->version_info[DT_VERSIONTAGIDX (DT_VERDEF)])
-     {
-       Elf_Internal_Verdef ivd;
-diff -rup binutils.orig/ld/testsuite/ld-elfvers/vers16.dsym binutils-with-gold-2.45.50-96b8a8a633a/ld/testsuite/ld-elfvers/vers16.dsym
---- binutils.orig/ld/testsuite/ld-elfvers/vers16.dsym	2025-11-20 09:01:33.016842237 +0000
-+++ binutils-with-gold-2.45.50-96b8a8a633a/ld/testsuite/ld-elfvers/vers16.dsym	2025-11-20 09:02:55.496031202 +0000
-@@ -1,2 +1,2 @@
--[0-9a-f]+ g +DF (\.text|\.opd|\*ABS\*)	[0-9a-f]+ +(0x[0-9a-f]+ )?_?show_bar
-+[0-9a-f]+ g +DF (\.text|\.opd|\*ABS\*)	[0-9a-f]+( +Base +)? +(0x[0-9a-f]+ )?_?show_bar
- [0-9a-f]+ +DF \*UND\*	[0-9a-f]+ +(0x[0-9a-f]+ )?_?show_foo
-diff -rup binutils.orig/ld/testsuite/ld-elf/pr33599.d binutils-with-gold-2.45.50-96b8a8a633a/ld/testsuite/ld-elf/pr33599.d
---- binutils.orig/ld/testsuite/ld-elf/pr33599.d	2025-11-20 14:11:24.398747907 +0000
-+++ binutils-with-gold-2.45.50-96b8a8a633a/ld/testsuite/ld-elf/pr33599.d	2025-11-20 14:18:55.353205025 +0000
-@@ -5,7 +5,7 @@
- 
- Symbol table '\.dynsym' contains [0-9]+ entries:
- #...
-- +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +OBJECT +GLOBAL +DEFAULT +[0-9]+ +bar@@
-+ +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +OBJECT +GLOBAL +DEFAULT +[0-9]+ +bar@.*
- #...
-- +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +OBJECT +GLOBAL +DEFAULT +[0-9]+ +foo@
-+ +[0-9]+: +[0-9a-f]+ +[0-9a-f]+ +OBJECT +GLOBAL +DEFAULT +[0-9]+ +foo.*
- #pass
---- binutils-with-gold-2.45.50-beab972c07d.orig/ld/testsuite/ld-elfvers/vers.exp	2025-11-24 09:39:57.717018589 +0000
-+++ binutils-with-gold-2.45.50-beab972c07d/ld/testsuite/ld-elfvers/vers.exp	2025-11-24 09:41:49.185852008 +0000
-@@ -1019,6 +1019,8 @@ build_vers_lib_pic "vers31" vers31.c ver
- build_vers_lib_pic "vers32a" vers32a.c vers32a "" vers32.map vers32a.ver vers32a.dsym ""
- build_vers_lib_pic_flags "vers32b" vers32b.c vers32b "vers32a.so" vers32.map vers32b.ver vers32b.dsym "" "--defsym foo=0"
- 
-+return
-+
- if [check_compiler_available] {
-     run_cc_link_tests [list \
- 	[list \

diff --git a/binutils-revert-note-id-move.patch b/binutils-revert-note-id-move.patch
deleted file mode 100644
index 2763327..0000000
--- a/binutils-revert-note-id-move.patch
+++ /dev/null
@@ -1,124 +0,0 @@
---- binutils.orig/ld/scripttempl/elf.sc	2024-11-01 10:17:24.308959289 +0000
-+++ binutils-2.43.50-22c62092858/ld/scripttempl/elf.sc	2024-11-01 10:17:39.730019895 +0000
-@@ -397,19 +397,6 @@ fi
- # ===========================================================================
- # Functions for generating parts of the linker script
- 
--# Helper function for putting comments into scripts.
--# Useful when trying to track down script composition problems.
--# Use by adding:
--#   emit_comment "a message"
--# wherever necessary.
--
--emit_comment()
--{
--cat <<EOF
--  /* $1 */
--EOF
--}
--
- emit_header()
- {
- cat <<EOF
-@@ -438,6 +425,7 @@ emit_early_ro()
- {
-   cat <<EOF
-   ${INITIAL_READONLY_SECTIONS}
-+  .note.gnu.build-id ${RELOCATING-0}: { *(.note.gnu.build-id) }
- EOF
- }
- 
-@@ -448,11 +436,6 @@ cat <<EOF
-   ${CREATE_SHLIB-${CREATE_PIE-${RELOCATING+PROVIDE (__executable_start = ${TEXT_START_ADDR}); . = ${TEXT_BASE_ADDRESS};}}}
-   ${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_TEXT_START_ADDR}${SIZEOF_HEADERS_CODE};}}
-   ${CREATE_PIE+${RELOCATING+PROVIDE (__executable_start = ${SHLIB_TEXT_START_ADDR}); . = ${SHLIB_TEXT_START_ADDR}${SIZEOF_HEADERS_CODE};}}
--
--  /* Place build-id as close to the ELF headers as possible.  This
--     maximises the chance the build-id will be present in core files,
--     which GDB can then use to locate the associated debuginfo file.  */
--  .note.gnu.build-id ${RELOCATING-0}: { *(.note.gnu.build-id) }
- EOF
- }
- 
-@@ -574,7 +557,6 @@ EOF
- align_text()
- {
- cat <<EOF
--  ${RELOCATING+/* Align the text segment.  */}
-   ${RELOCATING+${TEXT_SEGMENT_ALIGN}}
- EOF
- }
-@@ -816,28 +798,11 @@ EOF
-   emit_executable_start
- 
-   if test -z "${ALL_TEXT_BEFORE_RO}"; then
--    # We are allowed to put R/O sections before code sections.
--
-     test -n "${SEPARATE_CODE}" || emit_early_ro
-     test -n "${NON_ALLOC_DYN}${SEPARATE_CODE}" || emit_dyn
--
--    # We only need the alignment if we have emitted some sections.
--    if test -z "${SEPARATE_CODE}"; then
--      align_text
--    elif test -z "${NON_ALLOC_DYN}${SEPARATE_CODE}"; then
--      align_text
--    fi
-   fi
-   
--  # We do not align the code segment here as doing so will increase the file size.
--  # Normally having the text segment at the start of the file will automatically
--  # mean that it is aligned(*), and if we have emitted any r/o sections due to the
--  # tests of SEPARATE_CODE above, then extra alignment will have already been
--  # generated.
--  #
--  # *: Including the ELF headers and .note.gnu.build-id section in the code segment
--  # is a very small theoretical risk.
--
-+  align_text  
-   emit_text
- 
-   align_rodata
-diff -rup binutils.orig/ld/testsuite/ld-i386/pr32191.d binutils-2.43.50-22c62092858/ld/testsuite/ld-i386/pr32191.d
---- binutils.orig/ld/testsuite/ld-i386/pr32191.d	2024-11-01 13:56:39.584115148 +0000
-+++ binutils-2.43.50-22c62092858/ld/testsuite/ld-i386/pr32191.d	2024-11-01 13:58:30.962432716 +0000
-@@ -2,6 +2,7 @@
- #as: --32 -mx86-used-note=yes
- #ld: -shared -m elf_i386 -z separate-code --build-id --rosegment
- #readelf: -lW
-+#xfail: *-*-*
- 
- #...
-  +[0-9]+ +\.note\.gnu\.build-id \.text 
-diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr32191-x32.d binutils-2.43.50-22c62092858/ld/testsuite/ld-x86-64/pr32191-x32.d
---- binutils.orig/ld/testsuite/ld-x86-64/pr32191-x32.d	2024-11-01 13:56:39.652115341 +0000
-+++ binutils-2.43.50-22c62092858/ld/testsuite/ld-x86-64/pr32191-x32.d	2024-11-01 13:59:27.626595088 +0000
-@@ -2,6 +2,7 @@
- #as: --x32 -mx86-used-note=yes
- #ld: -shared -m elf32_x86_64 -z separate-code --build-id --rosegment
- #readelf: -lW
-+#xfail: *-*-*
- 
- #...
-  +[0-9]+ +\.note\.gnu\.build-id \.text 
-diff -rup binutils.orig/ld/testsuite/ld-x86-64/pr32191.d binutils-2.43.50-22c62092858/ld/testsuite/ld-x86-64/pr32191.d
---- binutils.orig/ld/testsuite/ld-x86-64/pr32191.d	2024-11-01 13:56:39.652115341 +0000
-+++ binutils-2.43.50-22c62092858/ld/testsuite/ld-x86-64/pr32191.d	2024-11-01 13:59:12.906552493 +0000
-@@ -2,6 +2,7 @@
- #as: --64 -mx86-used-note=yes
- #ld: -shared -m elf_x86_64 -z separate-code --build-id --rosegment
- #readelf: -lW
-+#xfail: *-*-*
- 
- #...
-  +[0-9]+ +\.note\.gnu\.build-id \.text 
-diff -rup bin.orig/ld/testsuite/ld-elf/pr23658-1e.d binutils-2.43.50-55e32b3c682/ld/testsuite/ld-elf/pr23658-1e.d
---- bin.orig/ld/testsuite/ld-elf/pr23658-1e.d	2024-11-04 12:18:57.021055380 +0000
-+++ binutils-2.43.50-55e32b3c682/ld/testsuite/ld-elf/pr23658-1e.d	2024-11-04 12:19:06.522083958 +0000
-@@ -16,6 +16,7 @@
- #xfail: *-*-hpux*
- #xfail: arc*-* avr-* m68hc1*-* microblaze*-* nds32*-* spu-*-* xstormy16-*-*
- #noxfail: microblaze*-linux*
-+#xfail: *-*-*
- 
- #...
-  +[0-9]+ +\.note.gnu.build-id +

diff --git a/binutils-strchr-fixes.patch b/binutils-strchr-fixes.patch
deleted file mode 100644
index 976643e..0000000
--- a/binutils-strchr-fixes.patch
+++ /dev/null
@@ -1,360 +0,0 @@
---- fred/bfd/elflink.c	2025-12-18 13:16:00.675277329 +0000
-+++ binutils-with-gold-2.45.50-8e992ccb1e4/bfd/elflink.c	2025-12-18 13:31:20.160942245 +0000
-@@ -596,7 +596,7 @@ bfd_elf_link_record_dynamic_symbol (stru
-   if (h->dynindx == -1)
-     {
-       struct elf_strtab_hash *dynstr;
--      char *p;
-+      const char *p;
-       const char *name;
-       size_t indx;
- 
-@@ -726,7 +726,7 @@ bfd_elf_record_link_assignment (bfd *out
-   if (h->versioned == unknown)
-     {
-       /* Set versioned if symbol version is unknown.  */
--      char *version = strrchr (name, ELF_VER_CHR);
-+      const char *version = strrchr (name, ELF_VER_CHR);
-       if (version)
- 	{
- 	  if (version > name && version[-1] != ELF_VER_CHR)
-@@ -1161,7 +1161,7 @@ _bfd_elf_merge_symbol (bfd *abfd,
-   bool newdyn, olddyn, olddef, newdef, newdyncommon, olddyncommon;
-   bool newweak, oldweak, newfunc, oldfunc;
-   const struct elf_backend_data *bed;
--  char *new_version;
-+  const char *new_version;
-   bool default_sym = *matched;
-   struct elf_link_hash_table *htab;
- 
-@@ -1241,7 +1241,7 @@ _bfd_elf_merge_symbol (bfd *abfd,
- 	    {
- 	      /* OLD_VERSION is the symbol version of the existing
- 		 symbol. */
--	      char *old_version;
-+	      const char *old_version;
- 
- 	      if (h->versioned >= versioned)
- 		old_version = strrchr (h->root.root.string,
-diff -rup fred/bfd/bfd.c binutils-with-gold-2.45.50-8e992ccb1e4/bfd/bfd.c
---- fred/bfd/bfd.c	2025-12-18 13:42:14.848482826 +0000
-+++ binutils-with-gold-2.45.50-8e992ccb1e4/bfd/bfd.c	2025-12-18 13:56:21.112280708 +0000
-@@ -1060,7 +1060,7 @@ _bfd_doprnt (bfd_print_callback print, v
-       if (*ptr != '%')
- 	{
- 	  /* While we have regular characters, print them.  */
--	  char *end = strchr (ptr, '%');
-+	  const char *end = strchr (ptr, '%');
- 	  if (end != NULL)
- 	    result = print (stream, "%.*s", (int) (end - ptr), ptr);
- 	  else
-diff -rup fred/bfd/elflink.c binutils-with-gold-2.45.50-8e992ccb1e4/bfd/elflink.c
---- fred/bfd/elflink.c	2025-12-18 13:42:15.062484033 +0000
-+++ binutils-with-gold-2.45.50-8e992ccb1e4/bfd/elflink.c	2025-12-18 13:58:58.202355216 +0000
-@@ -1965,7 +1965,7 @@ _bfd_elf_add_default_symbol (bfd *abfd,
-   bool collect;
-   bool dynamic;
-   bfd *override;
--  char *p;
-+  const char *p;
-   size_t len, shortlen;
-   asection *tmp_sec;
-   bool matched;
-@@ -2657,7 +2657,7 @@ _bfd_elf_link_assign_sym_version (struct
-   struct bfd_link_info *info;
-   const struct elf_backend_data *bed;
-   struct elf_info_failed eif;
--  char *p;
-+  const char *p;
-   bool hide;
- 
-   sinfo = (struct elf_info_failed *) data;
-@@ -5665,7 +5665,7 @@ elf_link_add_object_symbols (bfd *abfd,
- 	      && !dynamic
- 	      && (abfd->flags & BFD_PLUGIN) == 0)
- 	    {
--	      char *p = strchr (name, ELF_VER_CHR);
-+	      const char *p = strchr (name, ELF_VER_CHR);
- 	      if (p != NULL && p[1] != ELF_VER_CHR)
- 		{
- 		  /* Queue non-default versions so that .symver x, x@FOO
-@@ -5915,7 +5915,8 @@ elf_link_add_object_symbols (bfd *abfd,
-       for (cnt = 0; cnt < nondeflt_vers_cnt; ++cnt)
- 	{
- 	  struct elf_link_hash_entry *h = nondeflt_vers[cnt], *hi;
--	  char *shortname, *p;
-+	  char *shortname;
-+	  const char *p;
- 	  size_t amt;
- 
- 	  p = strchr (h->root.root.string, ELF_VER_CHR);
-@@ -6187,7 +6188,8 @@ _bfd_elf_archive_symbol_lookup (bfd *abf
- 				const char *name)
- {
-   struct bfd_link_hash_entry *h;
--  char *p, *copy;
-+  const char *p;
-+  char *copy;
-   size_t len, first;
- 
-   h = bfd_link_hash_lookup (info->hash, name, false, false, true);
-@@ -6482,7 +6484,7 @@ elf_collect_hash_codes (struct elf_link_
-   name = h->root.root.string;
-   if (h->versioned >= versioned)
-     {
--      char *p = strchr (name, ELF_VER_CHR);
-+      const char *p = strchr (name, ELF_VER_CHR);
-       if (p != NULL)
- 	{
- 	  alc = (char *) bfd_malloc (p - name + 1);
-@@ -6556,7 +6558,7 @@ elf_collect_gnu_hash_codes (struct elf_l
-   name = h->root.root.string;
-   if (h->versioned >= versioned)
-     {
--      char *p = strchr (name, ELF_VER_CHR);
-+      const char *p = strchr (name, ELF_VER_CHR);
-       if (p != NULL)
- 	{
- 	  alc = (char *) bfd_malloc (p - name + 1);
-@@ -10373,8 +10375,8 @@ elf_link_output_symstrtab (void *finf,
- 	    {
- 	      /* Keep only one '@' for versioned symbols defined in
- 	         shared objects.  */
--	      char *version = strrchr (name, ELF_VER_CHR);
--	      char *base_end = strchr (name, ELF_VER_CHR);
-+	      const char *version = strrchr (name, ELF_VER_CHR);
-+	      const char *base_end = strchr (name, ELF_VER_CHR);
- 	      if (version != base_end)
- 		{
- 		  size_t base_len;
-@@ -11117,7 +11119,7 @@ elf_link_output_extsym (struct bfd_hash_
- 	      || h->ref_dynamic
- 	      || !h->def_regular))
- 	{
--	  char *p = strrchr (h->root.root.string, ELF_VER_CHR);
-+	  const char *p = strrchr (h->root.root.string, ELF_VER_CHR);
- 
- 	  if (p && p [1] != '\0')
- 	    {
-diff -rup fred/bfd/targets.c binutils-with-gold-2.45.50-8e992ccb1e4/bfd/targets.c
---- fred/bfd/targets.c	2025-12-18 13:42:15.038483898 +0000
-+++ binutils-with-gold-2.45.50-8e992ccb1e4/bfd/targets.c	2025-12-18 13:56:48.120465447 +0000
-@@ -1664,7 +1664,7 @@ bfd_get_target_info (const char *target_
- 
-       if (arches && tname)
- 	{
--	  char *hyp = strchr (tname, '-');
-+	  const char *hyp = strchr (tname, '-');
- 
- 	  if (hyp != NULL)
- 	    {
-diff -rup fred/binutils/addr2line.c binutils-with-gold-2.45.50-8e992ccb1e4/binutils/addr2line.c
---- fred/binutils/addr2line.c	2025-12-18 13:42:17.309496707 +0000
-+++ binutils-with-gold-2.45.50-8e992ccb1e4/binutils/addr2line.c	2025-12-18 13:59:57.785762778 +0000
-@@ -385,7 +385,7 @@ translate_addresses (bfd *abfd, asection
- 
-               if (base_names && filename != NULL)
-                 {
--                  char *h;
-+                  const char *h;
- 
-                   h = strrchr (filename, '/');
-                   if (h != NULL)
-diff -rup fred/binutils/nm.c binutils-with-gold-2.45.50-8e992ccb1e4/binutils/nm.c
---- fred/binutils/nm.c	2025-12-18 13:42:17.107495568 +0000
-+++ binutils-with-gold-2.45.50-8e992ccb1e4/binutils/nm.c	2025-12-18 14:00:12.481863299 +0000
-@@ -686,7 +686,7 @@ print_symname (const char *form, struct
-   if (!with_symbol_versions
-       && bfd_get_flavour (abfd) == bfd_target_elf_flavour)
-     {
--      char *atver = strchr (name, '@');
-+      const char *atver = strchr (name, '@');
- 
-       if (atver)
- 	{
-diff -rup fred/binutils/prdbg.c binutils-with-gold-2.45.50-8e992ccb1e4/binutils/prdbg.c
---- fred/binutils/prdbg.c	2025-12-18 13:42:17.301496662 +0000
-+++ binutils-with-gold-2.45.50-8e992ccb1e4/binutils/prdbg.c	2025-12-18 13:59:36.386616403 +0000
-@@ -2641,7 +2641,7 @@ tg_start_function (void *p, const char *
-   info->stack->method = NULL;
-   if (dname != NULL)
-     {
--      char *sep;
-+      const char *sep;
-       sep = strstr (dname, "::");
-       if (sep)
- 	{
-diff -rup fred/gprof/source.c binutils-with-gold-2.45.50-8e992ccb1e4/gprof/source.c
---- fred/gprof/source.c	2025-12-18 13:42:17.459497553 +0000
-+++ binutils-with-gold-2.45.50-8e992ccb1e4/gprof/source.c	2025-12-18 14:00:40.554055311 +0000
-@@ -98,7 +98,8 @@ annotate_source (Source_File *sf, unsign
-   bool new_line;
-   char buf[8192];
-   char *fname;
--  char *annotation, *name_only;
-+  char *annotation;
-+  const char *name_only;
-   FILE *ifp, *ofp;
-   Search_List_Elem *sle = src_search_list.head;
- 
-diff -rup fred/ld/emultempl/pe.em binutils-with-gold-2.45.50-8e992ccb1e4/ld/emultempl/pe.em
---- fred/ld/emultempl/pe.em	2025-12-18 13:42:17.632498529 +0000
-+++ binutils-with-gold-2.45.50-8e992ccb1e4/ld/emultempl/pe.em	2025-12-18 14:03:21.043153069 +0000
-@@ -1149,7 +1149,7 @@ pe_fixup_stdcalls (void)
-     if (undef->type == bfd_link_hash_undefined)
-       {
- 	const char * name = undef->root.string;
--	char * at;
-+	const char * at;
- 	int lead_at = (*name == '@');
- 
- 	if (lead_at)
-@@ -1750,7 +1750,7 @@ gld${EMULATION_NAME}_after_open (void)
-       {
- 	if (is->the_bfd->my_archive)
- 	  {
--	    char *pnt;
-+	    const char *pnt;
- 
- 	    /* Microsoft import libraries may contain archive members for
- 	       one or more DLLs, together with static object files.
-@@ -2146,7 +2146,7 @@ gld${EMULATION_NAME}_place_orphan (asect
- 				   int constraint)
- {
-   const char *orig_secname = secname;
--  char *dollar = NULL;
-+  const char *dollar = NULL;
-   lang_output_section_statement_type *os;
-   lang_statement_list_type add_child;
-   lang_output_section_statement_type *match_by_name = NULL;
-diff -rup fred/ld/emultempl/pep.em binutils-with-gold-2.45.50-8e992ccb1e4/ld/emultempl/pep.em
---- fred/ld/emultempl/pep.em	2025-12-18 13:42:17.635498546 +0000
-+++ binutils-with-gold-2.45.50-8e992ccb1e4/ld/emultempl/pep.em	2025-12-18 14:03:30.187215617 +0000
-@@ -1089,7 +1089,7 @@ pep_fixup_stdcalls (void)
-   for (undef = link_info.hash->undefs; undef; undef=undef->u.undef.next)
-     if (undef->type == bfd_link_hash_undefined)
-       {
--	char* at = strchr (undef->root.string, '@');
-+	const char* at = strchr (undef->root.string, '@');
- 	int lead_at = (*undef->root.string == '@');
- 	if (lead_at)
- 	  at = strchr (undef->root.string + 1, '@');
-@@ -1737,7 +1737,7 @@ gld${EMULATION_NAME}_after_open (void)
-       {
- 	if (is->the_bfd->my_archive)
- 	  {
--	    char *pnt;
-+	    const char *pnt;
- 
- 	    /* Microsoft import libraries may contain archive members for
- 	       one or more DLLs, together with static object files.
-@@ -1986,7 +1986,7 @@ gld${EMULATION_NAME}_place_orphan (asect
- 				    int constraint)
- {
-   const char *orig_secname = secname;
--  char *dollar = NULL;
-+  const char *dollar = NULL;
-   lang_output_section_statement_type *os;
-   lang_statement_list_type add_child;
-   lang_output_section_statement_type *match_by_name = NULL;
-diff -rup fred/ld/ldelf.c binutils-with-gold-2.45.50-8e992ccb1e4/ld/ldelf.c
---- fred/ld/ldelf.c	2025-12-18 13:42:17.598498337 +0000
-+++ binutils-with-gold-2.45.50-8e992ccb1e4/ld/ldelf.c	2025-12-18 14:04:08.331476531 +0000
-@@ -794,7 +794,7 @@ ldelf_parse_ld_so_conf_include (struct l
- 
-   if (pattern[0] != '/')
-     {
--      char *p = strrchr (filename, '/');
-+      const char *p = strrchr (filename, '/');
-       size_t patlen = strlen (pattern) + 1;
- 
-       newp = xmalloc (p - filename + 1 + patlen);
-diff -rup fred/ld/ldlang.c binutils-with-gold-2.45.50-8e992ccb1e4/ld/ldlang.c
---- fred/ld/ldlang.c	2025-12-18 13:42:17.601498354 +0000
-+++ binutils-with-gold-2.45.50-8e992ccb1e4/ld/ldlang.c	2025-12-18 14:00:59.914187740 +0000
-@@ -338,7 +338,7 @@ stat_ldirname (const char *name)
- static char *
- archive_path (const char *pattern)
- {
--  char *p = NULL;
-+  const char *p = NULL;
- 
-   if (link_info.path_separator == 0)
-     return p;
---- fred/bfd/targets.c	2025-12-18 14:08:06.859108084 +0000
-+++ binutils-with-gold-2.45.50-8e992ccb1e4/bfd/targets.c	2025-12-18 14:10:18.726010065 +0000
-@@ -1675,11 +1675,12 @@ bfd_get_target_info (const char *target_
- 	      if (!_bfd_find_arch_match (tname, arches, def_target_arch))
- 		{
- 		  char new_tname[50];
-+		  char * p;
- 
- 		  strcpy (new_tname, hyp);
--		  while ((hyp = strrchr (new_tname, '-')) != NULL)
-+		  while ((p = strrchr (new_tname, '-')) != NULL)
- 		    {
--		      *hyp = 0;
-+		      *p = 0;
- 		      if (_bfd_find_arch_match (new_tname, arches,
- 						def_target_arch))
- 			break;
---- fred/binutils/prdbg.c	2025-12-18 14:56:04.149155693 +0000
-+++ binutils-with-gold-2.45.50-8e992ccb1e4/binutils/prdbg.c	2025-12-18 14:56:38.583341964 +0000
-@@ -2641,24 +2641,26 @@ tg_start_function (void *p, const char *
-   info->stack->method = NULL;
-   if (dname != NULL)
-     {
--      const char *sep;
-+      char *sep;
-+      char *n;
-       sep = strstr (dname, "::");
-       if (sep)
- 	{
- 	  info->stack->method = dname;
- 	  dname = NULL;
- 	  *sep = 0;
--	  name = sep + 2;
-+	  n = sep + 2;
- 	}
-       else
- 	{
- 	  info->stack->method = xstrdup ("");
--	  name = dname;
-+	  n = dname;
- 	}
--      sep = strchr (name, '(');
-+      sep = strchr (n, '(');
-       if (sep)
- 	*sep = 0;
-       /* Obscure functions as type_info function.  */
-+      name = n;
-     }
- 
-   free (info->stack->parents);
---- fred/ld/emultempl/pep.em	2025-12-18 15:04:44.143968641 +0000
-+++ binutils-with-gold-2.45.50-8e992ccb1e4/ld/emultempl/pep.em	2025-12-18 15:06:39.787550440 +0000
-@@ -1101,9 +1101,10 @@ pep_fixup_stdcalls (void)
- 
- 	    if (lead_at)
- 	      *cname = '_';
--	    at = strchr (cname, '@');
--	    if (at)
--	      *at = 0;
-+	    char * c;
-+	    c = strchr (cname, '@');
-+	    if (c)
-+	      *c = 0;
- 	    sym = bfd_link_hash_lookup (link_info.hash, cname, 0, 0, 1);
- 
- 	    if (sym && sym->type == bfd_link_hash_defined)
---- fred/ld/ldelf.c	2025-12-18 15:24:43.775771267 +0000
-+++ binutils-with-gold-2.45.50-8e992ccb1e4/ld/ldelf.c	2025-12-18 15:25:32.150970709 +0000
-@@ -535,7 +535,7 @@ ldelf_search_needed (const char *path, s
- 			}
- 
- 		      replacement = freeme;
--		      if ((slash = strrchr (replacement, '/')) != NULL)
-+		      if ((slash = strrchr (freeme, '/')) != NULL)
- 			* slash = 0;
- 		    }
- 		}

diff --git a/binutils-strip-plugin-fix.patch b/binutils-strip-plugin-fix.patch
deleted file mode 100644
index 9caa4a8..0000000
--- a/binutils-strip-plugin-fix.patch
+++ /dev/null
@@ -1,537 +0,0 @@
-From a0d3507d10755c2ccaed3204db22c21308bfc4d6 Mon Sep 17 00:00:00 2001
-From: "H.J. Lu" <hjl.tools@gmail.com>
-Date: Tue, 22 Jul 2025 14:09:48 -0700
-Subject: [PATCH] strip: Properly handle LLVM IR bitcode
-
-commit 717a38e9a02109fcbcb18bb2ec3aa251e2ad0a0d
-Author: H.J. Lu <hjl.tools@gmail.com>
-Date:   Sun May 4 05:12:46 2025 +0800
-
-    strip: Add GCC LTO IR support
-
-added "-R .gnu.lto_.*" to strip to remove all GCC LTO sections.  When
-"-R .gnu.lto_.*" is used, the plugin target is ignored so that all LTO
-sections are stripped as the regular sections.  It works for the slim
-GCC LTO IR since the GCC LTO IR is stored in the regular sections.  When
-the plugin target is ignored, the GCC LTO IR can be recognized as the
-normal object files.  But it doesn't work for the slim LLVM IR which
-is stored in a standalone file.
-
-1. Add bfd_check_format_matches_lto and bfd_check_format_lto to take an
-argument, lto_sections_removed, to indicate if all LTO sections should
-be removed.
-2. Update strip to always enable the plugin target so that the plugin
-target is enabled when checking for bfd_archive.
-3. Update strip to ignore the plugin target for bfd_object when all LTO
-sections should be removed.  If the object is unknown, copy it as an
-unknown file without any messages.
-4. Treat the "-R .llvm.lto" strip option as removing all LTO sections.
-
-bfd/
-
-	PR binutils/33198
-	* format.c (bfd_check_format_lto): New function.
-	(bfd_check_format): Call bfd_check_format_matches_lto.
-	(bfd_check_format_matches): Renamed to ...
-	(bfd_check_format_matches_lto): This.  Add an argument,
-	lto_sections_removed, to indicate if all LTO sections should be
-	removed and don't match the plugin target if lto_sections_removed
-	is true.
-	(bfd_check_format_matches): Call bfd_check_format_matches_lto.
-	* bfd-in2.h: Regenerated.
-
-binutils/
-
-	PR binutils/33198
-	* objcopy.c (copy_archive): Call bfd_check_format_lto, instead
-	of bfd_check_format, and pass lto_sections_removed.  Remove the
-	non-fatal message on unknown element since it will be copied as
-	an unknown file.
-	(copy_file): Don't check lto_sections_removed when enabling LTO
-	plugin in strip.
-	(copy_file): Ignore the plugin target first if all LTO sections
-	should be removed.  Try with the plugin target next if ignoring
-	the plugin target failed to match the format.
-	(strip_main): Also set lto_sections_removed for -R .llvm.lto.
-	* testsuite/binutils-all/x86-64/pr33198.c: New file.
-	* testsuite/binutils-all/x86-64/x86-64.exp (run_pr33198_test):
-	New.
-	Run binutils/33198 tests.
-	* testsuite/lib/binutils-common.exp (llvm_plug_opt): New.
-	(CLANG_FOR_TARGET): New.  Set to "clang" for native build if
-	"clang -v" reports "clang version".
-
-Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
-(cherry picked from commit f752be8f916efa70aea9c2e4f664c75690fd136c)
----
- bfd/bfd-in2.h                                 |   7 +
- bfd/format.c                                  |  84 ++++++++--
- binutils/objcopy.c                            |  40 +++--
- .../testsuite/binutils-all/x86-64/pr33198.c   |   4 +
- .../testsuite/binutils-all/x86-64/x86-64.exp  | 158 ++++++++++++++++++
- binutils/testsuite/lib/binutils-common.exp    |  27 +++
- 6 files changed, 299 insertions(+), 21 deletions(-)
- create mode 100644 binutils/testsuite/binutils-all/x86-64/pr33198.c
-
-diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
-index b013ef954da..2ff3e930bfa 100644
---- a/bfd/bfd-in2.h
-+++ b/bfd/bfd-in2.h
-@@ -2903,8 +2903,15 @@ bool generic_core_file_matches_executable_p
-    (bfd *core_bfd, bfd *exec_bfd);
- 
- /* Extracted from format.c.  */
-+bool bfd_check_format_lto (bfd *abfd, bfd_format format,
-+    bool lto_sections_removed);
-+
- bool bfd_check_format (bfd *abfd, bfd_format format);
- 
-+bool bfd_check_format_matches_lto
-+   (bfd *abfd, bfd_format format, char ***matching,
-+    bool lto_sections_removed);
-+
- bool bfd_check_format_matches
-    (bfd *abfd, bfd_format format, char ***matching);
- 
-diff --git a/bfd/format.c b/bfd/format.c
-index a909b70fe81..f3a0774af08 100644
---- a/bfd/format.c
-+++ b/bfd/format.c
-@@ -56,16 +56,19 @@ extern const size_t _bfd_target_vector_entries;
- 
- /*
- FUNCTION
--	bfd_check_format
-+	bfd_check_format_lto
- 
- SYNOPSIS
--	bool bfd_check_format (bfd *abfd, bfd_format format);
-+	bool bfd_check_format_lto (bfd *abfd, bfd_format format,
-+				   bool lto_sections_removed);
- 
- DESCRIPTION
- 	Verify if the file attached to the BFD @var{abfd} is compatible
- 	with the format @var{format} (i.e., one of <<bfd_object>>,
- 	<<bfd_archive>> or <<bfd_core>>).
- 
-+	If LTO_SECTION_REMOVED is true, ignore plugin target.
-+
- 	If the BFD has been set to a specific target before the
- 	call, only the named target and format combination is
- 	checked. If the target has not been set, or has been set to
-@@ -99,10 +102,31 @@ DESCRIPTION
- 	itself.
- */
- 
-+bool
-+bfd_check_format_lto (bfd *abfd, bfd_format format,
-+		      bool lto_sections_removed)
-+{
-+  return bfd_check_format_matches_lto (abfd, format, NULL,
-+				       lto_sections_removed);
-+}
-+
-+
-+/*
-+FUNCTION
-+	bfd_check_format
-+
-+SYNOPSIS
-+	bool bfd_check_format (bfd *abfd, bfd_format format);
-+
-+DESCRIPTION
-+	Similar to bfd_check_format_plugin, except plugin target isn't
-+	ignored.
-+*/
-+
- bool
- bfd_check_format (bfd *abfd, bfd_format format)
- {
--  return bfd_check_format_matches (abfd, format, NULL);
-+  return bfd_check_format_matches_lto (abfd, format, NULL, false);
- }
- 
- struct bfd_preserve
-@@ -407,11 +431,12 @@ bfd_set_lto_type (bfd *abfd ATTRIBUTE_UNUSED)
- 
- /*
- FUNCTION
--	bfd_check_format_matches
-+	bfd_check_format_matches_lto
- 
- SYNOPSIS
--	bool bfd_check_format_matches
--	  (bfd *abfd, bfd_format format, char ***matching);
-+	bool bfd_check_format_matches_lto
-+	  (bfd *abfd, bfd_format format, char ***matching,
-+	   bool lto_sections_removed);
- 
- DESCRIPTION
- 	Like <<bfd_check_format>>, except when it returns FALSE with
-@@ -423,10 +448,14 @@ DESCRIPTION
- 
- 	When done with the list that @var{matching} points to, the caller
- 	should free it.
-+
-+	If LTO_SECTION_REMOVED is true, ignore plugin target.
- */
- 
- bool
--bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching)
-+bfd_check_format_matches_lto (bfd *abfd, bfd_format format,
-+			      char ***matching,
-+			      bool lto_sections_removed ATTRIBUTE_UNUSED)
- {
-   extern const bfd_target binary_vec;
-   const bfd_target * const *target;
-@@ -495,8 +524,13 @@ bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching)
-   if (!bfd_preserve_save (abfd, &preserve, NULL))
-     goto err_ret;
- 
--  /* If the target type was explicitly specified, just check that target.  */
--  if (!abfd->target_defaulted)
-+  /* If the target type was explicitly specified, just check that target.
-+     If LTO_SECTION_REMOVED is true, don't match the plugin target.  */
-+  if (!abfd->target_defaulted
-+#if BFD_SUPPORTS_PLUGINS
-+      && (!lto_sections_removed || !bfd_plugin_target_p (abfd->xvec))
-+#endif
-+     )
-     {
-       if (bfd_seek (abfd, 0, SEEK_SET) != 0)	/* rewind! */
- 	goto err_ret;
-@@ -540,10 +574,12 @@ bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching)
- 	 searching.  Don't match the plugin target if we have another
- 	 alternative since we want to properly set the input format
- 	 before allowing a plugin to claim the file.  Also, don't
--	 check the default target twice.  */
-+	 check the default target twice.   If LTO_SECTION_REMOVED is
-+	 true, don't match the plugin target.  */
-       if (*target == &binary_vec
- #if BFD_SUPPORTS_PLUGINS
--	  || (match_count != 0 && bfd_plugin_target_p (*target))
-+	  || ((lto_sections_removed || match_count != 0)
-+	      && bfd_plugin_target_p (*target))
- #endif
- 	  || (!abfd->target_defaulted && *target == save_targ))
- 	continue;
-@@ -795,6 +831,32 @@ bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching)
-   return false;
- }
- 
-+/*
-+FUNCTION
-+	bfd_check_format_matches
-+
-+SYNOPSIS
-+	bool bfd_check_format_matches
-+	  (bfd *abfd, bfd_format format, char ***matching);
-+
-+DESCRIPTION
-+	Like <<bfd_check_format>>, except when it returns FALSE with
-+	<<bfd_errno>> set to <<bfd_error_file_ambiguously_recognized>>.  In that
-+	case, if @var{matching} is not NULL, it will be filled in with
-+	a NULL-terminated list of the names of the formats that matched,
-+	allocated with <<malloc>>.
-+	Then the user may choose a format and try again.
-+
-+	When done with the list that @var{matching} points to, the caller
-+	should free it.
-+*/
-+
-+bool
-+bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching)
-+{
-+  return bfd_check_format_matches_lto (abfd, format, matching, false);
-+}
-+
- /*
- FUNCTION
- 	bfd_set_format
-diff --git a/binutils/objcopy.c b/binutils/objcopy.c
-index 8c9077356f1..038f6555c0b 100644
---- a/binutils/objcopy.c
-+++ b/binutils/objcopy.c
-@@ -3748,10 +3748,13 @@ copy_archive (bfd *ibfd, bfd *obfd, const char *output_target,
-       l->obfd = NULL;
-       list = l;
- 
-+#if BFD_SUPPORTS_PLUGINS
-+      /* Ignore plugin target if all LTO sections should be removed.  */
-+      ok_object = bfd_check_format_lto (this_element, bfd_object,
-+					lto_sections_removed);
-+#else
-       ok_object = bfd_check_format (this_element, bfd_object);
--      if (!ok_object)
--	bfd_nonfatal_message (NULL, this_element, NULL,
--			      _("Unable to recognise the format of file"));
-+#endif
- 
-       /* PR binutils/3110: Cope with archives
- 	 containing multiple target types.  */
-@@ -3887,9 +3890,8 @@ copy_file (const char *input_filename, const char *output_filename, int ofd,
-     }
- 
- #if BFD_SUPPORTS_PLUGINS
--  /* Enable LTO plugin in strip unless all LTO sections should be
--     removed.  */
--  if (is_strip && !target && !lto_sections_removed)
-+  /* Enable LTO plugin in strip.  */
-+  if (is_strip && !target)
-     target = "plugin";
- #endif
- 
-@@ -3987,7 +3989,21 @@ copy_file (const char *input_filename, const char *output_filename, int ofd,
- 			 input_arch))
- 	status = 1;
-     }
--  else if (bfd_check_format_matches (ibfd, bfd_object, &obj_matching))
-+  else if (
-+#if BFD_SUPPORTS_PLUGINS
-+	   /* Ignore plugin target first if all LTO sections should be
-+	      removed.  Try with plugin target next if ignoring plugin
-+	      target fails to match the format.  */
-+	   bfd_check_format_matches_lto (ibfd, bfd_object, &obj_matching,
-+					 lto_sections_removed)
-+	   || (lto_sections_removed
-+	       && bfd_check_format_matches_lto (ibfd, bfd_object,
-+						&obj_matching, false))
-+#else
-+	   bfd_check_format_matches_lto (ibfd, bfd_object, &obj_matching,
-+					 false)
-+#endif
-+	   )
-     {
-       bfd *obfd;
-     do_copy:
-@@ -5043,9 +5059,13 @@ strip_main (int argc, char *argv[])
- #if BFD_SUPPORTS_PLUGINS
-   /* Check if all GCC LTO sections should be removed, assuming all LTO
-      sections will be removed with -R .gnu.lto_.*.  * Remove .gnu.lto_.*
--     sections will also remove .gnu.debuglto_.  sections.  */
--  lto_sections_removed = !!find_section_list (".gnu.lto_.*", false,
--					      SECTION_CONTEXT_REMOVE);
-+     sections will also remove .gnu.debuglto_.  sections.  LLVM IR
-+     bitcode is stored in .llvm.lto section which will be removed with
-+     -R .llvm.lto.  */
-+  lto_sections_removed = (!!find_section_list (".gnu.lto_.*", false,
-+					       SECTION_CONTEXT_REMOVE)
-+			  || !!find_section_list (".llvm.lto", false,
-+					       SECTION_CONTEXT_REMOVE));
- #endif
- 
-   i = optind;
-diff --git a/binutils/testsuite/binutils-all/x86-64/pr33198.c b/binutils/testsuite/binutils-all/x86-64/pr33198.c
-new file mode 100644
-index 00000000000..cd0130cacdf
---- /dev/null
-+++ b/binutils/testsuite/binutils-all/x86-64/pr33198.c
-@@ -0,0 +1,4 @@
-+void
-+foo (void)
-+{
-+}
-diff --git a/binutils/testsuite/binutils-all/x86-64/x86-64.exp b/binutils/testsuite/binutils-all/x86-64/x86-64.exp
-index 05c73047b60..ab1aa50a9a1 100644
---- a/binutils/testsuite/binutils-all/x86-64/x86-64.exp
-+++ b/binutils/testsuite/binutils-all/x86-64/x86-64.exp
-@@ -96,3 +96,161 @@ if {[catch "system \"bzip2 -dc $t > $tempfile\""] != 0} {
- 	}
-     }
- }
-+
-+proc run_pr33198_test { fat strip_flags } {
-+    global srcdir
-+    global subdir
-+    global llvm_plug_opt
-+    global AR
-+    global CLANG_FOR_TARGET
-+    global NM
-+    global READELF
-+    global STRIP
-+
-+    set test pr33198
-+    set testname "${test}${fat} with $strip_flags"
-+
-+    if { [istarget "x86_64-*-linux*-gnux32"] \
-+	 || ![info exists CLANG_FOR_TARGET]
-+	 || [string match "" $llvm_plug_opt] } then {
-+	untested $testname
-+	return
-+    }
-+
-+    set src $srcdir/$subdir/${test}.c
-+    set obj tmpdir/${test}${fat}.o
-+    set archive tmpdir/${test}${fat}.a
-+    set CLANG_CFLAGS "-c -O2 -flto"
-+    if { "$fat" == "-fat" } {
-+	append CLANG_CFLAGS " -ffat-lto-objects"
-+    }
-+
-+    append strip_flags " --strip-unneeded $llvm_plug_opt"
-+
-+    set cmd "$CLANG_FOR_TARGET $CLANG_CFLAGS -o $obj $src"
-+    send_log "$cmd\n"
-+    verbose "$cmd" 1
-+    catch "exec $cmd" got
-+    if ![string match "" $got] then {
-+	send_log "$got\n"
-+	verbose "$got" 1
-+	fail "$testname ($obj)"
-+	return
-+    }
-+
-+    set cmd "$NM $llvm_plug_opt $obj\n"
-+    send_log "$cmd\n"
-+    verbose "$cmd" 1
-+    catch "exec $cmd" got
-+    if ![regexp "0+ T foo" $got] then {
-+	send_log "$got\n"
-+	verbose "$got" 1
-+	fail "$testname ($obj)"
-+	return
-+    }
-+
-+    pass "$testname ($obj)"
-+
-+    set cmd "$STRIP $strip_flags $obj -o ${obj}.strip"
-+    send_log "$cmd\n"
-+    verbose "$cmd" 1
-+    catch "exec $cmd" got
-+    if ![string match "" $got] then {
-+	send_log "$got\n"
-+	verbose "$got" 1
-+	fail "$testname (strip $obj)"
-+	return
-+    }
-+
-+    set cmd "$NM $llvm_plug_opt ${obj}.strip"
-+    send_log "$cmd\n"
-+    verbose "$cmd" 1
-+    catch "exec $cmd" got
-+    if ![regexp "0+ T foo" $got] then {
-+	send_log "$got\n"
-+	verbose "$got" 1
-+	fail "$testname (strip $obj)"
-+	return
-+    }
-+
-+    if { "$fat" == "-fat" } {
-+	set cmd "$READELF -SW ${obj}.strip"
-+	send_log "$cmd\n"
-+	verbose "$cmd" 1
-+	catch "exec $cmd" got
-+	if [regexp "\.llvm\.lto *LLVM_LTO *" $got] then {
-+	    send_log "$got\n"
-+	    verbose "$got" 1
-+	    fail "$testname (strip $obj)"
-+	    return
-+	}
-+    }
-+
-+    pass "$testname (strip $obj)"
-+
-+    set cmd "$AR $llvm_plug_opt -s -r -c $archive $obj"
-+    send_log "$cmd\n"
-+    verbose "$cmd" 1
-+    catch "exec $cmd" got
-+    if ![string match "" $got] then {
-+	send_log "$got\n"
-+	verbose "$got" 1
-+	fail "$testname ($archive)"
-+	return
-+    }
-+
-+    set cmd "$NM $llvm_plug_opt $archive\n"
-+    send_log "$cmd\n"
-+    verbose "$cmd" 1
-+    catch "exec $cmd" got
-+    if ![regexp "0+ T foo" $got] then {
-+	send_log "$got\n"
-+	verbose "$got" 1
-+	fail "$testname ($archive)"
-+	return
-+    }
-+
-+    pass "$testname ($archive)"
-+
-+    set cmd "$STRIP $strip_flags $archive -o ${archive}.strip"
-+    send_log "$cmd\n"
-+    verbose "$cmd" 1
-+    catch "exec $cmd" got
-+    if ![string match "" $got] then {
-+	send_log "$got\n"
-+	verbose "$got" 1
-+	fail "$testname (strip $archive)"
-+	return
-+    }
-+
-+    set cmd "$NM $llvm_plug_opt ${archive}.strip"
-+    send_log "$cmd\n"
-+    verbose "$cmd" 1
-+    catch "exec $cmd" got
-+    if ![regexp "0+ T foo" $got] then {
-+	send_log "$got\n"
-+	verbose "$got" 1
-+	fail "$testname (strip $archive)"
-+	return
-+    }
-+
-+    if { "$fat" == "-fat" } {
-+	set cmd "$READELF -SW ${archive}.strip"
-+	send_log "$cmd\n"
-+	verbose "$cmd" 1
-+	catch "exec $cmd" got
-+	if [regexp "\.llvm\.lto *LLVM_LTO *" $got] then {
-+	    send_log "$got\n"
-+	    verbose "$got" 1
-+	    fail "$testname (strip $archive)"
-+	    return
-+	}
-+    }
-+
-+    pass "$testname (strip $archive)"
-+}
-+
-+run_pr33198_test "" "-R .gnu.lto_* -R .gnu.debuglto_* -R .llvm.lto -N __gnu_lto_v1"
-+run_pr33198_test "-fat" "-R .gnu.lto_* -R .gnu.debuglto_* -R .llvm.lto -N __gnu_lto_v1"
-+run_pr33198_test "" "-R .llvm.lto"
-+run_pr33198_test "-fat" "-R .llvm.lto"
-diff --git a/binutils/testsuite/lib/binutils-common.exp b/binutils/testsuite/lib/binutils-common.exp
-index 2da7138e211..ec246f45257 100644
---- a/binutils/testsuite/lib/binutils-common.exp
-+++ b/binutils/testsuite/lib/binutils-common.exp
-@@ -1813,3 +1813,30 @@ proc get_standard_section_names {} {
-     }
-     return
- }
-+
-+set llvm_plug_opt ""
-+if { [isnative] } then {
-+    if ![info exists CLANG_FOR_TARGET] then {
-+	catch "exec clang -v" got
-+	if [regexp "clang version" $got] then {
-+	    set CLANG_FOR_TARGET clang
-+	}
-+    }
-+    if [info exists CLANG_FOR_TARGET] then {
-+	set llvm_plug_so [string trim [exec $CLANG_FOR_TARGET -print-file-name=LLVMgold.so]]
-+	if { $llvm_plug_so ne "LLVMgold.so" } then {
-+	    set llvm_plug_opt "--plugin $llvm_plug_so"
-+	}
-+
-+	if { $llvm_plug_opt eq "" } then {
-+	    # If it is still blank, try llvm-config --libdir.  Clang
-+	    # searches CLANG_INSTALL_LIBDIR_BASENAME which corresponds
-+	    # to this.
-+	    catch "exec llvm-config --libdir" got
-+	    if {[file isdirectory $got] \
-+		&& [file isfile $got/LLVMgold.so]} then {
-+		set llvm_plug_opt "--plugin $got/LLVMgold.so"
-+	    }
-+	}
-+    }
-+}
--- 
-2.50.1
-

                 reply	other threads:[~2026-08-12 10:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178653014049.1.260353372323368620.rpms-binutils-40bef170ce8b@fedoraproject.org \
    --to=nickc@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox