Compare commits

..

13 commits

Author SHA1 Message Date
Nick Clifton
b9a988f535 Stop a potential call to abort when display the debug information of a corrupt input file. (#2404504) 2025-11-03 13:35:21 +00:00
Nick Clifton
31c06ef9b7 Stop a potential illegal memory access when linking a corrupt input file. (#2404553) 2025-11-03 12:21:45 +00:00
Nick Clifton
4c86b7c1ff Stop a potential illegal memory access when linking a corrupt input file. (#2402842) 2025-10-13 11:43:09 +01:00
Nick Clifton
e76eaf1165 Stop a potential illegal memory access when linking a corrupt input file. (#2402839) 2025-10-10 13:10:32 +01:00
Nick Clifton
b04ce7a1de Stop a potential illegal memory access when linking a corrupt input file. (#2400342) 2025-10-03 13:25:34 +01:00
Nick Clifton
606bfc8184 Stop a potential illegal memory access when linking a corrupt input file. (#2400304) 2025-10-02 16:04:12 +01:00
Nick Clifton
a5facb20e5 Stop a potential null pointer dereference when examining corrupt DWARF debug information. (#2383860) (#2383873) 2025-07-29 15:09:36 +01:00
Nick Clifton
0cabb537f3 Stop a potential null pointer dereference when generating sframe information. (#1282126) 2025-07-21 12:59:09 +01:00
Nick Clifton
33c91b6c27 Stop excessive memory allocation when copying corrupt files. (#2379837)
Stop illegal memory access when parsing corrupt files.  (#2379844)
2025-07-14 14:54:47 +01:00
Nick Clifton
09de9a498e Renumber patches 2025-03-03 09:22:16 +00:00
Nick Clifton
fa76fd3465 Fix seg fault in AArch64 linker when building u-boot. (#2326190) 2025-02-07 14:52:27 +00:00
Nick Clifton
4460e7482c Default gcs-report-dynamic to NONE for Fedora. 2025-02-07 12:58:04 +00:00
Siddhesh Poyarekar
a3d25f1d56 Disable gcs-report-dynamic warnings
The gcs-report-dynamic warnings have been failing builds in Fedora so
default to disabled for now.
2025-02-06 12:11:03 -05:00
24 changed files with 1416 additions and 738 deletions

4
.gitignore vendored
View file

@ -64,7 +64,3 @@ stamp-*
/gmp*
/isl*
/binutils-2.19.50.0.1-output-format.sed
/binutils-2.44.50-13.fc43.src.rpm
/binutils-with-gold-2.45.50-be970c68891.tar.gz
/binutils-with-gold-2.45.50-ba5838a98fb.tar.gz
/binutils-2.47.50-1.fc46.src.rpm

View file

@ -0,0 +1,42 @@
From ea1a0737c7692737a644af0486b71e4a392cbca8 Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Mon, 22 Sep 2025 15:20:34 +0800
Subject: [PATCH] elf: Don't read beyond .eh_frame section size
PR ld/33464
* elf-eh-frame.c (_bfd_elf_parse_eh_frame): Don't read beyond
.eh_frame section size.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
---
bfd/elf-eh-frame.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff -rup binutils-with-gold-2.44.orig/bfd/elf-eh-frame.c binutils-with-gold-2.44/bfd/elf-eh-frame.c
--- binutils-with-gold-2.44.orig/bfd/elf-eh-frame.c 2025-10-03 12:07:22.905327392 +0100
+++ binutils-with-gold-2.44/bfd/elf-eh-frame.c 2025-10-03 12:08:02.201129572 +0100
@@ -735,6 +735,7 @@ _bfd_elf_parse_eh_frame (bfd *abfd, stru
if (hdr_id == 0)
{
unsigned int initial_insn_length;
+ char *null_byte;
/* CIE */
this_inf->cie = 1;
@@ -751,10 +752,13 @@ _bfd_elf_parse_eh_frame (bfd *abfd, stru
REQUIRE (cie->version == 1
|| cie->version == 3
|| cie->version == 4);
- REQUIRE (strlen ((char *) buf) < sizeof (cie->augmentation));
+ null_byte = memchr ((char *) buf, 0, end - buf);
+ REQUIRE (null_byte != NULL);
+ REQUIRE ((size_t) (null_byte - (char *) buf)
+ < sizeof (cie->augmentation));
strcpy (cie->augmentation, (char *) buf);
- buf = (bfd_byte *) strchr ((char *) buf, '\0') + 1;
+ buf = (bfd_byte *) null_byte + 1;
this_inf->u.cie.aug_str_len = buf - start - 1;
ENSURE_NO_RELOCS (buf);
if (buf[0] == 'e' && buf[1] == 'h')
Only in binutils-with-gold-2.44/bfd: elf-eh-frame.c.orig

View file

@ -0,0 +1,76 @@
From 9ca499644a21ceb3f946d1c179c38a83be084490 Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Thu, 18 Sep 2025 16:59:25 -0700
Subject: [PATCH] elf: Don't match corrupt section header in linker input
Don't swap in nor match corrupt section header in linker input to avoid
linker crash later.
PR ld/33457
* elfcode.h (elf_swap_shdr_in): Changed to return bool. Return
false for corrupt section header in linker input.
(elf_object_p): Reject if elf_swap_shdr_in returns false.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
---
bfd/elfcode.h | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/bfd/elfcode.h b/bfd/elfcode.h
index 9c65852e103..5224a1abee6 100644
--- a/bfd/elfcode.h
+++ b/bfd/elfcode.h
@@ -311,7 +311,7 @@ elf_swap_ehdr_out (bfd *abfd,
/* Translate an ELF section header table entry in external format into an
ELF section header table entry in internal format. */
-static void
+static bool
elf_swap_shdr_in (bfd *abfd,
const Elf_External_Shdr *src,
Elf_Internal_Shdr *dst)
@@ -341,6 +341,9 @@ elf_swap_shdr_in (bfd *abfd,
{
_bfd_error_handler (_("warning: %pB has a section "
"extending past end of file"), abfd);
+ /* PR ld/33457: Don't match corrupt section header. */
+ if (abfd->is_linker_input)
+ return false;
abfd->read_only = 1;
}
}
@@ -350,6 +353,7 @@ elf_swap_shdr_in (bfd *abfd,
dst->sh_entsize = H_GET_WORD (abfd, src->sh_entsize);
dst->bfd_section = NULL;
dst->contents = NULL;
+ return true;
}
/* Translate an ELF section header table entry in internal format into an
@@ -642,9 +646,9 @@ elf_object_p (bfd *abfd)
/* Read the first section header at index 0, and convert to internal
form. */
- if (bfd_read (&x_shdr, sizeof x_shdr, abfd) != sizeof (x_shdr))
+ if (bfd_read (&x_shdr, sizeof x_shdr, abfd) != sizeof (x_shdr)
+ || !elf_swap_shdr_in (abfd, &x_shdr, &i_shdr))
goto got_no_match;
- elf_swap_shdr_in (abfd, &x_shdr, &i_shdr);
/* If the section count is zero, the actual count is in the first
section header. */
@@ -730,9 +734,9 @@ elf_object_p (bfd *abfd)
to internal form. */
for (shindex = 1; shindex < i_ehdrp->e_shnum; shindex++)
{
- if (bfd_read (&x_shdr, sizeof x_shdr, abfd) != sizeof (x_shdr))
+ if (bfd_read (&x_shdr, sizeof x_shdr, abfd) != sizeof (x_shdr)
+ || !elf_swap_shdr_in (abfd, &x_shdr, i_shdrp + shindex))
goto got_no_match;
- elf_swap_shdr_in (abfd, &x_shdr, i_shdrp + shindex);
/* Sanity check sh_link and sh_info. */
if (i_shdrp[shindex].sh_link >= num_sec)
--
2.51.0

View file

@ -0,0 +1,45 @@
From b6ac5a8a5b82f0ae6a4642c8d7149b325f4cc60a Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Tue, 30 Sep 2025 08:13:56 +0800
Subject: [PATCH] x86: Keep _GLOBAL_OFFSET_TABLE_ for .eh_frame
Since x86 .eh_frame section may reference _GLOBAL_OFFSET_TABLE_, keep
_GLOBAL_OFFSET_TABLE_ if there is dynamic section and the output
.eh_frame section is non-empty.
PR ld/33499
* elfxx-x86.c (_bfd_x86_elf_late_size_sections): Keep
_GLOBAL_OFFSET_TABLE_ if there is dynamic section and the
output .eh_frame section is non-empty.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
---
bfd/elfxx-x86.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff -rup binutils-with-gold-2.44.orig/bfd/elfxx-x86.c binutils-with-gold-2.44/bfd/elfxx-x86.c
--- binutils-with-gold-2.44.orig/bfd/elfxx-x86.c 2025-10-13 10:42:42.345160623 +0100
+++ binutils-with-gold-2.44/bfd/elfxx-x86.c 2025-10-13 10:42:52.941568120 +0100
@@ -2458,6 +2458,8 @@ _bfd_x86_elf_late_size_sections (bfd *ou
if (htab->elf.sgotplt)
{
+ asection *eh_frame;
+
/* Don't allocate .got.plt section if there are no GOT nor PLT
entries and there is no reference to _GLOBAL_OFFSET_TABLE_. */
if ((htab->elf.hgot == NULL
@@ -2470,7 +2472,11 @@ _bfd_x86_elf_late_size_sections (bfd *ou
&& (htab->elf.iplt == NULL
|| htab->elf.iplt->size == 0)
&& (htab->elf.igotplt == NULL
- || htab->elf.igotplt->size == 0))
+ || htab->elf.igotplt->size == 0)
+ && (!htab->elf.dynamic_sections_created
+ || (eh_frame = bfd_get_section_by_name (output_bfd,
+ ".eh_frame")) == NULL
+ || eh_frame->rawsize == 0))
{
htab->elf.sgotplt->size = 0;
/* Solaris requires to keep _GLOBAL_OFFSET_TABLE_ even if it

View file

@ -0,0 +1,198 @@
From 6b21c8b2ecfef5c95142cbc2c32f185cb1c26ab0 Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Tue, 30 Sep 2025 08:18:29 +0800
Subject: [PATCH] x86: Disallow TLS relocation in non executable section
Since TLS relocations are applied to executable machine instructions,
disallow TLS relocation in non-SHT_PROGBITS, non-SHF_EXECINSTR section.
PR ld/33451
PR ld/33502
* elf32-i386.c (elf_i386_tls_transition): Disallow TLS relocation
in non-SHT_PROGBITS, non-SHF_EXECINSTR section.
(elf_i386_scan_relocs): Likewise.
* elf64-x86-64.c (elf_x86_64_tls_transition): Likewise.
(elf_x86_64_scan_relocs): Likewise.
* elfxx-x86.c (_bfd_x86_elf_link_report_tls_invalid_section_error):
New.
* elfxx-x86.h (_bfd_x86_elf_link_report_tls_invalid_section_error):
Likewise.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
---
bfd/elf32-i386.c | 19 +++++++++++++++++++
bfd/elf64-x86-64.c | 20 ++++++++++++++++++++
bfd/elfxx-x86.c | 20 ++++++++++++++++++++
bfd/elfxx-x86.h | 4 ++++
4 files changed, 63 insertions(+)
diff -rup binutils-with-gold-2.44.orig/bfd/elf32-i386.c binutils-with-gold-2.44/bfd/elf32-i386.c
--- binutils-with-gold-2.44.orig/bfd/elf32-i386.c 2025-10-10 10:27:34.128669391 +0100
+++ binutils-with-gold-2.44/bfd/elf32-i386.c 2025-10-10 10:27:45.159754790 +0100
@@ -1166,6 +1166,15 @@ elf_i386_tls_transition (struct bfd_link
return true;
}
+ if ((elf_section_type (sec) != SHT_PROGBITS
+ || (sec->flags & SEC_CODE) == 0))
+ {
+ reloc_howto_type *howto = elf_i386_rtype_to_howto (from_type);
+ _bfd_x86_elf_link_report_tls_invalid_section_error
+ (abfd, sec, symtab_hdr, h, sym, howto);
+ return false;
+ }
+
/* Return TRUE if there is no transition. */
if (from_type == to_type)
return true;
@@ -1685,6 +1694,16 @@ elf_i386_scan_relocs (bfd *abfd,
tls_type = GOT_TLS_IE_POS; break;
}
+ if (tls_type >= GOT_TLS_GD
+ && tls_type <= GOT_TLS_GDESC
+ && (elf_section_type (sec) != SHT_PROGBITS
+ || (sec->flags & SEC_CODE) == 0))
+ {
+ _bfd_x86_elf_link_report_tls_invalid_section_error
+ (abfd, sec, symtab_hdr, h, isym, howto);
+ goto error_return;
+ }
+
if (h != NULL)
{
h->got.refcount = 1;
diff -rup binutils-with-gold-2.44.orig/bfd/elf64-x86-64.c binutils-with-gold-2.44/bfd/elf64-x86-64.c
--- binutils-with-gold-2.44.orig/bfd/elf64-x86-64.c 2025-10-10 10:27:34.147669538 +0100
+++ binutils-with-gold-2.44/bfd/elf64-x86-64.c 2025-10-10 10:27:45.161165453 +0100
@@ -1598,6 +1598,16 @@ elf_x86_64_tls_transition (struct bfd_li
return true;
}
+ if ((elf_section_type (sec) != SHT_PROGBITS
+ || (sec->flags & SEC_CODE) == 0))
+ {
+ reloc_howto_type *howto = elf_x86_64_rtype_to_howto (abfd,
+ from_type);
+ _bfd_x86_elf_link_report_tls_invalid_section_error
+ (abfd, sec, symtab_hdr, h, sym, howto);
+ return false;
+ }
+
/* Return TRUE if there is no transition. */
if (from_type == to_type
|| (from_type == R_X86_64_CODE_4_GOTTPOFF
@@ -2351,6 +2361,16 @@ elf_x86_64_scan_relocs (bfd *abfd, struc
break;
}
+ if (tls_type >= GOT_TLS_GD
+ && tls_type <= GOT_TLS_GDESC
+ && (elf_section_type (sec) != SHT_PROGBITS
+ || (sec->flags & SEC_CODE) == 0))
+ {
+ _bfd_x86_elf_link_report_tls_invalid_section_error
+ (abfd, sec, symtab_hdr, h, isym, howto);
+ goto error_return;
+ }
+
if (h != NULL)
{
h->got.refcount = 1;
diff -rup binutils-with-gold-2.44.orig/bfd/elfxx-x86.c binutils-with-gold-2.44/bfd/elfxx-x86.c
--- binutils-with-gold-2.44.orig/bfd/elfxx-x86.c 2025-10-10 10:27:34.204669979 +0100
+++ binutils-with-gold-2.44/bfd/elfxx-x86.c 2025-10-10 10:27:45.161625095 +0100
@@ -3359,6 +3359,26 @@ _bfd_x86_elf_link_report_tls_transition_
bfd_set_error (bfd_error_bad_value);
}
+/* Report TLS invalid section error. */
+
+void
+_bfd_x86_elf_link_report_tls_invalid_section_error
+ (bfd *abfd, asection *sec, Elf_Internal_Shdr *symtab_hdr,
+ struct elf_link_hash_entry *h, Elf_Internal_Sym *sym,
+ reloc_howto_type *howto)
+{
+ const char *name;
+ if (h)
+ name = h->root.root.string;
+ else
+ name = bfd_elf_sym_name (abfd, symtab_hdr, sym, NULL);
+ _bfd_error_handler
+ /* xgettext:c-format */
+ (_("%pB: relocation %s against thread local symbol `%s' in "
+ "invalid section `%pA'"), abfd, howto->name, name, sec);
+ bfd_set_error (bfd_error_bad_value);
+}
+
/* Return TRUE if symbol should be hashed in the `.gnu.hash' section. */
bool
diff -rup binutils-with-gold-2.44.orig/bfd/elfxx-x86.h binutils-with-gold-2.44/bfd/elfxx-x86.h
--- binutils-with-gold-2.44.orig/bfd/elfxx-x86.h 2025-10-10 10:27:34.157669616 +0100
+++ binutils-with-gold-2.44/bfd/elfxx-x86.h 2025-10-10 10:27:45.162048003 +0100
@@ -939,6 +939,10 @@ extern void _bfd_x86_elf_link_report_tls
const Elf_Internal_Rela *, const char *, const char *,
enum elf_x86_tls_error_type);
+extern void _bfd_x86_elf_link_report_tls_invalid_section_error
+ (bfd *, asection *, Elf_Internal_Shdr *, struct elf_link_hash_entry *,
+ Elf_Internal_Sym *, reloc_howto_type *);
+
#define bfd_elf64_mkobject \
_bfd_x86_elf_mkobject
#define bfd_elf32_mkobject \
--- binutils-with-gold-2.44.orig/bfd/elf64-x86-64.c 2025-10-10 10:58:00.684202576 +0100
+++ binutils-with-gold-2.44/bfd/elf64-x86-64.c 2025-10-10 11:01:54.310462809 +0100
@@ -2169,6 +2169,7 @@ elf_x86_64_scan_relocs (bfd *abfd, struc
bool size_reloc;
bool converted_reloc;
bool no_dynreloc;
+ reloc_howto_type *howto;
r_symndx = htab->r_sym (rel->r_info);
r_type = ELF32_R_TYPE (rel->r_info);
@@ -2185,6 +2186,14 @@ elf_x86_64_scan_relocs (bfd *abfd, struc
goto error_return;
}
+ howto = elf_x86_64_rtype_to_howto (abfd, r_type);
+ if (howto == NULL)
+ {
+ _bfd_error_handler (_("%pB: unsupported relocation type %#x"),
+ abfd, r_type);
+ goto error_return;
+ }
+
if (r_symndx < symtab_hdr->sh_info)
{
/* A local symbol. */
--- binutils-with-gold-2.44.orig/bfd/elf32-i386.c 2025-10-10 11:05:23.893062517 +0100
+++ binutils-with-gold-2.44/bfd/elf32-i386.c 2025-10-10 11:06:31.136544677 +0100
@@ -1540,6 +1540,7 @@ elf_i386_scan_relocs (bfd *abfd,
const char *name;
bool size_reloc;
bool no_dynreloc;
+ reloc_howto_type *howto;
r_symndx = ELF32_R_SYM (rel->r_info);
r_type = ELF32_R_TYPE (rel->r_info);
@@ -1556,6 +1557,17 @@ elf_i386_scan_relocs (bfd *abfd,
goto error_return;
}
+ howto = elf_i386_rtype_to_howto (r_type);
+ if (rel->r_offset + bfd_get_reloc_size (howto) > sec->size)
+ {
+ /* xgettext:c-format */
+ _bfd_error_handler
+ (_("%pB: bad reloc offset (%#" PRIx32 " > %#" PRIx32 ") for"
+ " section `%pA'"), abfd, (uint32_t) rel->r_offset,
+ (uint32_t) sec->size, sec);
+ goto error_return;
+ }
+
if (r_symndx < symtab_hdr->sh_info)
{
/* A local symbol. */

View file

@ -0,0 +1,27 @@
From 12ef7d5b7b02d0023db645d86eb9d0797bc747fe Mon Sep 17 00:00:00 2001
From: Nick Clifton <nickc@redhat.com>
Date: Mon, 3 Nov 2025 11:49:02 +0000
Subject: [PATCH] Remove call to abort in the DGB debug format printing code,
thus allowing the display of a fuzzed input file to complete without
triggering an abort.
PR 33448
---
binutils/prdbg.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/binutils/prdbg.c b/binutils/prdbg.c
index c239aeb1a79..5d405c48e3d 100644
--- a/binutils/prdbg.c
+++ b/binutils/prdbg.c
@@ -2449,7 +2449,6 @@ tg_tag_type (void *p, const char *name, unsigned int id,
t = "union class ";
break;
default:
- abort ();
return false;
}
--
2.51.1

View file

@ -0,0 +1,24 @@
From f6b0f53a36820da91eadfa9f466c22f92e4256e0 Mon Sep 17 00:00:00 2001
From: Alan Modra <amodra@gmail.com>
Date: Mon, 3 Nov 2025 09:03:37 +1030
Subject: [PATCH] PR 33455 SEGV in vfinfo at ldmisc.c:527
A reloc howto set up with EMPTY_HOWTO has a NULL name. More than one
place emitting diagnostics assumes a reloc howto won't have a NULL
name.
PR 33455
* coffcode.h (coff_slurp_reloc_table): Don't allow a howto with
a NULL name.
---
--- binutils-2.43.1.orig/bfd/coffcode.h 2025-11-03 11:17:09.463206752 +0000
+++ binutils-2.43.1/bfd/coffcode.h 2025-11-03 11:17:21.031291895 +0000
@@ -5347,7 +5347,7 @@ coff_slurp_reloc_table (bfd * abfd, sec_
RTYPE2HOWTO (cache_ptr, &dst);
#endif /* RELOC_PROCESSING */
- if (cache_ptr->howto == NULL)
+ if (cache_ptr->howto == NULL || cache_ptr->howto->name == NULL)
{
_bfd_error_handler
/* xgettext:c-format */

View file

@ -0,0 +1,38 @@
From 08c3cbe5926e4d355b5cb70bbec2b1eeb40c2944 Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Sat, 21 Jun 2025 06:36:56 +0800
Subject: [PATCH] objcopy: Don't extend the output section size
Since the output section contents are copied from the input, don't
extend the output section size beyond the input section size.
PR binutils/33049
* objcopy.c (copy_section): Don't extend the output section
size beyond the input section size.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
---
diff -rup binutils-with-gold-2.44.orig/binutils/objcopy.c binutils-with-gold-2.44/binutils/objcopy.c
--- binutils-with-gold-2.44.orig/binutils/objcopy.c 2025-07-14 14:02:26.056738993 +0100
+++ binutils-with-gold-2.44/binutils/objcopy.c 2025-07-14 14:02:37.994817061 +0100
@@ -4634,6 +4634,7 @@ copy_section (bfd *ibfd, sec_ptr isectio
char *to = (char *) memhunk;
char *end = (char *) memhunk + size;
int i;
+ bfd_size_type memhunk_size = size;
/* If the section address is not exactly divisible by the interleave,
then we must bias the from address. If the copy_byte is less than
@@ -4653,6 +4654,11 @@ copy_section (bfd *ibfd, sec_ptr isectio
}
size = (size + interleave - 1 - copy_byte) / interleave * copy_width;
+
+ /* Don't extend the output section size. */
+ if (size > memhunk_size)
+ size = memhunk_size;
+
osection->lma /= interleave;
if (copy_byte < extra)
osection->lma++;
Only in binutils-with-gold-2.44/binutils: objcopy.c.orig

View file

@ -0,0 +1,48 @@
From 41461010eb7c79fee7a9d5f6209accdaac66cc6b Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Sat, 21 Jun 2025 06:52:00 +0800
Subject: [PATCH] elf: Report corrupted group section
Report corrupted group section instead of trying to recover.
PR binutils/33050
* elf.c (bfd_elf_set_group_contents): Report corrupted group
section.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
---
diff -rup binutils-with-gold-2.44.orig/bfd/elf.c binutils-with-gold-2.44/bfd/elf.c
--- binutils-with-gold-2.44.orig/bfd/elf.c 2025-07-14 14:02:25.953738320 +0100
+++ binutils-with-gold-2.44/bfd/elf.c 2025-07-14 14:03:26.748082669 +0100
@@ -3943,20 +3943,17 @@ bfd_elf_set_group_contents (bfd *abfd, a
break;
}
- /* We should always get here with loc == sec->contents + 4, but it is
- possible to craft bogus SHT_GROUP sections that will cause segfaults
- in objcopy without checking loc here and in the loop above. */
- if (loc == sec->contents)
- BFD_ASSERT (0);
- else
+ /* We should always get here with loc == sec->contents + 4. Return
+ an error for bogus SHT_GROUP sections. */
+ loc -= 4;
+ if (loc != sec->contents)
{
- loc -= 4;
- if (loc != sec->contents)
- {
- BFD_ASSERT (0);
- memset (sec->contents + 4, 0, loc - sec->contents);
- loc = sec->contents;
- }
+ /* xgettext:c-format */
+ _bfd_error_handler (_("%pB: corrupted group section: `%pA'"),
+ abfd, sec);
+ bfd_set_error (bfd_error_bad_value);
+ *failedptr = true;
+ return;
}
H_PUT_32 (abfd, sec->flags & SEC_LINK_ONCE ? GRP_COMDAT : 0, loc);
Only in binutils-with-gold-2.44/bfd: elf.c.orig

View file

@ -0,0 +1,14 @@
--- binutils-with-gold-2.44.orig/binutils/dwarf.c 2025-07-29 13:59:16.790021400 +0100
+++ binutils-with-gold-2.44/binutils/dwarf.c 2025-07-29 14:00:52.519441392 +0100
@@ -3807,10 +3807,9 @@ process_debug_info (struct dwarf_section
}
if ((do_loc || do_debug_loc || do_debug_ranges || do_debug_info)
- && num_debug_info_entries == 0
+ && alloc_num_debug_info_entries == 0
&& ! do_types)
{
-
/* Then allocate an array to hold the information. */
debug_information = (debug_info *) cmalloc (num_units,
sizeof (* debug_information));

View file

@ -0,0 +1,413 @@
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

View file

@ -0,0 +1,17 @@
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;

View file

@ -1,40 +0,0 @@
# The gold linker does not build if the target list includes s390x-linux
# but does not include s390-linux. ie it needs the 32-bit target to be
# enabled in order for the 64-bit target to work. On the other hand the
# BFD library does not support the 32-bit s390 target. So this patch
# "enhances" the gold configure script so that if s390x is listed, the
# s390 target will automatically be added to the list as well.
diff -upr orig/gold/configure binutils-2.47/gold/configure
--- orig/gold/configure 2026-07-27 09:38:54.907192013 +0100
+++ binutils-2.47/gold/configure 2026-07-27 10:12:02.759629540 +0100
@@ -5223,7 +5223,12 @@ if test -n "$enable_targets"; then
for targ in `echo $enable_targets | sed -e 's/,/ /g'`; do
result=`$ac_config_sub $targ 2>/dev/null`
if test -n "$result"; then
- canon_targets="$canon_targets $result"
+ canon_targets="$canon_targets $result" ;
+ case "$result" in
+ s390x-*)
+ canon_targets="$canon_targets s390-gnu-linux"
+ ;;
+ esac
else
# Permit unrecognized target names, like "all".
canon_targets="$canon_targets $targ"
diff -upr orig/gold/configure.ac binutils-2.47/gold/configure.ac
--- orig/gold/configure.ac 2026-07-27 09:38:54.907192013 +0100
+++ binutils-2.47/gold/configure.ac 2026-07-27 10:18:18.480766140 +0100
@@ -133,6 +133,12 @@ if test -n "$enable_targets"; then
result=`$ac_config_sub $targ 2>/dev/null`
if test -n "$result"; then
canon_targets="$canon_targets $result"
+ # Hack: Enable the s390-linux target if s390x-linux is enabled.
+ case "$result" in
+ s390x-*)
+ canon_targets="$canon_targets s390-gnu-linux"
+ ;;
+ esac
else
# Permit unrecognized target names, like "all".
canon_targets="$canon_targets $targ"

View file

@ -24,6 +24,26 @@ diff -rup binutils.orig/gold/configure.ac binutils-2.34/gold/configure.ac
else
targetobjs="$targetobjs ${targ_obj}.\$(OBJEXT)"
if test "$targ_extra_obj" != ""; then
--- binutils.orig/ld/configure.tgt 2020-04-20 12:35:12.465301359 +0100
+++ binutils-2.34/ld/configure.tgt 2020-04-20 14:17:52.123066333 +0100
@@ -220,7 +220,7 @@ bfin-*-linux-uclibc*) targ_emul=elf32bfi
targ_extra_emuls="elf32bfin"
targ_extra_libpath=$targ_extra_emuls
;;
-bpf-*-*) targ_emul=elf64bpf
+bpf-* | bpf-*-*) targ_emul=elf64bpf
;;
cr16-*-elf*) targ_emul=elf32cr16
;;
@@ -1026,7 +1026,7 @@ z8k-*-coff) targ_emul=z8002
targ_extra_ofiles=
;;
*)
- echo 2>&1 "*** ld does not support target ${targ}"
+ echo 2>&1 "*** ld does not support target '${targ}' NO REALLY"
echo 2>&1 "*** see ld/configure.tgt for supported targets"
exit 1
--- binutils.orig/bfd/config.bfd 2020-04-20 12:35:13.038297375 +0100
+++ binutils-2.34/bfd/config.bfd 2020-04-20 14:25:26.452869193 +0100
@@ -473,7 +473,7 @@ case "${targ}" in
@ -35,14 +55,12 @@ diff -rup binutils.orig/gold/configure.ac binutils-2.34/gold/configure.ac
targ_defvec=bpf_elf64_le_vec
targ_selvecs=bpf_elf64_be_vec
targ_underscore=yes
--- binutils.orig/ld/configure.tgt 2026-01-05 08:51:02.908224792 +0000
+++ binutils-with-gold-2.45.50-be970c68891/ld/configure.tgt 2026-01-05 08:51:55.852677409 +0000
@@ -255,7 +255,7 @@ bfin-*-uclinux*) targ_emul=elf32bfin;
bfin-*-linux-uclibc*) targ_emul=elf32bfinfd;
targ_extra_libpath=elf32bfin
;;
-bpf-*-*) targ_emul=elf64bpf
+bpf-* | bpf-*-*) targ_emul=elf64bpf
;;
cr16-*-elf*) targ_emul=elf32cr16
;;
@@ -1427,7 +1427,7 @@ case "${targ}" in
;;
*)
- echo 1>&2 "*** BFD does not support target ${targ}."
+ echo 1>&2 "*** BFD does not support target '${targ}'. Honest."
echo 1>&2 "*** Look in bfd/config.bfd for supported targets."
exit 1
;;

View file

@ -1,52 +0,0 @@
diff -rup binutils.orig/bfd/elflink.c binutils-with-gold-2.45.50-be970c68891/bfd/elflink.c
--- binutils.orig/bfd/elflink.c 2026-01-14 09:21:14.835847967 +0000
+++ binutils-with-gold-2.45.50-be970c68891/bfd/elflink.c 2026-01-14 09:23:48.780495205 +0000
@@ -13786,7 +13786,7 @@ _bfd_elf_final_link (bfd *abfd, struct b
{
if (info->textrel_check == textrel_check_error)
info->callbacks->einfo
- (_("%P%X: read-only segment has dynamic relocations\n"));
+ (_("%P%X: error: read-only segment has dynamic relocations\n"));
else if (bfd_link_dll (info))
info->callbacks->einfo
(_("%P: warning: creating DT_TEXTREL in a shared object\n"));
diff -rup binutils.orig/ld/testsuite/ld-aarch64/dt-memtag-mode.d binutils-with-gold-2.45.50-be970c68891/ld/testsuite/ld-aarch64/dt-memtag-mode.d
--- binutils.orig/ld/testsuite/ld-aarch64/dt-memtag-mode.d 2026-01-14 09:21:15.248851537 +0000
+++ binutils-with-gold-2.45.50-be970c68891/ld/testsuite/ld-aarch64/dt-memtag-mode.d 2026-01-14 09:22:24.603416270 +0000
@@ -1,5 +1,5 @@
#source: dt-memtag.s
-#ld: -shared -z memtag-mode=async
+#ld: -shared -z memtag-mode=async -z notext
#readelf: -d
#...
diff -rup binutils.orig/ld/testsuite/ld-aarch64/dt-memtag-stack.d binutils-with-gold-2.45.50-be970c68891/ld/testsuite/ld-aarch64/dt-memtag-stack.d
--- binutils.orig/ld/testsuite/ld-aarch64/dt-memtag-stack.d 2026-01-14 09:21:15.248851537 +0000
+++ binutils-with-gold-2.45.50-be970c68891/ld/testsuite/ld-aarch64/dt-memtag-stack.d 2026-01-14 09:24:19.594780414 +0000
@@ -1,5 +1,5 @@
#source: dt-memtag.s
-#ld: -shared -z memtag-stack
+#ld: -shared -z memtag-stack -z notext
#readelf: -d
#...
diff -rup binutils.orig/ld/testsuite/ld-aarch64/relr-text-pie.d binutils-with-gold-2.45.50-be970c68891/ld/testsuite/ld-aarch64/relr-text-pie.d
--- binutils.orig/ld/testsuite/ld-aarch64/relr-text-pie.d 2026-01-14 09:21:15.246851520 +0000
+++ binutils-with-gold-2.45.50-be970c68891/ld/testsuite/ld-aarch64/relr-text-pie.d 2026-01-14 09:24:45.363485698 +0000
@@ -1,5 +1,5 @@
#source: relr-text.s
-#ld: -pie -z pack-relative-relocs -T relocs.ld
+#ld: -pie -z pack-relative-relocs -T relocs.ld -z notext
#readelf: -drW
#...
diff -rup binutils.orig/ld/testsuite/ld-aarch64/relr-text-shared.d binutils-with-gold-2.45.50-be970c68891/ld/testsuite/ld-aarch64/relr-text-shared.d
--- binutils.orig/ld/testsuite/ld-aarch64/relr-text-shared.d 2026-01-14 09:21:15.246851520 +0000
+++ binutils-with-gold-2.45.50-be970c68891/ld/testsuite/ld-aarch64/relr-text-shared.d 2026-01-14 09:25:06.651664713 +0000
@@ -1,5 +1,5 @@
#source: relr-text.s
-#ld: -shared -z pack-relative-relocs -T relocs.ld
+#ld: -shared -z pack-relative-relocs -T relocs.ld -z notext
#readelf: -drW
#...

View file

@ -1,33 +0,0 @@
diff -rup binutils.orig/ld/testsuite/ld-x86-64/x86-64.exp binutils-with-gold-2.45.50-96b8a8a633a/ld/testsuite/ld-x86-64/x86-64.exp
--- binutils.orig/ld/testsuite/ld-x86-64/x86-64.exp 2025-11-20 12:02:23.738336155 +0000
+++ binutils-with-gold-2.45.50-96b8a8a633a/ld/testsuite/ld-x86-64/x86-64.exp 2025-11-20 12:03:17.894485264 +0000
@@ -1413,14 +1413,6 @@ if { [isnative] && [check_compiler_avail
"libprotected-func-2b.so" \
] \
[list \
- "Build protected-func-2 without PIE" \
- "$NOPIE_LDFLAGS -Wl,--no-as-needed tmpdir/libprotected-func-2b.so" \
- "$DIRECT_EXTERN_ACCESS_CFLAGS $NOPIE_CFLAGS -Wa,-mx86-used-note=yes" \
- { protected-func-1b.c } \
- {} \
- "protected-func-2" \
- ] \
- [list \
"Build libprotected-func-2c.so" \
"-shared" \
"-fPIC -Wa,-mx86-used-note=yes" \
@@ -1429,14 +1421,6 @@ if { [isnative] && [check_compiler_avail
"libprotected-func-2c.so" \
] \
[list \
- "Build protected-func-2a without PIE" \
- "$NOPIE_LDFLAGS -Wl,--no-as-needed tmpdir/libprotected-func-2c.so" \
- "$DIRECT_EXTERN_ACCESS_CFLAGS $NOPIE_CFLAGS -Wa,-mx86-used-note=yes" \
- { protected-func-1b.c } \
- {} \
- "protected-func-2a" \
- ] \
- [list \
"Build libprotected-data-1a.so" \
"-shared -z noindirect-extern-access" \
"-fPIC -Wa,-mx86-used-note=yes" \

View file

@ -0,0 +1,124 @@
--- 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 +

View file

@ -134,6 +134,19 @@ diff -rup binutils.orig/ld/testsuite/ld-elf/tls.exp binutils-2.40/ld/testsuite/l
objcopy_test_without_global_symbol
--- binutils.orig/ld/testsuite/ld-ifunc/ifunc.exp 2024-02-08 10:12:23.739591113 +0000
+++ binutils-2.42/ld/testsuite/ld-ifunc/ifunc.exp 2024-02-08 10:14:58.243670115 +0000
@@ -666,6 +666,10 @@ run_cc_link_tests [list \
] \
]
+if {[istarget "riscv*-*-*"]} {
+ return
+}
+
run_ld_link_exec_tests [list \
[list \
"Run pr18808" \
diff -rup binutils.orig/ld/testsuite/ld-riscv-elf/pcgp-relax-01-norelaxgp.d binutils-2.43.50-1f4aee70ed1/ld/testsuite/ld-riscv-elf/pcgp-relax-01-norelaxgp.d
--- binutils.orig/ld/testsuite/ld-riscv-elf/pcgp-relax-01-norelaxgp.d 2024-10-03 15:21:47.926570551 +0100
+++ binutils-2.43.50-1f4aee70ed1/ld/testsuite/ld-riscv-elf/pcgp-relax-01-norelaxgp.d 2024-10-03 15:24:26.152502612 +0100
@ -172,98 +185,3 @@ diff -rup binutils.orig/ld/testsuite/ld-riscv-elf/pcgp-relax-02.d binutils-2.43.
-.*:[ ]+[0-9a-f]+[ ]+mv[ ]+a1,a1
+.*:[ ]+[0-9a-f]+[ ]+.*
#pass
--- binutils-with-gold-2.45.50-79b2b564fec.orig/ld/testsuite/ld-riscv-elf/zicfilp-unlabeled-plt.d 2025-09-09 15:52:30.684689609 +0100
+++ binutils-with-gold-2.45.50-79b2b564fec/ld/testsuite/ld-riscv-elf/zicfilp-unlabeled-plt.d 2025-09-09 15:53:12.837859447 +0100
@@ -30,6 +30,6 @@ Disassembly of section \.plt:
[0-9a-f]+ <bar@plt>:
.*:[ ]+[0-9a-f]+[ ]+lpad[ ]+0x0
-.*:[ ]+[0-9a-f]+[ ]+auipc[ ]+t3,0x1
+.*:[ ]+[0-9a-f]+[ ]+auipc[ ]+t3,0x[0-9a-f]+
.*:[ ]+[0-9a-f]+[ ]+ld[ ]+t3,[0-9]+\(t3\) # [0-9a-f]+ <bar>
.*:[ ]+[0-9a-f]+[ ]+jalr[ ]+t1,t3
diff -rup binutils-with-gold-2.45.50-beab972c07d,orig/binutils/testsuite/binutils-all/objcopy.exp binutils-with-gold-2.45.50-beab972c07d/binutils/testsuite/binutils-all/objcopy.exp
--- binutils-with-gold-2.45.50-beab972c07d,orig/binutils/testsuite/binutils-all/objcopy.exp 2025-12-02 12:47:19.063123207 +0000
+++ binutils-with-gold-2.45.50-beab972c07d/binutils/testsuite/binutils-all/objcopy.exp 2025-12-04 12:39:26.079989597 +0000
@@ -602,14 +602,19 @@ proc strip_test { } {
set exec_output [binutils_run $STRIP "$STRIPFLAGS $objfile"]
set exec_output [prune_warnings $exec_output]
if ![string equal "" $exec_output] {
- fail $test
+ fail "$test (warnings in linker output)"
+ verbose $exec_output
return
}
set exec_output [binutils_run $NM "-a $NMFLAGS $objfile"]
set exec_output [prune_warnings $exec_output]
if ![string match "*: no symbols*" $exec_output] {
- fail $test
+
+ # The RISC-V target compiles with annotation enabled and these symbols remain after stripping.
+ setup_xfail riscv*-*-*
+
+ fail "$test (symbols in nm output)"
return
}
@@ -659,6 +664,9 @@ proc strip_test_with_saving_a_symbol { }
pass $test
}
+# The RISC-V target compiles with annotation enabled and these symbols remain after stripping.
+setup_xfail riscv*-*-*
+
strip_test_with_saving_a_symbol
# Test stripping an archive.
@@ -1503,7 +1519,7 @@ proc objcopy_test_without_global_symbol
# in object files, so they will fail this test.
setup_xfail aarch64*-*-* arm*-*-*
# The RISC-V target compiles with annotation enabled and these symbols remain after stripping.
-# setup_xfail riscv*-*-*
+setup_xfail riscv*-*-*
objcopy_test_without_global_symbol
diff -rup binutils-with-gold-2.45.50-beab972c07d,orig/ld/testsuite/lib/ld-lib.exp binutils-with-gold-2.45.50-beab972c07d/ld/testsuite/lib/ld-lib.exp
--- binutils-with-gold-2.45.50-beab972c07d,orig/ld/testsuite/lib/ld-lib.exp 2025-12-02 12:47:19.201090894 +0000
+++ binutils-with-gold-2.45.50-beab972c07d/ld/testsuite/lib/ld-lib.exp 2025-12-03 09:30:07.184360005 +0000
@@ -1633,6 +1633,12 @@ proc compile_one_cc { src output additio
proc check_ctf_available { } {
global ctf_available_saved
+ # Skip CTF tests for the Risc-V target for now, as the
+ # tests have not been tweaked to support the riscv format.
+ if { [istarget "riscv*-*-linux*"] } {
+ return 0
+ }
+
if {![info exists ctf_available_saved]} {
set ctf_available_saved 0
--- fred/binutils/testsuite/lib/binutils-common.exp 2026-03-16 09:18:37.205413649 +0000
+++ binutils-with-gold-2.46.50-d712202846b/binutils/testsuite/lib/binutils-common.exp 2026-03-16 09:18:49.559358668 +0000
@@ -803,6 +803,9 @@ proc prune_warnings_extra { text } {
# Ignore warnings about linking objects with an old sframe format
regsub -all {(^|\n)([^\n]* unexpected SFrame format version [^\n]*\n[^\n]* SFrame section ignored\n?)+} $text {\1} text
+ # Skip warnings about the LTO plugin being needed.
+ regsub -all "(^|\n)(\[^\n\]*:\[^\n\]*plugin needed to handle lto object\[^\n\]*\n?)+" $text "\\1" text
+
return $text
}
--- binutils.orig/ld/testsuite/ld-elf/shared.exp 2026-06-10 15:32:21.012274073 +0100
+++ binutils-with-gold-2.46.50-48997323b0f/ld/testsuite/ld-elf/shared.exp 2026-06-10 15:34:41.397899263 +0100
@@ -1859,6 +1859,10 @@ run_cc_link_tests [list \
"pr29655.so" \
] \
]
+
+# FIXME: Find out why the Risc-V fails this test.
+setup_xfail "riscv64-*-*"
+
# PR 29655 (cont.): Check that in PIC code linked as PDE taking the address
# of a function defined in a DSO results in the function address (from GOT)
# and not the "canonical PLT" address from the PDE.

View file

@ -0,0 +1,73 @@
From 3602da6fa285d6b22d87bcc39056e919e939ef07 Mon Sep 17 00:00:00 2001
From: Claudiu Zissulescu <claudiu.zissulescu-ianculescu@oracle.com>
Date: Tue, 15 Apr 2025 12:20:40 +0300
Subject: [PATCH] gas: sframe: fix handling of .cfi_def_cfa_register
Fix PR gas/32879 sframe: Assembler internal error when translating
cfi_def_cfa_register
As per the documentation, .cfi_def_cfa_register modifies a rule for
computing CFA; the register is updated, but the offset remains the same.
While translating .cfi_def_cfa_register into SFrame context, we use the
information from last translated FRE to set the CFA offset. However,
there may be cases when the last translated FRE is empty. Use last FRE
only if available.
Signed-off-by: Claudiu Zissulescu <claudiu.zissulescu-ianculescu@oracle.com>
Signed-off-by: Indu Bhagat <indu.bhagat@oracle.com>
---
--- binutils-with-gold-2.44/gas/gen-sframe.c 2025-07-21 11:33:14.873962124 +0100
+++ binutils-with-gold-2.44.new/gas/gen-sframe.c 2025-07-21 11:32:44.715761914 +0100
@@ -1041,7 +1041,9 @@ sframe_xlate_do_def_cfa_register (struct
return SFRAME_XLATE_ERR_NOTREPRESENTED; /* Not represented. */
}
sframe_fre_set_cfa_base_reg (cur_fre, cfi_insn->u.ri.reg);
- sframe_fre_set_cfa_offset (cur_fre, last_fre->cfa_offset);
+ if (last_fre)
+ sframe_fre_set_cfa_offset (cur_fre, last_fre->cfa_offset);
+
cur_fre->merge_candidate = false;
return SFRAME_XLATE_OK;
--- binutils-with-gold-2.44.orig/gas/testsuite/gas/cfi-sframe/cfi-sframe.exp 2025-07-21 09:33:40.785747847 +0100
+++ binutils-with-gold-2.44/gas/testsuite/gas/cfi-sframe/cfi-sframe.exp 2025-07-21 10:15:25.690664829 +0100
@@ -89,6 +89,7 @@ if { [istarget "x86_64-*-*"] && [gas_sfr
if { [gas_x86_64_check] } then {
set ASFLAGS "$ASFLAGS --64"
run_dump_test "cfi-sframe-x86_64-1"
+ run_dump_test "cfi-sframe-x86_64-2"
set ASFLAGS "$old_ASFLAGS"
}
}
--- /dev/null 2025-07-21 08:21:47.074898906 +0100
+++ binutils-with-gold-2.44/gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-2.s 2025-07-21 10:08:25.354278907 +0100
@@ -0,0 +1,4 @@
+# Although not a useful construct by itself, ensure graceful handling.
+ .cfi_startproc
+ .cfi_def_cfa_register 6
+ .cfi_endproc
--- /dev/null 2025-07-21 08:21:47.074898906 +0100
+++ binutils-with-gold-2.44/gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-2.d 2025-07-21 10:08:25.354223801 +0100
@@ -0,0 +1,21 @@
+#as: --gsframe
+#objdump: --sframe=.sframe
+#name: Check .cfi_def_cfa_register with no previous offset
+#...
+Contents of the SFrame section .sframe:
+
+ Header :
+
+ Version: SFRAME_VERSION_2
+ Flags: NONE
+#? CFA fixed FP offset: \-?\d+
+#? CFA fixed RA offset: \-?\d+
+ Num FDEs: 1
+ Num FREs: 1
+
+ Function Index :
+
+ func idx \[0\]: pc = 0x0, size = 0 bytes
+ STARTPC +CFA +FP +RA +
+ 0+0000 +fp\+8 +u +f +
+#pass

View file

@ -27,6 +27,17 @@
if ![regexp $want $got] then {
fail "$testname -s option $got\n"
} else {
--- binutils.orig/binutils/testsuite/binutils-all/objdump.exp 2023-08-03 13:09:07.631503783 +0100
+++ binutils-2.41/binutils/testsuite/binutils-all/objdump.exp 2023-08-03 14:51:54.621295727 +0100
@@ -921,7 +921,7 @@ proc test_objdump_S { } {
}
}
-test_objdump_S
+# test_objdump_S
# Test objdump --private
proc test_objdump_P {} {
--- binutils.orig/ld/testsuite/ld-scripts/ld-version.d 2023-08-03 13:09:07.949504208 +0100
+++ binutils-2.41/ld/testsuite/ld-scripts/ld-version.d 2023-08-03 15:13:01.374590134 +0100
@@ -4,4 +4,4 @@
@ -63,7 +74,7 @@
+++ binutils-2.41/ld/testsuite/ld-x86-64/x86-64.exp 2023-08-03 15:46:29.537416942 +0100
@@ -1386,7 +1386,7 @@ if { [isnative] && [check_compiler_avail
"$NOPIE_LDFLAGS -Wl,--no-as-needed tmpdir/libprotected-func-2b.so" \
"$DIRECT_EXTERN_ACCESS_CFLAGS $NOPIE_CFLAGS -Wa,-mx86-used-note=yes" \
"$NOPIE_CFLAGS -Wa,-mx86-used-note=yes" \
{ protected-func-1b.c } \
- {{error_output "pr28875-func.err"}} \
+ {} \
@ -72,13 +83,21 @@
[list \
@@ -1402,7 +1402,7 @@ if { [isnative] && [check_compiler_avail
"$NOPIE_LDFLAGS -Wl,--no-as-needed tmpdir/libprotected-func-2c.so" \
"$DIRECT_EXTERN_ACCESS_CFLAGS $NOPIE_CFLAGS -Wa,-mx86-used-note=yes" \
"$NOPIE_CFLAGS -Wa,-mx86-used-note=yes" \
{ protected-func-1b.c } \
- {{error_output "pr28875-func.err"}} \
+ {} \
"protected-func-2a" \
] \
[list \
@@ -2155,7 +2155,6 @@ if { [isnative] && [check_compiler_avail
}
}
- undefined_weak "$NOPIE_CFLAGS" "$NOPIE_LDFLAGS"
undefined_weak "-fPIE" ""
undefined_weak "-fPIE" "-pie"
undefined_weak "-fPIE" "-Wl,-z,nodynamic-undefined-weak"
--- binutils.orig/binutils/testsuite/binutils-all/addr2line.exp 2023-08-04 14:00:37.692356718 +0100
+++ binutils-2.41/binutils/testsuite/binutils-all/addr2line.exp 2023-08-04 14:04:32.627697316 +0100
@@ -39,9 +39,9 @@ if ![regexp -line "^(\[0-9a-fA-F\]+)? +\
@ -723,6 +742,25 @@ diff -rup binutils.orig/ld/testsuite/ld-powerpc/tls32.d binutils-2.41/ld/testsui
[list "pr26580-4" \
"" "" \
{pr26580-a.c} "pr26580-4" "pr26580-4.out" "-fcommon" "c" "" \
@@ -1579,18 +1575,6 @@ if { [istarget *-*-linux*]
"pr22393-2-static" \
"pass.out" \
] \
- [list \
- "Run pr21964-4" \
- "" \
- "" \
- {pr21964-4.c} \
- "pr21964-4" \
- "pass.out" \
- "" \
- "" \
- "" \
- "-ldl" \
- ] \
]
}
--- binutils.orig/ld/testsuite/ld-s390/s390.exp 2023-08-15 14:30:13.292890888 +0100
+++ binutils-2.41/ld/testsuite/ld-s390/s390.exp 2023-08-15 14:48:38.327360916 +0100
@@ -35,6 +35,8 @@ if { !([istarget "s390-*-*"] || [istarge
@ -773,6 +811,19 @@ diff -rup binutils.orig/ld/testsuite/ld-powerpc/tls32.d binutils-2.41/ld/testsui
# Check cross references for ld -r
if { ![ld_compile "$CC_FOR_TARGET $NOSANITIZE_CFLAGS $NOLTO_CFLAGS" "$srcdir/$subdir/cross4.c" tmpdir/cross4.o] } {
--- binutils.orig/ld/testsuite/ld-shared/shared.exp 2023-08-15 14:30:13.309890913 +0100
+++ binutils-2.41/ld/testsuite/ld-shared/shared.exp 2023-08-15 15:00:31.929701875 +0100
@@ -204,6 +204,10 @@ if { [istarget mips*-*-*] && ! [at_least
}
verbose "Using $picflag to compile PIC code"
+if { [istarget "i686-*-*"] } {
+ return
+}
+
# Compile the main program.
if ![ld_compile "$CC_FOR_TARGET $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o] {
unsupported "shared (non PIC)"
--- binutils.orig/ld/testsuite/ld-srec/srec.exp 2023-08-15 14:30:13.315890922 +0100
+++ binutils-2.41/ld/testsuite/ld-srec/srec.exp 2023-08-15 15:01:24.104806404 +0100
@@ -442,6 +442,9 @@ setup_xfail "csky*-*-*"
@ -1026,124 +1077,3 @@ diff -rup bin.orig/ld/testsuite/ld-x86-64/sframe-pltgot-2.d binutils-2.43.50-55e
if { [istarget sparc*-*-linux*] && [is_elf64 $tmpdir/mainnp.o] } {
setup_xfail "sparc*-*-linux*"
}
--- binutils.orig/ld/testsuite/ld-x86-64/x86-64.exp 2025-03-31 09:24:34.260146421 +0100
+++ binutils-with-gold-2.44.50-7109ea04ac7/ld/testsuite/ld-x86-64/x86-64.exp 2025-03-31 09:25:38.951438172 +0100
@@ -2167,7 +2167,6 @@ if { [isnative] && [check_compiler_avail
}
}
- undefined_weak "$DIRECT_EXTERN_ACCESS_CFLAGS $NOPIE_CFLAGS" "$NOPIE_LDFLAGS"
undefined_weak "-fPIE" "$NOPIE_LDFLAGS"
undefined_weak "-fPIE" "-pie"
undefined_weak "-fPIE" "$NOPIE_LDFLAGS -Wl,-z,nodynamic-undefined-weak"
--- binutils.orig/ld/testsuite/ld-shared/shared.exp 2025-03-31 11:25:50.792541423 +0100
+++ binutils-with-gold-2.44.50-7109ea04ac7/ld/testsuite/ld-shared/shared.exp 2025-03-31 11:27:36.680868036 +0100
@@ -205,6 +205,10 @@ if { [istarget mips*-*-*] && ! [at_least
}
verbose "Using $picflag to compile PIC code"
+if { [istarget "i686-*-*"] } {
+ return
+}
+
# Compile the main program.
global PLT_CFLAGS NOPIE_CFLAGS NOPIE_LDFLAGS
verbose "Using $NOPIE_CFLAGS to compile and $NOPIE_LDFLAGS to link non PIC code"
--- binutils.orig/ld/testsuite/ld-elf/shared.exp 2025-03-31 11:25:50.643275417 +0100
+++ binutils-with-gold-2.44.50-7109ea04ac7/ld/testsuite/ld-elf/shared.exp 2025-03-31 11:28:38.353212702 +0100
@@ -1612,18 +1612,6 @@ if { [istarget *-*-linux*]
"pr22393-2-static" \
"pass.out" \
] \
- [list \
- "Run pr21964-4" \
- "$NOPIE_LDFLAGS" \
- "" \
- {pr21964-4.c} \
- "pr21964-4" \
- "pass.out" \
- "$NOPIE_CFLAGS" \
- "" \
- "" \
- "-ldl" \
- ] \
]
}
--- fred/binutils/testsuite/binutils-all/objdump.exp 2026-02-16 09:03:27.457277379 +0000
+++ binutils-with-gold-2.46.50-2d306bf8a70/binutils/testsuite/binutils-all/objdump.exp 2026-02-16 09:03:30.592967621 +0000
@@ -957,7 +957,7 @@ proc test_objdump_S { } {
}
}
-test_objdump_S
+# test_objdump_S
# Test objdump --map-global-vars on file containing dwarf-2 encoding information.
diff -rup binutils.orig/ld/testsuite/ld-riscv-elf/data-reloc-rv32-pic.d binutils-with-gold-2.46/ld/testsuite/ld-riscv-elf/data-reloc-rv32-pic.d
--- binutils.orig/ld/testsuite/ld-riscv-elf/data-reloc-rv32-pic.d 2026-03-20 13:02:05.468700958 +0000
+++ binutils-with-gold-2.46/ld/testsuite/ld-riscv-elf/data-reloc-rv32-pic.d 2026-03-20 13:05:31.155200130 +0000
@@ -1,6 +1,6 @@
#source: data-reloc.s
#as: -march=rv32i -mabi=ilp32 -defsym __abs__=1 -defsym __addr__=1 -defsym __undef__=1
-#ld: -m[riscv_choose_ilp32_emul] -Ttext 0x8000 --defsym _start=0x0 --defsym abs=0x100 --defsym abs_local=0x200 -shared
+#ld: -m[riscv_choose_ilp32_emul] -Ttext 0x8000 --defsym _start=0x0 --defsym abs=0x100 --defsym abs_local=0x200 -shared -z notext
#objdump: -dR
.*:[ ]+file format .*
diff -rup binutils.orig/ld/testsuite/ld-riscv-elf/data-reloc-rv32-pie.d binutils-with-gold-2.46/ld/testsuite/ld-riscv-elf/data-reloc-rv32-pie.d
--- binutils.orig/ld/testsuite/ld-riscv-elf/data-reloc-rv32-pie.d 2026-03-20 13:02:05.468700958 +0000
+++ binutils-with-gold-2.46/ld/testsuite/ld-riscv-elf/data-reloc-rv32-pie.d 2026-03-20 13:05:52.846252771 +0000
@@ -1,6 +1,6 @@
#source: data-reloc.s
#as: -march=rv32i -mabi=ilp32 -defsym __abs__=1 -defsym __addr__=1
-#ld: -m[riscv_choose_ilp32_emul] -Ttext 0x8000 --defsym _start=0x0 --defsym abs=0x100 --defsym abs_local=0x200 -pie
+#ld: -m[riscv_choose_ilp32_emul] -Ttext 0x8000 --defsym _start=0x0 --defsym abs=0x100 --defsym abs_local=0x200 -pie -z notext
#objdump: -dR
.*:[ ]+file format .*
diff -rup binutils.orig/ld/testsuite/ld-riscv-elf/data-reloc-rv32-symbolic.d binutils-with-gold-2.46/ld/testsuite/ld-riscv-elf/data-reloc-rv32-symbolic.d
--- binutils.orig/ld/testsuite/ld-riscv-elf/data-reloc-rv32-symbolic.d 2026-03-20 13:02:05.468700958 +0000
+++ binutils-with-gold-2.46/ld/testsuite/ld-riscv-elf/data-reloc-rv32-symbolic.d 2026-03-20 13:06:01.427273593 +0000
@@ -1,6 +1,6 @@
#source: data-reloc.s
#as: -march=rv32i -mabi=ilp32 -defsym __abs__=1 -defsym __addr__=1 -defsym __undef__=1
-#ld: -m[riscv_choose_ilp32_emul] -Ttext 0x8000 --defsym _start=0x0 --defsym abs=0x100 --defsym abs_local=0x200 -shared -Bsymbolic
+#ld: -m[riscv_choose_ilp32_emul] -Ttext 0x8000 --defsym _start=0x0 --defsym abs=0x100 --defsym abs_local=0x200 -shared -Bsymbolic -z notext
#objdump: -dR
.*:[ ]+file format .*
diff -rup binutils.orig/ld/testsuite/ld-riscv-elf/data-reloc-rv64-pic.d binutils-with-gold-2.46/ld/testsuite/ld-riscv-elf/data-reloc-rv64-pic.d
--- binutils.orig/ld/testsuite/ld-riscv-elf/data-reloc-rv64-pic.d 2026-03-20 13:02:05.468700958 +0000
+++ binutils-with-gold-2.46/ld/testsuite/ld-riscv-elf/data-reloc-rv64-pic.d 2026-03-20 13:04:07.601997355 +0000
@@ -1,6 +1,6 @@
#source: data-reloc.s
#as: -march=rv64i -mabi=lp64 -defsym __64_bit__=1 -defsym __abs__=1 -defsym __addr__=1 -defsym __undef__=1
-#ld: -m[riscv_choose_lp64_emul] -Ttext 0x8000 --defsym _start=0x0 --defsym abs=0x100 --defsym abs_local=0x200 -shared
+#ld: -m[riscv_choose_lp64_emul] -Ttext 0x8000 --defsym _start=0x0 --defsym abs=0x100 --defsym abs_local=0x200 -shared -z notext
#objdump: -dR
.*:[ ]+file format .*
diff -rup binutils.orig/ld/testsuite/ld-riscv-elf/data-reloc-rv64-pie.d binutils-with-gold-2.46/ld/testsuite/ld-riscv-elf/data-reloc-rv64-pie.d
--- binutils.orig/ld/testsuite/ld-riscv-elf/data-reloc-rv64-pie.d 2026-03-20 13:02:05.468700958 +0000
+++ binutils-with-gold-2.46/ld/testsuite/ld-riscv-elf/data-reloc-rv64-pie.d 2026-03-20 13:04:57.106117494 +0000
@@ -1,6 +1,6 @@
#source: data-reloc.s
#as: -march=rv64i -mabi=lp64 -defsym __64_bit__=1 -defsym __abs__=1 -defsym __addr__=1
-#ld: -m[riscv_choose_lp64_emul] -Ttext 0x8000 --defsym _start=0x0 --defsym abs=0x100 --defsym abs_local=0x200 -pie
+#ld: -m[riscv_choose_lp64_emul] -Ttext 0x8000 --defsym _start=0x0 --defsym abs=0x100 --defsym abs_local=0x200 -pie -z notext
#objdump: -dR
.*:[ ]+file format .*
diff -rup binutils.orig/ld/testsuite/ld-riscv-elf/data-reloc-rv64-symbolic.d binutils-with-gold-2.46/ld/testsuite/ld-riscv-elf/data-reloc-rv64-symbolic.d
--- binutils.orig/ld/testsuite/ld-riscv-elf/data-reloc-rv64-symbolic.d 2026-03-20 13:02:05.468700958 +0000
+++ binutils-with-gold-2.46/ld/testsuite/ld-riscv-elf/data-reloc-rv64-symbolic.d 2026-03-20 13:05:14.650160073 +0000
@@ -1,6 +1,6 @@
#source: data-reloc.s
#as: -march=rv64i -mabi=lp64 -defsym __64_bit__=1 -defsym __abs__=1 -defsym __addr__=1 -defsym __undef__=1
-#ld: -m[riscv_choose_lp64_emul] -Ttext 0x8000 --defsym _start=0x0 --defsym abs=0x100 --defsym abs_local=0x200 -shared -Bsymbolic
+#ld: -m[riscv_choose_lp64_emul] -Ttext 0x8000 --defsym _start=0x0 --defsym abs=0x100 --defsym abs_local=0x200 -shared -Bsymbolic -z notext
#objdump: -dR
.*:[ ]+file format .*

View file

@ -6,8 +6,8 @@ Name: binutils%{?_with_debug:-debug}
# A version number of X.XX.90 is a pre-release snapshot.
# The variable %%{source} (see below) should be set to indicate which of these
# origins is being used.
Version: 2.47.50
Release: 7%{?dist}
Version: 2.44
Release: 12%{?dist}
License: GPL-3.0-or-later AND (GPL-3.0-or-later WITH Bison-exception-2.2) AND (LGPL-2.0-or-later WITH GCC-exception-2.0) AND BSD-3-Clause AND GFDL-1.3-or-later AND GPL-2.0-or-later AND LGPL-2.1-or-later AND LGPL-2.0-or-later
URL: https://sourceware.org/binutils
@ -22,12 +22,11 @@ URL: https://sourceware.org/binutils
# --with debug Build without optimizations and without splitting the debuginfo into a separate file.
# --without debuginfod Disable support for debuginfod.
# --without docs Skip building documentation. Default is with docs, except when building a cross binutils.
# --with gold Enable the building of the GOLD linker.
# --without gold Disable building of the GOLD linker.
# --without gprofng Do not build the GprofNG profiler.
# --without systemzlib Use the binutils version of zlib. Default is to use the system version.
# --without testsuite Do not run the testsuite. Default is to run it.
# --without xxhash Do not link against the xxhash library.
# --without zstd Do not link against the zstd library.
# Other configuration options can be set by modifying the following defines.
@ -87,45 +86,30 @@ URL: https://sourceware.org/binutils
# Enable the use of separate code and data segments. Whilst potentially
# useful from a security point of view, it is problematic from a file
# size point of view. So for now, only enable it for the i686, x86_64
# and riscv64 architectures as these are the ones that have the most
# potential vulnerability.
# size point of view. So for now, only enable it for the i686 and x86_64
# architectures as these are the ones that have the most potential
# vulnerability.
%ifarch %{ix86} x86_64 riscv64
%define enable_separate_code 1
%else
%define enable_separate_code 0
%endif
# Enable the creation of relocations against the contents of read-only
# sections (such as .text). This is a security vulnerability, so it is
# disabled here by default.
# Note - the upstream GNU Binutils sources enable the generation of this
# kind of relocation by default, so this is a difference between Ferdora
# and upstream.
%define enable_textrel 0
# Indicate where the sources come from.
#
# Official releases come from: https://ftp.gnu.org/gnu/binutils
# Pre releases come from: https://sourceware.org/pub/binutils/snapshots/
# (Even numbered pre releases include gold)
# Snapshots come from: https://snapshots.sourceware.org/binutils/trunk/
# and are turned into commits by following this process:
# Tarballs are made by hand following a process outlined in this document:
# https://fedoraproject.org/wiki/BinutilsRawhideSync
# Tarballs are made by hand as and when necessary.
#
# Note - the Linux Kernel binutils releases are too unstable and contain
# too many controversial patches so we stick with the official GNU version
# instead.
#
# Note - there is a confusing misnomer in the URL for the pre-release tarballs.
# They are a "snapshot" of the about to be released branch sources, rather than
# a snapshot of the mainline development sources.
# %%define source official-release
# %%define source even-pre-release
# %%define source odd-pre-release
%define source snapshot
%define source official-release
# %%define source pre-release
# %%define source snapshot
# %%define source tarball
# For snapshots and tarballs an extension is used to indicate the commit ID.
@ -133,51 +117,41 @@ URL: https://sourceware.org/binutils
# correctly. Note %%(echo) is used because you cannot directly set a
# spec variable to a hexadecimal string value.
%define commit_id %(echo "48c933a69a8")
# %%define commit_id %%(echo "f832531609d")
#----End of Configure Options------------------------------------------------
# Default: Not bootstrapping.
%bcond bootstrap 0
%bcond_with bootstrap
# Default: Not debug
%bcond debug 0
%bcond_with debug
# Default: support debuginfod.
%bcond debuginfod 1
%bcond_without debuginfod
# Default: Always build documentation.
%bcond docs 1
%bcond_without docs
# Default: build binutils-gprofng package.
%bcond gprofng 1
%bcond_without gprofng
# Default: Use the system supplied version of the zlib compression library.
%bcond systemzlib 1
%bcond_without systemzlib
# Default: Always run the testsuite.
%bcond testsuite 1
%bcond_without testsuite
# Default: Use the xxhash-devel library.
%bcond xxhash 1
# Default: Use the libztsd-devel library.
%bcond zstd 1
# Default: Do not create cross targeted versions of the binutils.
%bcond crossbuilds 0
%bcond_without xxhash
# GOLD is deprecated in RHEL-11+ and Fedora 46+
%if 0%{?rhel} >= 11
%bcond gold 0
%elif 0%{?fedora} >= 46
%bcond gold 0
# Note - in the future the gold linker may become deprecated.
%ifnarch riscv64
%bcond_without gold
%else
# Gold does not support the RISC-V architecture.
%ifarch riscv64
%bcond gold 0
%else
%bcond gold 1
%endif
# RISC-V does not have ld.gold thus disable by default.
%bcond_with gold
%endif
# Allow the user to override the compiler used to build the binutils.
# The default build compiler is gcc if %%toolchain is not clang.
%if "%toolchain" == "clang"
%bcond clang 1
%bcond_without clang
%else
%bcond clang 0
%bcond_with clang
%endif
%if %{with clang}
@ -186,6 +160,10 @@ URL: https://sourceware.org/binutils
%global toolchain gcc
%endif
# (Do not) create cross targeted versions of the binutils.
%bcond_with crossbuilds
# %%bcond_without crossbuilds
%if %{with bootstrap}
%undefine with_docs
%undefine with_testsuite
@ -213,35 +191,23 @@ URL: https://sourceware.org/binutils
# its debug informnation.
%undefine __brp_strip_static_archive
# ODD numbered upstream GNU Binutils releases do not include the sources
# for the GOLD linker, so we use a snapshot from the mainline development
# sources instead - but only for GOLD, not for the rest of the binutils.
# FIXME: Delete this once the gold linker is fully deprecated.
# %%define gold_tarball %%(echo "binutils-with-gold-2.46.50-f85ff0c4bce")
%define gold_tarball none
#----------------------------------------------------------------------------
%if "%{source}" == "official-release"
# Source0: https://ftp.gnu.org/gnu/binutils/binutils-with-gold-%%{version}.tar.xz
Source0: https://ftp.gnu.org/gnu/binutils/binutils-%{version}.tar.xz
%elif "%{source}" == "even-pre-release"
Source0: binutils-with-gold-%{version}.tar.xz
%elif "%{source}" == "odd-pre-release"
%if "%{source}" == "tarball"
Source0: binutils-%{version}-%{commit_id}.tar.xz
%endif
%if "%{source}" == "snapshot"
Source0: binutils-%{version}-%{commit_id}.tar.xz
%endif
%if "%{source}" == "pre-release"
Source0: binutils-%{version}.tar.xz
%elif "%{source}" == "snapshot"
Source0: binutils-with-gold-%{version}-%{commit_id}.tar.xz
%elif "%{source}" == "tarball"
Source0: binutils-with-gold-%{version}-%{commit_id}.tar.xz
%endif
%if "%{source}" == "official-release"
Source0: https://ftp.gnu.org/gnu/binutils/binutils-with-gold-%{version}.tar.xz
%endif
Source1: binutils-2.19.50.0.1-output-format.sed
%if "%{gold_tarball}" != "none"
Source2: %{gold_tarball}.tar.xz
%endif
#----------------------------------------------------------------------------
# Purpose: Use /lib64 and /usr/lib64 instead of /lib and /usr/lib in the
@ -292,82 +258,119 @@ Patch06: binutils-2.27-aarch64-ifunc.patch
# Lifetime: Permanent.
Patch07: binutils-do-not-link-with-static-libstdc++.patch
# Purpose: Allow the binutils to be configured with any (recent) version of
# autoconf.
# Lifetime: Fixed in 2.46 (maybe ?)
Patch08: binutils-autoconf-version.patch
# Purpose: Stop libtool from inserting useless runpaths into binaries.
# Lifetime: Who knows.
Patch09: binutils-libtool-no-rpath.patch
# Purpose: Fix binutils testsuite failures.
# Lifetime: Permanent, but varies with each rebase.
Patch10: binutils-testsuite-fixes.patch
# Purpose: Fix binutils testsuite failures for the RISCV-64 target.
# Lifetime: Permanent, but varies with each rebase.
Patch11: binutils-riscv-testsuite-fixes.patch
# Purpose: Fix the ar test of non-deterministic archives.
# Lifetime: Fixed in 2.46
Patch12: binutils-fix-ar-test.patch
# Purpose: Fix a seg fault in the AArch64 linker when building u-boot.
# Lifetime: Fixed in 2.46
Patch13: binutils-aarch64-small-plt0.patch
%if %{with gold}
# Purpose: Make the GOLD linker ignore the "-z pack-relative-relocs" command line option.
# Lifetime: Fixed in 2.46 (maybe)
Patch14: binutils-gold-pack-relative-relocs.patch
# Purpose: Let the gold linker ignore --error-execstack and --error-rwx-segments.
# Lifetime: Fixed in 2.46 (maybe)
Patch15: binutils-gold-ignore-execstack-error.patch
# Purpose: Stop gold from aborting when input sections with the same name
# have different flags.
# Lifetime: Fixed in 2.43 (maybe)
Patch16: binutils-gold-mismatched-section-flags.patch
Patch08: binutils-gold-mismatched-section-flags.patch
# Purpose: Change the gold configuration script to only warn about
# unsupported targets. This allows the binutils to be built with
# BPF support enabled.
# Lifetime: Permanent.
Patch17: binutils-gold-warn-unsupported.patch
Patch09: binutils-gold-warn-unsupported.patch
# Purpose: Enable the creation of .note.gnu.property sections by the GOLD
# linker for x86 binaries.
# Lifetime: Permanent.
Patch18: binutils-gold-i386-gnu-property-notes.patch
Patch10: binutils-gold-i386-gnu-property-notes.patch
# Purpose: Allow the binutils to be configured with any (recent) version of
# autoconf.
# Lifetime: Fixed in 2.44 (maybe ?)
Patch11: binutils-autoconf-version.patch
# Purpose: Stop libtool from inserting useless runpaths into binaries.
# Lifetime: Who knows.
Patch12: binutils-libtool-no-rpath.patch
# Purpose: Stop an abort when using dwp to process a file with no dwo links.
# Lifetime: Fixed in 2.46 (maybe)
Patch19: binutils-gold-empty-dwp.patch
# Lifetime: Fixed in 2.44 (maybe)
Patch13: binutils-gold-empty-dwp.patch
# Purpose: Enable building the gold linker with the target is s390x-linux.
# Lifetime: Fixed in 2.48 (maybe)
Patch20: binutils-gold-s390-configure.patch
# Purpose: Fix binutils testsuite failures.
# Lifetime: Permanent, but varies with each rebase.
Patch14: binutils-testsuite-fixes.patch
%endif
# Purpose: Fix binutils testsuite failures for the RISCV-64 target.
# Lifetime: Permanent, but varies with each rebase.
Patch15: binutils-riscv-testsuite-fixes.patch
# Purpose: Fix ld testsuite failures when enable_textrel is set.
# Lifetime: Permanent.
Patch21: binutils-ld-default-z-text.patch
# Purpose: Make the GOLD linker ignore the "-z pack-relative-relocs" command line option.
# Lifetime: Fixed in 2.44 (maybe)
Patch16: binutils-gold-pack-relative-relocs.patch
# Purpose: Let the gold linker ignore --error-execstack and --error-rwx-segments.
# Lifetime: Fixed in 2.44 (maybe)
Patch17: binutils-gold-ignore-execstack-error.patch
# Purpose: Fix the ar test of non-deterministic archives.
# Lifetime: Fixed in 2.44
Patch18: binutils-fix-ar-test.patch
# Purpose: Fix a seg fault in the AArch64 linker when building u-boot.
# Lifetime: Fixed in 2.45
Patch19: binutils-aarch64-small-plt0.patch
# Purpose: Stops excessive memory use when copying corrupt files.
# Lifetime: Fixed in 2.45
Patch20: binutils-CVE-2025-7545.patch
# Purpose: Stops illegal memory access when parsing corrupt files.
# Lifetime: Fixed in 2.45
Patch21: binutils-CVE-2025-7546.patch
# Purpose: Stops a potential null pointer dereference when generating sframe
# information in the assembler.
# Lifetime: Fixed in 2.45
Patch22: binutils-sframe-PR32879.patch
# Purpose: Stops a potential null pointer dereference when examining corrupt
# DWARF debug information.
# Lifetime: Fixed in 2.45
Patch23: binutils-CVE-2025-8224.patch
# Purpose: Stops a potential illegal memory access when linking a corrupt
# input file. PR 33457
# Lifetime: Fixed in 2.46
Patch24: binutils-CVE-2025-11083.patch
# Purpose: Stops a potential illegal memory access when linking a corrupt
# input file. PR 33464
# Lifetime: Fixed in 2.46
Patch25: binutils-CVE-2025-11082.patch
# Purpose: Stops a potential illegal memory access when linking a corrupt
# input file. PR 33451
# Lifetime: Fixed in 2.46
Patch26: binutils-CVE-2025-11495.patch
# Purpose: Stops a potential illegal memory access when linking a corrupt
# input file. PR 33499
# Lifetime: Fixed in 2.46
Patch27: binutils-CVE-2025-11494.patch
# Purpose: Stops a potential illegal memory access when linking a corrupt
# input file. PR 33455
# Lifetime: Fixed in 2.46
Patch28: binutils-CVE-2025-11840.patch
# Purpose: Stops a potential call to abort when displaying the debug info
# of a corrupt input file. PR 33448
# Lifetime: Fixed in 2.46
Patch29: binutils-CVE-2025-11839.patch
#----------------------------------------------------------------------------
# Purpose: Remove the Build protected-func-2 without PIE linker tests
# as these are currently failing.
# Lifetime: TEMPORARY - should be fixed by the 2.46 release.
Patch98: binutils-remove-ld-protected-func-2-test.patch
# Purpose: Suppress the x86 linker's p_align-1 tests due to kernel bug on CentOS-10.
# Purpose: Suppress the x86 linker's p_align-1 tests due to kernel bug on CentOS-10
# Lifetime: TEMPORARY
Patch99: binutils-suppress-ld-align-tests.patch
# Purpose: Disable GCS warnings when shared dependencies are not built with GCS
# support
# Lifetime: TEMPORARY
Patch100: binutils-disable-gcs-report-dynamic.patch
Patch101: binutils-disable-gcs-report-dynamic-tests.patch
#----------------------------------------------------------------------------
Provides: bundled(libiberty)
@ -382,9 +385,6 @@ Provides: bundled(libiberty)
# Perl, sed and touch are all used in the %%prep section of this spec file.
BuildRequires: autoconf, automake, perl, sed, coreutils, make
# Bison is used to generate gold/yyscript.c and ld/ldgram.c.
BuildRequires: bison
%if %{with clang}
BuildRequires: clang compiler-rt
%else
@ -392,8 +392,8 @@ BuildRequires: gcc
%endif
%if %{with gold}
# The GOLD testsuite needs a static libc++
BuildRequires: libstdc++-static
# Gold needs bison in order to build gold/yyscript.c. The GOLD testsuite needs a static libc++
BuildRequires: bison, m4, gcc-c++, libstdc++-static
%if ! %{with clang}
BuildRequires: gcc-c++
@ -435,15 +435,20 @@ BuildRequires: elfutils-debuginfod-client-devel
BuildRequires: xxhash-devel
%endif
%if %{with zstd}
BuildRequires: libzstd-devel
%endif
Requires(post): %{_sbindir}/alternatives
Requires(preun): %{_sbindir}/alternatives
# We also need rm.
Requires(post): coreutils
# %%if %%{with gold}
# # For now we make the binutils package require the gold sub-package.
# # That way other packages that have a requirement on "binutils" but
# # actually want gold will not have to be changed. In the future, if
# # we decide to deprecate gold, we can remove this requirement, and
# # then update other packages as necessary.
# Requires: binutils-gold >= %%{version}
# %%endif
# On ARM EABI systems, we do want -gnueabi to be part of the
# target triple.
%ifnarch %{arm}
@ -505,9 +510,7 @@ using libelf instead of BFD.
%package gold
Summary: The GOLD linker, a faster alternative to the BFD linker
# The GOLD linker is now deprecated as it is not being developed upstream.
# For more details see: https://fedoraproject.org/wiki/Changes/DeprecateGoldLinker
Provides: deprecated()
Provides: gold = %{version}-%{release}
Requires: binutils >= %{version}
%description gold
@ -532,6 +535,7 @@ linker, and it may become deprecated in the future.
Summary: Next Generating code profiling tool
Provides: gprofng = %{version}-%{release}
Requires: binutils = %{version}-%{release}
BuildRequires: bison
%description gprofng
GprofNG is the GNU Next Generation Profiler for analyzing the performance
@ -616,37 +620,19 @@ use by developers. It is NOT INTENDED FOR PRODUCTION use.
%prep
%if "%{gold_tarball}" != "none"
%setup -q -n binutils-%{version} -a 0
%if %{with gold}
%setup -q -n binutils-%{version} -D -b 2
mv ../%{gold_tarball}/gold .
mv ../%{gold_tarball}/elfcpp .
%endif
%autopatch -p1
%elif "%{source}" == "snapshot"
%autosetup -p1 -n binutils-with-gold-%{version}-%{commit_id}
%if "%{source}" == "snapshot"
%autosetup -p1 -n binutils-%{version}-%{commit_id}
%elif "%{source}" == "official-release"
%autosetup -p1 -n binutils-with-gold-%{version}
%elif "%{source}" == "even-pre-release"
%autosetup -p1 -n binutils-with-gold-%{version}
%elif "%{source}" == "odd-pre-release"
%autosetup -p1 -n binutils-%{version}
%else
%autosetup -p1 -n binutils-with-gold-%{version}
%autosetup -p1 -n binutils-%{version}
%endif
# On ppc64 and aarch64, we might use 64KiB pages
sed -i -e '/#define.*ELF_COMMONPAGESIZE/s/0x1000$/0x10000/' bfd/elf*ppc.c
sed -i -e '/#define.*ELF_COMMONPAGESIZE/s/0x1000$/0x10000/' bfd/elf*aarch64.c
%if %{with gold}
sed -i -e '/common_pagesize/s/4 /64 /' gold/powerpc.cc
sed -i -e '/pagesize/s/0x1000,/0x10000,/' gold/aarch64.cc
%endif
# LTP sucks
perl -pi -e 's/i\[3-7\]86/i[34567]86/g' */conf*
@ -725,14 +711,6 @@ compute_global_configuration()
%if %{with xxhash}
CARGS="$CARGS --with-xxhash=yes"
%else
CARGS="$CARGS --with-xxhash=no"
%endif
%if %{with zstd}
CARGS="$CARGS --with-zstd=yes"
%else
CARGS="$CARGS --with-zstd=no"
%endif
%if %{default_compress_debug}
@ -800,18 +778,16 @@ compute_global_configuration()
CARGS="$CARGS --enable-threads=no"
%endif
%if %{enable_textrel}
CARGS="$CARGS --enable-textrel-check=no"
%else
CARGS="$CARGS --enable-textrel-check=error"
%endif
# The binutils build system enables -Werror by default, which is a problem
# because there is a known issue with the libiberty library sources:
%if "%{source}" != "official-release"
# Since non official release tarballs are created directly from development
# sources they will have "development=true" set in the bfd/development.sh file.
# This enables -Werror by default, which is a problem because there is a
# known issue with the libiberty library:
# libiberty/cp-demangle.c: In function 'd_demangle_callback.constprop':
# libiberty/cp-demangle.c:6794:1: error: stack usage might be unbounded [-Werror=stack-usage=]
# So we explicitly disable werror for builds.
# So we explicitly disable werror for builds from these tarballs.
CARGS="$CARGS --enable-werror=no"
%endif
}
# run_target_configuration()
@ -836,13 +812,10 @@ run_target_configuration()
%set_build_flags
%if %{enable_lto}
# RHEL-121799: Builders may want to restrict the number of CPUs used by
# the LTO compiler. The normal way to do this is to set RPM_BUILD_NCPUS.
# But this only affects the -j option passed to make. By adding -flto=N
# we can also restrict the number of threads used by the LTO compiler.
export CFLAGS="$RPM_OPT_FLAGS -flto=$RPM_BUILD_NCPUS"
%endif
export CFLAGS="$RPM_OPT_FLAGS"
# Some GNU extensions to the C11 standard are used.
export CFLAGS="$CFLAGS -std=gnu11"
%ifarch %{power64}
export CFLAGS="$CFLAGS -Wno-error"
@ -855,10 +828,6 @@ run_target_configuration()
export CXXFLAGS="$CXXFLAGS $CFLAGS"
# Some GNU extensions to the C11 standard are used.
# Note set here as -std=gnu11 is not a valid G++ command line option.
export CFLAGS="$CFLAGS -std=gnu11"
# BZ 1541027 - include the linker flags from redhat-rpm-config as well.
export LDFLAGS=$RPM_LD_FLAGS
@ -876,8 +845,12 @@ run_target_configuration()
#
# Also enable the BPF target so that strip will work on BPF files.
case $target in
s390x*)
TARGS="--enable-targets=s390x-linux,x86_64-pep,bpf-unknown-none"
s390*)
# Note - The s390-linux target is there so that the GOLD linker will
# build. By default, if configured for just s390x-linux, the GOLD
# configure system will only include support for 64-bit targets, but
# the s390x gold backend uses both 32-bit and 64-bit templates.
TARGS="--enable-targets=s390-linux,s390x-linux,x86_64-pep,bpf-unknown-none"
;;
ia64*)
TARGS="--enable-targets=ia64-linux,x86_64-pep,bpf-unknown-none"
@ -1262,12 +1235,10 @@ EOH
cat ld.lang >> binutils.lang
fi
%if %{with gold}
if [ -x gold/ld-new ]; then
%find_lang gold
cat gold.lang >> binutils.lang
fi
%endif
popd
}
@ -1376,8 +1347,8 @@ exit 0
%{_bindir}/[!l]*
# %%verify(symlink) does not work for some reason, so using "owner" instead.
%verify(owner) %{_bindir}/ld
# %%verify(mtime) does not work, probably because of the alternatives command in the %%post stage, so using "not mtime" instead. (#2277349)(RHEL-238406)
%verify(not mtime) %{_bindir}/ld.bfd
# %%verify(mtime) does not work, probably because of the alternatives command in the %%post stage, so using "owner" instead. (#2277349)
%verify(owner) %{_bindir}/ld.bfd
%if %{with gprofng}
%exclude %{_bindir}/gp-*
@ -1503,202 +1474,33 @@ exit 0
#----------------------------------------------------------------------------
%changelog
* Fri Sep 04 2026 Nick Clifton <nickc@redhat.com> - 2.47.50-7
- Disable the gold linker by default.
* Mon Oct 13 2025 Nick Clifton <nickc@redhat.com> - 2.44-12
- Stop a potential call to abort when display the debug information of a corrupt input file. (#2404504)
* Tue Sep 01 2026 Nick Clifton <nickc@redhat.com> - 2.47.50-6
- Rebase to commit 48c933a69a8
* Mon Oct 13 2025 Nick Clifton <nickc@redhat.com> - 2.44-11
- Stop a potential illegal memory access when linking a corrupt input file. (#2404553)
* Tue Sep 01 2026 Jesus Checa Hidalgo <jchecahi@redhat.com> - 2.47.50-5
- Fix logic to enable and disable gold linker.
* Mon Oct 13 2025 Nick Clifton <nickc@redhat.com> - 2.44-10
- Stop a potential illegal memory access when linking a corrupt input file. (#2402842)
* Wed Aug 19 2026 Nick Clifton <nickc@redhat.com> - 2.47.50-4
- Rebase to bring in commits d9ab6e42e739fe826b02a5f868586132ea2d893a and
- 0f9faaebc91bc1886a563bde6c178601b4be743b, thus fixing CVE-2026-19548. (#2514618)
* Fri Oct 10 2025 Nick Clifton <nickc@redhat.com> - 2.44-9
- Stop a potential illegal memory access when linking a corrupt input file. (#2402839)
* Thu Aug 13 2026 Nick Clifton <nickc@redhat.com> - 2.47.50-3
- Switch from using %%bcond_with and %%bcond_without to just %%bcond <0|1>
* Fri Oct 03 2025 Nick Clifton <nickc@redhat.com> - 2.44-8
- Stop a potential illegal memory access when linking a corrupt input file. (#2400342)
* Thu Aug 13 2026 Nick Clifton <nickc@redhat.com> - 2.47.50-2
- Re-enable the gold linker - for now - for Rawhide.
* Thu Oct 02 2025 Nick Clifton <nickc@redhat.com> - 2.44-7
- Stop a potential illegal memory access when linking a corrupt input file. (#2400338)
* Wed Aug 12 2026 Nick Clifton <nickc@redhat.com> - 2.47.50-1
- Rebase to commit 4e8ba93fdb2.
- Disable the gold linker for Rawhide as well.
* Tue Jul 29 2025 Nick Clifton <nickc@redhat.com> - 2.44-6
- Stop a potential null pointer dereference when examining corrupt DWARF debug information. (#2383860) (#2383873)
* Wed Aug 12 2026 Yaakov Selkowitz <yselkowi@redhat.com>
- Disable the gold linker by default for RHEL-11+.
* Mon Jul 21 2025 Nick Clifton <nickc@redhat.com> - 2.44-5
- Stop a potential null pointer dereference when generating sframe information. (#1282126)
* Mon Jul 27 2026 Nick Clifton <nickc@redhat.com> - 2.47-1
- Rebase to 2.47 release.
* Wed Jul 15 2026 Fedora Release Engineering <releng@fedoraproject.org> - 2.46.90-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
* Mon Jul 13 2026 Nick Clifton <nickc@redhat.com> - 2.46.90-1
- Rebase to 2.47 pre-release tarball.
* Thu Jun 25 2026 Nick Clifton <nickc@redhat.com> - 2.46.50-12
- Rebase to commit f85ff0c4bce
* Thu Jun 11 2026 Nick Clifton <nickc@redhat.com> - 2.46.50-11
- Fix linker testsuite problem for Risc-V.
* Thu Jun 04 2026 Nick Clifton <nickc@redhat.com> - 2.46.50-10
- Rebase to commit 48997323b0f
* Thu May 14 2026 Nick Clifton <nickc@redhat.com> - 2.46.50-9
- Rebase to commit 2ea3f3a7ac2
* Fri Apr 24 2026 Nick Clifton <nickc@redhat.com> - 2.46.50-8
- Rebase to commit 991cf245839.
* Wed Apr 08 2026 Nick Clifton <nickc@redhat.com> - 2.45.50-7
- Add support for zstd compression. (#2454341)
* Tue Apr 07 2026 Nick Clifton <nickc@redhat.com> - 2.46.50-6
- Rebase to commit c220f3ab8c0
* Mon Mar 30 2026 Nick Clifton <nickc@redhat.com> - 2.46.50-5
- Rebase to commit c220f3ab8c0
* Fri Mar 20 2026 Nick Clifton <nickc@redhat.com> - 2.46.50-4
- Fix Risc-V linker testsuite failures caused by #2428281.
* Mon Mar 16 2026 Nick Clifton <nickc@redhat.com> - 2.46.50-3
- Rebase to commit d712202846b.
* Mon Mar 02 2026 Nick Clifton <nickc@redhat.com> - 2.46.50-2
- Rebase to commit dd9a411627a.
* Mon Feb 16 2026 Nick Clifton <nickc@redhat.com> - 2.46.50-1
- Rebase to commit 2d306bf8a70
* Mon Feb 09 2026 Nick Clifton <nickc@redhat.com> - 2.46-1
- Rebase to GNU Binutils 2.46.
* Tue Jan 27 2026 Nick Clifton <nickc@redhat.com> - 2.45.90-1
- Rebase to pre-release snapshot.
* Mon Jan 19 2026 Nick Clifton <nickc@redhat.com> - 2.45.50-19
- Rebase to commit ba5838a98fb
* Fri Jan 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 2.45.50-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
* Fri Jan 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 2.45.50-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
* Thu Jan 15 2026 Nick Clifton <nickc@redhat.com> - 2.45.50-16
- Remove experimental Risc-V patch added with -12 revision.
* Tue Jan 13 2026 Nick Clifton <nickc@redhat.com> - 2.45.50-15
- Disallow the creation of shared object that use text relocations. (#2428281)
* Fri Jan 09 2026 Nick Clifton <nickc@redhat.com> - 2.45.50-14
- Fix Risc-V related test failures caused by -12 revision.
* Mon Jan 05 2026 Nick Clifton <nickc@redhat.com> - 2.45.50-13
- Rebase to commit be970c68891
* Thu Dec 18 2025 Nick Clifton <nickc@redhat.com> - 2.45.50-12
- Fix compile time warning messages about discarded qualifiers.
- Change Risc-V assembler to default to disabling relaxation.
* Mon Dec 08 2025 Nick Clifton <nickc@redhat.com> - 2.45.50-11
- Rebase to commit 8e992ccb1e4
* Thu Dec 04 2025 Nick Clifton <nickc@redhat.com> - 2.45.50-10
- Fix testsuite failures for Risc-V target.
* Mon Nov 24 2025 Nick Clifton <nickc@redhat.com> - 2.45.50-9
- Rebase to commit beab972c07d
- Revert patches for PR 33577
* Tue Nov 11 2025 Nick Clifton <nickc@redhat.com> - 2.45.50-8
- Rebase to commit 96b8a8a633a
* Tue Nov 04 2025 Nick Clifton <nickc@redhat.com> - 2.45.50-7
- Pass -flto=$RPM_BUILD_NCPUS in CFLAGS. (RHEL-121799)
* Tue Oct 28 2025 Nick Clifton <nickc@redhat.com> - 2.45.50-6
- Rebase to commit 2006dea18d5
* Mon Oct 06 2025 Nick Clifton <nickc@redhat.com> - 2.45.50-5
- Rebase to commit b05d1d89605
* Tue Sep 09 2025 Nick Clifton <nickc@redhat.com> - 2.45.50-4
- Enhance the riscv-64 zicfilp-unlabeled-plt test to cope with larger offsets.
* Mon Sep 08 2025 Nick Clifton <nickc@redhat.com> - 2.45.50-3
- Rebase to commit 79b2b564fec
* Tue Aug 19 2025 Nick Clifton <nickc@redhat.com> - 2.45.50-2
- Rebase to commit 7e432e93f8a (previous rebase appears to be broken)
* Mon Aug 18 2025 Nick Clifton <nickc@redhat.com> - 2.45.50-1
- Rebase to commit 570f4c0c119.
* Fri Aug 15 2025 Nick Clifton <nickc@redhat.com> - 2.45-3
- Oops - the gold linker was disabled too soon, re-enabling.
* Wed Aug 13 2025 Nick Clifton <nickc@redhat.com> - 2.45-2
- Disable building of gold by default. Ref: https://fedoraproject.org/wiki/Changes/DeprecateGoldLinker
* Mon Jul 28 2025 Nick Clifton <nickc@redhat.com> - 2.45-1
- Rebase to official GNU Binutils 2.45 release.
* Fri Jul 25 2025 Nick Clifton <nickc@redhat.com> - 2.44.90-4
- Properly handle LLVM IR bitcodes. (#2382341) (PR 33198)
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.44.90-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Tue Jul 22 2025 Nick Clifton <nickc@redhat.com> - 2.44.90-2
- Improve strip's handling of archives containing bitcodes. (#2382341)
* Mon Jul 14 2025 Nick Clifton <nickc@redhat.com> - 2.44.90-1
- Rebase to 2.45 pre-release snapshot.
* Mon Jul 07 2025 Nick Clifton <nickc@redhat.com> - 2.44.50-13
- Rebase to commit 21e608528c3
* Mon Jun 23 2025 Nick Clifton <nickc@redhat.com> - 2.44.50-12
- Rebase to commit 28b75d9dcb8
* Mon Jun 09 2025 Nick Clifton <nickc@redhat.com> - 2.44.50-11
- Rebase to commit a259da93f3c
* Tue May 27 2025 Nick Clifton <nickc@redhat.com> - 2.44.50-10
- Rebase to commit d13aaae402f
* Mon May 12 2025 Nick Clifton <nickc@redhat.com> - 2.44.50-9
- Rebase to commit 8dc4e62fc94
* Mon Apr 14 2025 Nick Clifton <nickc@redhat.com> - 2.44.50-8
- Rebase to commit 6ef74a3985b
* Thu Apr 10 2025 Andrea Bolognani <abologna@redhat.com> - 2.44.50-7
- Fix BuildRequires on bison
* Wed Apr 02 2025 Nick Clifton <nickc@redhat.com> - 2.44.50-6
- Deprecate the GOLD linker.
* Mon Mar 31 2025 Nick Clifton <nickc@redhat.com> - 2.44.50-5
- Rebase to commit 7109ea04ac7
* Mon Mar 17 2025 Nick Clifton <nickc@redhat.com> - 2.44.50-4
- Rebase to commit a07c8b3a73c
* Mon Mar 03 2025 Nick Clifton <nickc@redhat.com> - 2.44.50-3
- Rebase to commit 56a0188548e
* Wed Feb 26 2025 Nick Clifton <nickc@redhat.com> - 2.44.50-2
- Renumber patches.
- Add -std=gnu11 to CFLAGS to support the use of static_assert in the sources.
* Tue Feb 18 2025 Nick Clifton <nickc@redhat.com> - 2.44.50-1
- Rebase to commit 1256b9860f3
* Mon Jul 14 2025 Nick Clifton <nickc@redhat.com> - 2.44-4
- Stop excessive memory allocation when copying corrupt files. (#2379837)
- Stop illegal memory access when parsing corrupt files. (#2379844)
* Fri Feb 07 2025 Nick Clifton <nickc@redhat.com> - 2.44-3
- Fix seg fault in AArch64 linker when building u-boot. (#2326190)

View file

@ -5,14 +5,14 @@
/common:
plan:
import:
url: https://gitlab.com/redhat/centos-stream/tests/binutils.git
url: https://src.fedoraproject.org/tests/binutils.git
ref: main
name: /plans/build-gating/common
/kernel-rebuild:
plan:
import:
url: https://gitlab.com/redhat/centos-stream/tests/binutils.git
url: https://src.fedoraproject.org/tests/binutils.git
ref: main
name: /plans/build-gating/kernel-rebuild

View file

@ -5,7 +5,7 @@
/common:
plan:
import:
url: https://gitlab.com/redhat/centos-stream/tests/binutils.git
url: https://src.fedoraproject.org/tests/binutils.git
ref: main
name: /plans/regression

View file

@ -1,2 +1,2 @@
SHA512 (binutils-with-gold-2.47.50-48c933a69a8.tar.xz) = c4300e4881227c431c0bbbb949a5ee5bc113701f993766418b152df7d46d9df378ebace9efffcb6e1f0b7e72ad716bbcccf5b6aa55851dc28216555b242d18a0
SHA512 (binutils-with-gold-2.44.tar.xz) = 1d8688f1b6f1bc64cfd1f82e3af05b8ace1d709d4fa819acb4d12d74e1b69b4314d98fb4281dacc9b5fa51ff7370d0249f540ec016fd137aa701502d72426301
SHA512 (binutils-2.19.50.0.1-output-format.sed) = 2f8686b0c8af13c98cda056824c2820416f6e2d003f70b78ccf5314525b9ee3684d421dfa83e638a2d42d06ea4d4bdaf5226b64d6ec26f7ff59c44ffb2a23dd2