- Add support for PowerPC v11 architecture extensions.

Rebase to GNU Binutils 2.42.
- Retire: binutils-BPF-reloc-4.patch
- Retire: binutils-Intel-APX-part-1.patch
- Retire: binutils-aarch64-big-bti-programs.patch
- Retire: binutils-big-merge.patch
- Retire: binutils-demangler-updates.patch
- Retire: binutils-execstack-error.patch
- Retire: binutils-gold-powerpc.patch
- Retire: binutils-handle-corrupt-version-info.patch
- Retire: binutils-ppc-dt_relr-relocs.patch
- Retire: binutils-riscv-SUB_ULEB128.patch
- Retire: binutils-x86-64-v3.patch
- Retire: i686-AVX10.1-part-1.patch
- Retire: i686-AVX10.1-part-2.patch
- Retire: i686-AVX10.1-part-3.patch
- Retire: i686-AVX10.1-part-4.patch
- Retire: i686-AVX10.1-part-5.patch
- Retire: i686-AVX10.1-part-6.patch
This commit is contained in:
Nick Clifton 2024-02-14 13:13:16 +00:00
parent 90d6ac6eba
commit 7db94aa6ea
25 changed files with 285 additions and 165159 deletions

1
.gitignore vendored
View File

@ -71,3 +71,4 @@ stamp-*
/binutils-2.39.tar.xz
/binutils-2.40.tar.xz
/binutils-2.41.tar.xz
/binutils-2.42.tar.xz

View File

@ -1,38 +0,0 @@
diff -rup binutils.orig/bfd/bpf-reloc.def binutils-2.41/bfd/bpf-reloc.def
--- binutils.orig/bfd/bpf-reloc.def 2023-10-30 10:41:59.114273359 +0000
+++ binutils-2.41/bfd/bpf-reloc.def 2023-10-30 11:09:41.316109162 +0000
@@ -72,3 +72,20 @@
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
true) /* pcrel_offset */
+
+ /* R_BPF_64_NODYLD32 is not used by GNU tools - but it is generated by LLVM.
+ We provide an entry here so that tools like strip can safely handle BPF
+ binaries generated by other tools. */
+ BPF_HOWTO (R_BPF_64_NODYLD32, /* type */
+ 0, /* rightshift */
+ 0, /* size */
+ 0, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bpf_elf_generic_reloc, /* special_function */
+ "R_BPF_64_NODYLD32", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false) /* pcrel_offset */
diff -rup binutils.orig/include/elf/bpf.h binutils-2.41/include/elf/bpf.h
--- binutils.orig/include/elf/bpf.h 2023-10-30 10:41:59.332273599 +0000
+++ binutils-2.41/include/elf/bpf.h 2023-10-30 10:59:44.475368448 +0000
@@ -30,8 +30,8 @@ START_RELOC_NUMBERS (elf_bpf_reloc_type)
RELOC_NUMBER (R_BPF_64_64, 1)
RELOC_NUMBER (R_BPF_64_ABS64, 2)
RELOC_NUMBER (R_BPF_64_ABS32, 3)
-/* R_BPF_64_NODYLD32 is not used by GNU tools.
- * It is kept in this file to remind that the value is already taken. */
+/* R_BPF_64_NODYLD32 is not used by GNU tools - but it is generated by LLVM.
+ It is kept in this file to remind that the value is already taken. */
RELOC_NUMBER (R_BPF_64_NODYLD32, 4)
RELOC_NUMBER (R_BPF_64_32, 10)
END_RELOC_NUMBERS (R_BPF_max)

File diff suppressed because it is too large Load Diff

View File

@ -1,139 +0,0 @@
diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c
index 4592bd6da27..4faf642b422 100644
--- a/bfd/elfnn-aarch64.c
+++ b/bfd/elfnn-aarch64.c
@@ -3675,7 +3675,7 @@ group_sections (struct elf_aarch64_link_hash_table *htab,
/* True if the inserted stub does not break BTI compatibility. */
static bool
-aarch64_bti_stub_p (bfd *input_bfd,
+aarch64_bti_stub_p (struct bfd_link_info *info,
struct elf_aarch64_stub_hash_entry *stub_entry)
{
/* Stubs without indirect branch are BTI compatible. */
@@ -3685,12 +3685,22 @@ aarch64_bti_stub_p (bfd *input_bfd,
/* Return true if the target instruction is compatible with BR x16. */
+ struct elf_aarch64_link_hash_table *globals = elf_aarch64_hash_table (info);
asection *section = stub_entry->target_section;
bfd_byte loc[4];
file_ptr off = stub_entry->target_value;
bfd_size_type count = sizeof (loc);
- if (!bfd_get_section_contents (input_bfd, section, loc, off, count))
+ /* PLT code is not generated yet, so treat it specially.
+ Note: Checking elf_aarch64_obj_tdata.plt_type & PLT_BTI is not
+ enough because it only implies BTI in the PLT0 and tlsdesc PLT
+ entries. Normal PLT entries don't have BTI in a shared library
+ (because such PLT is normally not called indirectly and adding
+ the BTI when a stub targets a PLT would change the PLT layout
+ and it's too late for that here). */
+ if (section == globals->root.splt)
+ memcpy (loc, globals->plt_entry, count);
+ else if (!bfd_get_section_contents (section->owner, section, loc, off, count))
return false;
uint32_t insn = bfd_getl32 (loc);
@@ -4637,11 +4647,24 @@ _bfd_aarch64_add_call_stub_entries (bool *stub_changed, bfd *output_bfd,
/* A stub with indirect jump may break BTI compatibility, so
insert another stub with direct jump near the target then. */
- if (need_bti && !aarch64_bti_stub_p (input_bfd, stub_entry))
+ if (need_bti && !aarch64_bti_stub_p (info, stub_entry))
{
+ id_sec_bti = htab->stub_group[sym_sec->id].link_sec;
+
+ /* If the stub with indirect jump and the BTI stub are in
+ the same stub group: change the indirect jump stub into
+ a BTI stub since a direct branch can reach the target.
+ The BTI landing pad is still needed in case another
+ stub indirectly jumps to it. */
+ if (id_sec_bti == id_sec)
+ {
+ stub_entry->stub_type = aarch64_stub_bti_direct_branch;
+ goto skip_double_stub;
+ }
+
stub_entry->double_stub = true;
htab->has_double_stub = true;
- id_sec_bti = htab->stub_group[sym_sec->id].link_sec;
+
stub_name_bti =
elfNN_aarch64_stub_name (id_sec_bti, sym_sec, hash, irela);
if (!stub_name_bti)
@@ -4653,33 +4676,41 @@ _bfd_aarch64_add_call_stub_entries (bool *stub_changed, bfd *output_bfd,
stub_entry_bti =
aarch64_stub_hash_lookup (&htab->stub_hash_table,
stub_name_bti, false, false);
- if (stub_entry_bti == NULL)
- stub_entry_bti =
- _bfd_aarch64_add_stub_entry_in_group (stub_name_bti,
- sym_sec, htab);
- if (stub_entry_bti == NULL)
+ if (stub_entry_bti != NULL)
+ BFD_ASSERT (stub_entry_bti->stub_type
+ == aarch64_stub_bti_direct_branch);
+ else
{
- free (stub_name);
- free (stub_name_bti);
- goto error_ret_free_internal;
- }
-
- stub_entry_bti->target_value = sym_value + irela->r_addend;
- stub_entry_bti->target_section = sym_sec;
- stub_entry_bti->stub_type = aarch64_stub_bti_direct_branch;
- stub_entry_bti->h = hash;
- stub_entry_bti->st_type = st_type;
+ stub_entry_bti =
+ _bfd_aarch64_add_stub_entry_in_group (stub_name_bti,
+ sym_sec, htab);
+ if (stub_entry_bti == NULL)
+ {
+ free (stub_name);
+ free (stub_name_bti);
+ goto error_ret_free_internal;
+ }
- len = sizeof (BTI_STUB_ENTRY_NAME) + strlen (sym_name);
- stub_entry_bti->output_name = bfd_alloc (htab->stub_bfd, len);
- if (stub_entry_bti->output_name == NULL)
- {
- free (stub_name);
- free (stub_name_bti);
- goto error_ret_free_internal;
+ stub_entry_bti->target_value =
+ sym_value + irela->r_addend;
+ stub_entry_bti->target_section = sym_sec;
+ stub_entry_bti->stub_type =
+ aarch64_stub_bti_direct_branch;
+ stub_entry_bti->h = hash;
+ stub_entry_bti->st_type = st_type;
+
+ len = sizeof (BTI_STUB_ENTRY_NAME) + strlen (sym_name);
+ stub_entry_bti->output_name = bfd_alloc (htab->stub_bfd,
+ len);
+ if (stub_entry_bti->output_name == NULL)
+ {
+ free (stub_name);
+ free (stub_name_bti);
+ goto error_ret_free_internal;
+ }
+ snprintf (stub_entry_bti->output_name, len,
+ BTI_STUB_ENTRY_NAME, sym_name);
}
- snprintf (stub_entry_bti->output_name, len,
- BTI_STUB_ENTRY_NAME, sym_name);
/* Update the indirect call stub to target the BTI stub. */
stub_entry->target_value = 0;
@@ -4688,7 +4719,7 @@ _bfd_aarch64_add_call_stub_entries (bool *stub_changed, bfd *output_bfd,
stub_entry->h = NULL;
stub_entry->st_type = STT_FUNC;
}
-
+skip_double_stub:
*stub_changed = true;
}

View File

@ -1,29 +0,0 @@
--- binutils.orig/bfd/merge.c 2023-11-07 09:49:56.923358543 +0000
+++ binutils-2.41/bfd/merge.c 2023-11-07 09:51:47.031552039 +0000
@@ -167,7 +167,7 @@ static bool
sec_merge_maybe_resize (struct sec_merge_hash *table, unsigned added)
{
struct bfd_hash_table *bfdtab = &table->table;
- if (bfdtab->count + added > table->nbuckets * 2 / 3)
+ if (bfdtab->count + added > table->nbuckets / 3 * 2)
{
unsigned i;
unsigned long newnb = table->nbuckets * 2;
@@ -175,7 +175,7 @@ sec_merge_maybe_resize (struct sec_merge
uint64_t *newl;
unsigned long alloc;
- while (bfdtab->count + added > newnb * 2 / 3)
+ while (bfdtab->count + added > newnb / 3 * 2)
{
newnb *= 2;
if (!newnb)
@@ -240,7 +240,7 @@ sec_merge_hash_insert (struct sec_merge_
hashp->u.suffix = NULL;
hashp->next = NULL;
// We must not need resizing, otherwise _index is wrong
- BFD_ASSERT (bfdtab->count + 1 <= table->nbuckets * 2 / 3);
+ BFD_ASSERT (bfdtab->count + 1 <= table->nbuckets / 3 * 2);
bfdtab->count++;
table->key_lens[_index] = (hash << 32) | (uint32_t)len;
table->values[_index] = hashp;

View File

@ -1,374 +0,0 @@
--- binutils.orig/include/demangle.h 2024-01-17 09:54:10.945686323 +0000
+++ binutils-2.41/include/demangle.h 2024-01-17 09:54:55.696760281 +0000
@@ -1,5 +1,5 @@
/* Defs for interface to demanglers.
- Copyright (C) 1992-2023 Free Software Foundation, Inc.
+ Copyright (C) 1992-2024 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License
@@ -448,6 +448,8 @@ enum demangle_component_type
DEMANGLE_COMPONENT_TRANSACTION_SAFE,
/* A cloned function. */
DEMANGLE_COMPONENT_CLONE,
+ /* A member-like friend function. */
+ DEMANGLE_COMPONENT_FRIEND,
DEMANGLE_COMPONENT_NOEXCEPT,
DEMANGLE_COMPONENT_THROW_SPEC,
@@ -464,6 +466,8 @@ enum demangle_component_type
DEMANGLE_COMPONENT_TEMPLATE_TEMPLATE_PARM,
DEMANGLE_COMPONENT_TEMPLATE_PACK_PARM,
+ DEMANGLE_COMPONENT_CONSTRAINTS,
+
/* A builtin type with argument. This holds the builtin type
information. */
DEMANGLE_COMPONENT_EXTENDED_BUILTIN_TYPE
diff -rup binutils.orig/libiberty/cp-demangle.c binutils-2.41/libiberty/cp-demangle.c
--- binutils.orig/libiberty/cp-demangle.c 2024-01-17 09:54:11.323686947 +0000
+++ binutils-2.41/libiberty/cp-demangle.c 2024-01-17 09:54:42.468738420 +0000
@@ -1,5 +1,5 @@
/* Demangler for g++ V3 ABI.
- Copyright (C) 2003-2023 Free Software Foundation, Inc.
+ Copyright (C) 2003-2024 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@wasabisystems.com>.
This file is part of the libiberty library, which is part of GCC.
@@ -993,6 +993,7 @@ d_make_comp (struct d_info *di, enum dem
case DEMANGLE_COMPONENT_VECTOR_TYPE:
case DEMANGLE_COMPONENT_CLONE:
case DEMANGLE_COMPONENT_MODULE_ENTITY:
+ case DEMANGLE_COMPONENT_CONSTRAINTS:
if (left == NULL || right == NULL)
return NULL;
break;
@@ -1036,6 +1037,7 @@ d_make_comp (struct d_info *di, enum dem
case DEMANGLE_COMPONENT_TEMPLATE_NON_TYPE_PARM:
case DEMANGLE_COMPONENT_TEMPLATE_TEMPLATE_PARM:
case DEMANGLE_COMPONENT_TEMPLATE_PACK_PARM:
+ case DEMANGLE_COMPONENT_FRIEND:
if (left == NULL)
return NULL;
break;
@@ -1344,6 +1346,22 @@ is_ctor_dtor_or_conversion (struct deman
}
}
+/* [ Q <constraint-expression> ] */
+
+static struct demangle_component *
+d_maybe_constraints (struct d_info *di, struct demangle_component *dc)
+{
+ if (d_peek_char (di) == 'Q')
+ {
+ d_advance (di, 1);
+ struct demangle_component *expr = d_expression (di);
+ if (expr == NULL)
+ return NULL;
+ dc = d_make_comp (di, DEMANGLE_COMPONENT_CONSTRAINTS, dc, expr);
+ }
+ return dc;
+}
+
/* <encoding> ::= <(function) name> <bare-function-type>
::= <(data) name>
::= <special-name>
@@ -1397,21 +1415,21 @@ d_encoding (struct d_info *di, int top_l
struct demangle_component *ftype;
ftype = d_bare_function_type (di, has_return_type (dc));
- if (ftype)
- {
- /* If this is a non-top-level local-name, clear the
- return type, so it doesn't confuse the user by
- being confused with the return type of whaever
- this is nested within. */
- if (!top_level && dc->type == DEMANGLE_COMPONENT_LOCAL_NAME
- && ftype->type == DEMANGLE_COMPONENT_FUNCTION_TYPE)
- d_left (ftype) = NULL;
+ if (!ftype)
+ return NULL;
- dc = d_make_comp (di, DEMANGLE_COMPONENT_TYPED_NAME,
- dc, ftype);
- }
- else
- dc = NULL;
+ /* If this is a non-top-level local-name, clear the
+ return type, so it doesn't confuse the user by
+ being confused with the return type of whaever
+ this is nested within. */
+ if (!top_level && dc->type == DEMANGLE_COMPONENT_LOCAL_NAME
+ && ftype->type == DEMANGLE_COMPONENT_FUNCTION_TYPE)
+ d_left (ftype) = NULL;
+
+ ftype = d_maybe_constraints (di, ftype);
+
+ dc = d_make_comp (di, DEMANGLE_COMPONENT_TYPED_NAME,
+ dc, ftype);
}
}
}
@@ -1681,6 +1699,7 @@ d_maybe_module_name (struct d_info *di,
/* <unqualified-name> ::= [<module-name>] <operator-name> [<abi-tags>]
::= [<module-name>] <ctor-dtor-name> [<abi-tags>]
::= [<module-name>] <source-name> [<abi-tags>]
+ ::= [<module-name>] F <source-name> [<abi-tags>]
::= [<module-name>] <local-source-name> [<abi-tags>]
::= [<module-name>] DC <source-name>+ E [<abi-tags>]
<local-source-name> ::= L <source-name> <discriminator> [<abi-tags>]
@@ -1692,11 +1711,18 @@ d_unqualified_name (struct d_info *di, s
{
struct demangle_component *ret;
char peek;
+ int member_like_friend = 0;
if (!d_maybe_module_name (di, &module))
return NULL;
peek = d_peek_char (di);
+ if (peek == 'F')
+ {
+ member_like_friend = 1;
+ d_advance (di, 1);
+ peek = d_peek_char (di);
+ }
if (IS_DIGIT (peek))
ret = d_source_name (di);
else if (IS_LOWER (peek))
@@ -1773,6 +1799,8 @@ d_unqualified_name (struct d_info *di, s
ret = d_make_comp (di, DEMANGLE_COMPONENT_MODULE_ENTITY, ret, module);
if (d_peek_char (di) == 'B')
ret = d_abi_tags (di, ret);
+ if (member_like_friend)
+ ret = d_make_comp (di, DEMANGLE_COMPONENT_FRIEND, ret, NULL);
if (scope)
ret = d_make_comp (di, DEMANGLE_COMPONENT_QUAL_NAME, scope, ret);
@@ -3012,7 +3040,7 @@ d_parmlist (struct d_info *di)
struct demangle_component *type;
char peek = d_peek_char (di);
- if (peek == '\0' || peek == 'E' || peek == '.')
+ if (peek == '\0' || peek == 'E' || peek == '.' || peek == 'Q')
break;
if ((peek == 'R' || peek == 'O')
&& d_peek_next_char (di) == 'E')
@@ -3248,7 +3276,7 @@ d_template_args (struct d_info *di)
return d_template_args_1 (di);
}
-/* <template-arg>* E */
+/* <template-arg>* [Q <constraint-expression>] E */
static struct demangle_component *
d_template_args_1 (struct d_info *di)
@@ -3284,13 +3312,17 @@ d_template_args_1 (struct d_info *di)
return NULL;
pal = &d_right (*pal);
- if (d_peek_char (di) == 'E')
- {
- d_advance (di, 1);
- break;
- }
+ char peek = d_peek_char (di);
+ if (peek == 'E' || peek == 'Q')
+ break;
}
+ al = d_maybe_constraints (di, al);
+
+ if (d_peek_char (di) != 'E')
+ return NULL;
+ d_advance (di, 1);
+
di->last_name = hold_last_name;
return al;
@@ -4431,6 +4463,7 @@ d_count_templates_scopes (struct d_print
case DEMANGLE_COMPONENT_PACK_EXPANSION:
case DEMANGLE_COMPONENT_TAGGED_NAME:
case DEMANGLE_COMPONENT_CLONE:
+ case DEMANGLE_COMPONENT_CONSTRAINTS:
recurse_left_right:
/* PR 89394 - Check for too much recursion. */
if (dpi->recursion > DEMANGLE_RECURSION_LIMIT)
@@ -4459,6 +4492,7 @@ d_count_templates_scopes (struct d_print
case DEMANGLE_COMPONENT_GLOBAL_CONSTRUCTORS:
case DEMANGLE_COMPONENT_GLOBAL_DESTRUCTORS:
case DEMANGLE_COMPONENT_MODULE_ENTITY:
+ case DEMANGLE_COMPONENT_FRIEND:
d_count_templates_scopes (dpi, d_left (dc));
break;
@@ -5189,6 +5223,22 @@ d_print_comp_inner (struct d_print_info
dpt.next = dpi->templates;
dpi->templates = &dpt;
dpt.template_decl = typed_name;
+
+ /* Constraints are mangled as part of the template argument list,
+ so they wrap the _TEMPLATE_ARGLIST. But
+ d_lookup_template_argument expects the RHS of _TEMPLATE to be
+ the _ARGLIST, and constraints need to refer to these args. So
+ move the _CONSTRAINTS out of the _TEMPLATE and onto the type.
+ This will result in them being printed after the () like a
+ trailing requires-clause, but that seems like our best option
+ given that we aren't printing a template-head. */
+ struct demangle_component *tnr = d_right (typed_name);
+ if (tnr->type == DEMANGLE_COMPONENT_CONSTRAINTS)
+ {
+ d_right (typed_name) = d_left (tnr);
+ d_left (tnr) = d_right (dc);
+ d_right (dc) = tnr;
+ }
}
d_print_comp (dpi, options, d_right (dc));
@@ -6197,6 +6247,11 @@ d_print_comp_inner (struct d_print_info
d_append_char (dpi, ']');
return;
+ case DEMANGLE_COMPONENT_FRIEND:
+ d_print_comp (dpi, options, d_left (dc));
+ d_append_string (dpi, "[friend]");
+ return;
+
case DEMANGLE_COMPONENT_TEMPLATE_HEAD:
{
d_append_char (dpi, '<');
@@ -6231,6 +6286,12 @@ d_print_comp_inner (struct d_print_info
d_append_string (dpi, "...");
return;
+ case DEMANGLE_COMPONENT_CONSTRAINTS:
+ d_print_comp (dpi, options, d_left (dc));
+ d_append_string (dpi, " requires ");
+ d_print_comp (dpi, options, d_right (dc));
+ return;
+
default:
d_print_error (dpi);
return;
--- binutils.orig/include/demangle.h 2024-01-17 11:06:11.111229985 +0000
+++ binutils-2.41/include/demangle.h 2024-01-17 11:06:21.281242709 +0000
@@ -314,6 +314,8 @@ enum demangle_component_type
/* C++11: An rvalue reference modifying a member function. The one
subtree is the type which is being referenced. */
DEMANGLE_COMPONENT_RVALUE_REFERENCE_THIS,
+ /* C++23: A member function with explict object parameter. */
+ DEMANGLE_COMPONENT_XOBJ_MEMBER_FUNCTION,
/* A vendor qualifier. The left subtree is the type which is being
qualified, and the right subtree is the name of the
qualifier. */
--- binutils.orig/libiberty/cp-demangle.c 2024-01-17 11:06:11.246230153 +0000
+++ binutils-2.41/libiberty/cp-demangle.c 2024-01-17 11:06:21.282242710 +0000
@@ -581,6 +581,7 @@ static char *d_demangle (const char *, i
case DEMANGLE_COMPONENT_CONST_THIS: \
case DEMANGLE_COMPONENT_REFERENCE_THIS: \
case DEMANGLE_COMPONENT_RVALUE_REFERENCE_THIS: \
+ case DEMANGLE_COMPONENT_XOBJ_MEMBER_FUNCTION: \
case DEMANGLE_COMPONENT_TRANSACTION_SAFE: \
case DEMANGLE_COMPONENT_NOEXCEPT: \
case DEMANGLE_COMPONENT_THROW_SPEC
@@ -749,6 +750,9 @@ d_dump (struct demangle_component *dc, i
case DEMANGLE_COMPONENT_RVALUE_REFERENCE_THIS:
printf ("rvalue reference this\n");
break;
+ case DEMANGLE_COMPONENT_XOBJ_MEMBER_FUNCTION:
+ printf ("explicit object parameter\n");
+ break;
case DEMANGLE_COMPONENT_TRANSACTION_SAFE:
printf ("transaction_safe this\n");
break;
@@ -1547,6 +1551,8 @@ d_name (struct d_info *di, int substable
/* <nested-name> ::= N [<CV-qualifiers>] [<ref-qualifier>] <prefix> <unqualified-name> E
::= N [<CV-qualifiers>] [<ref-qualifier>] <template-prefix> <template-args> E
+ ::= N H <prefix> <unqualified-name> E
+ ::= N H <template-prefix> <template-args> E
*/
static struct demangle_component *
@@ -1559,13 +1565,24 @@ d_nested_name (struct d_info *di)
if (! d_check_char (di, 'N'))
return NULL;
- pret = d_cv_qualifiers (di, &ret, 1);
- if (pret == NULL)
- return NULL;
+ if (d_peek_char (di) == 'H')
+ {
+ d_advance (di, 1);
+ di->expansion += sizeof "this";
+ pret = &ret;
+ rqual = d_make_comp (di, DEMANGLE_COMPONENT_XOBJ_MEMBER_FUNCTION,
+ NULL, NULL);
+ }
+ else
+ {
+ pret = d_cv_qualifiers (di, &ret, 1);
+ if (pret == NULL)
+ return NULL;
- /* Parse the ref-qualifier now and then attach it
- once we have something to attach it to. */
- rqual = d_ref_qualifier (di, NULL);
+ /* Parse the ref-qualifier now and then attach it
+ once we have something to attach it to. */
+ rqual = d_ref_qualifier (di, NULL);
+ }
*pret = d_prefix (di, 1);
if (*pret == NULL)
@@ -4427,6 +4444,7 @@ d_count_templates_scopes (struct d_print
case DEMANGLE_COMPONENT_CONST_THIS:
case DEMANGLE_COMPONENT_REFERENCE_THIS:
case DEMANGLE_COMPONENT_RVALUE_REFERENCE_THIS:
+ case DEMANGLE_COMPONENT_XOBJ_MEMBER_FUNCTION:
case DEMANGLE_COMPONENT_TRANSACTION_SAFE:
case DEMANGLE_COMPONENT_NOEXCEPT:
case DEMANGLE_COMPONENT_THROW_SPEC:
@@ -6521,6 +6539,8 @@ d_print_mod (struct d_print_info *dpi, i
case DEMANGLE_COMPONENT_RVALUE_REFERENCE:
d_append_string (dpi, "&&");
return;
+ case DEMANGLE_COMPONENT_XOBJ_MEMBER_FUNCTION:
+ return;
case DEMANGLE_COMPONENT_COMPLEX:
d_append_string (dpi, " _Complex");
return;
@@ -6559,11 +6579,13 @@ d_print_function_type (struct d_print_in
{
int need_paren;
int need_space;
+ int xobj_memfn;
struct d_print_mod *p;
struct d_print_mod *hold_modifiers;
need_paren = 0;
need_space = 0;
+ xobj_memfn = 0;
for (p = mods; p != NULL; p = p->next)
{
if (p->printed)
@@ -6586,7 +6608,8 @@ d_print_function_type (struct d_print_in
need_space = 1;
need_paren = 1;
break;
- FNQUAL_COMPONENT_CASE:
+ case DEMANGLE_COMPONENT_XOBJ_MEMBER_FUNCTION:
+ xobj_memfn = 1;
break;
default:
break;
@@ -6617,6 +6640,8 @@ d_print_function_type (struct d_print_in
d_append_char (dpi, ')');
d_append_char (dpi, '(');
+ if (xobj_memfn)
+ d_append_string (dpi, "this ");
if (d_right (dc) != NULL)
d_print_comp (dpi, options, d_right (dc));

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,134 @@
diff -rup binutils.orig/ld/emultempl/elf.em binutils-2.41/ld/emultempl/elf.em
--- binutils.orig/ld/emultempl/elf.em 2024-01-25 12:15:12.113299123 +0000
+++ binutils-2.41/ld/emultempl/elf.em 2024-01-25 12:15:21.754311058 +0000
@@ -893,7 +893,7 @@ fi
fragment <<EOF
else
- einfo (_("%P: warning: -z %s ignored\n"), optarg);
+ queue_unknown_cmdline_warning ("-z %s", optarg);
break;
EOF
Only in binutils-2.41/ld/emultempl: elf.em.orig
diff -rup binutils.orig/ld/ldelf.c binutils-2.41/ld/ldelf.c
--- binutils.orig/ld/ldelf.c 2024-01-25 12:15:12.114299125 +0000
+++ binutils-2.41/ld/ldelf.c 2024-01-25 12:15:21.754311058 +0000
@@ -74,7 +74,7 @@ ldelf_after_parse (void)
&& link_info.nointerp)
{
if (link_info.dynamic_undefined_weak > 0)
- einfo (_("%P: warning: -z dynamic-undefined-weak ignored\n"));
+ queue_unknown_cmdline_warning ("-z dynamic-undefined-weak");
link_info.dynamic_undefined_weak = 0;
}
diff -rup binutils.orig/ld/ldmain.c binutils-2.41/ld/ldmain.c
--- binutils.orig/ld/ldmain.c 2024-01-25 12:15:12.114299125 +0000
+++ binutils-2.41/ld/ldmain.c 2024-01-25 12:15:21.754311058 +0000
@@ -479,6 +479,8 @@ main (int argc, char **argv)
ldemul_after_parse ();
+ output_unknown_cmdline_warnings ();
+
if (config.map_filename)
{
if (strcmp (config.map_filename, "-") == 0)
diff -rup binutils.orig/ld/ldmisc.c binutils-2.41/ld/ldmisc.c
--- binutils.orig/ld/ldmisc.c 2024-01-25 12:15:12.114299125 +0000
+++ binutils-2.41/ld/ldmisc.c 2024-01-25 12:15:21.754311058 +0000
@@ -620,6 +620,81 @@ einfo (const char *fmt, ...)
fflush (stderr);
}
+/* The buffer size for each command-line option warning. */
+#define CMDLINE_WARNING_SIZE 256
+
+/* A linked list of command-line option warnings. */
+
+struct cmdline_warning_list
+{
+ struct cmdline_warning_list *next;
+ char *warning;
+};
+
+/* The head of the linked list of command-line option warnings. */
+static struct cmdline_warning_list *cmdline_warning_head = NULL;
+
+/* The tail of the linked list of command-line option warnings. */
+static struct cmdline_warning_list **cmdline_warning_tail
+ = &cmdline_warning_head;
+
+/* Queue an unknown command-line option warning. */
+
+void
+queue_unknown_cmdline_warning (const char *fmt, ...)
+{
+ va_list arg;
+ struct cmdline_warning_list *warning_ptr
+ = xmalloc (sizeof (*warning_ptr));
+ warning_ptr->warning = xmalloc (CMDLINE_WARNING_SIZE);
+ warning_ptr->next = NULL;
+ int written;
+
+ va_start (arg, fmt);
+ written = vsnprintf (warning_ptr->warning, CMDLINE_WARNING_SIZE, fmt,
+ arg);
+ if (written < 0 || written >= CMDLINE_WARNING_SIZE)
+ {
+ /* If vsnprintf fails or truncates, output the warning directly. */
+ fflush (stdout);
+ va_start (arg, fmt);
+ vfinfo (stderr, fmt, arg, true);
+ fflush (stderr);
+ }
+ else
+ {
+ *cmdline_warning_tail = warning_ptr;
+ cmdline_warning_tail = &warning_ptr->next;
+ }
+ va_end (arg);
+}
+
+/* Output queued unknown command-line option warnings. */
+
+void
+output_unknown_cmdline_warnings (void)
+{
+ struct cmdline_warning_list *list = cmdline_warning_head;
+ struct cmdline_warning_list *next;
+ if (list == NULL)
+ return;
+
+ fflush (stdout);
+
+ for (; list != NULL; list = next)
+ {
+ next = list->next;
+ if (config.fatal_warnings)
+ einfo (_("%P: error: unsupported option: %s\n"), list->warning);
+ else
+ einfo (_("%P: warning: %s ignored\n"), list->warning);
+ free (list->warning);
+ free (list);
+ }
+
+ fflush (stderr);
+}
+
void
info_assert (const char *file, unsigned int line)
{
diff -rup binutils.orig/ld/ldmisc.h binutils-2.41/ld/ldmisc.h
--- binutils.orig/ld/ldmisc.h 2024-01-25 12:15:12.114299125 +0000
+++ binutils-2.41/ld/ldmisc.h 2024-01-25 12:15:59.559357849 +0000
@@ -31,6 +31,8 @@ extern void yyerror (const char *);
extern void info_msg (const char *, ...);
extern void lfinfo (FILE *, const char *, ...);
extern void info_assert (const char *, unsigned int);
+extern void queue_unknown_cmdline_warning (const char *, ...);
+extern void output_unknown_cmdline_warnings (void);
#define ASSERT(x) \
do { if (!(x)) info_assert(__FILE__,__LINE__); } while (0)

View File

@ -0,0 +1,22 @@
--- binutils.orig/binutils/testsuite/binutils-all/ar.exp 2024-02-07 11:08:53.866261015 +0000
+++ binutils-2.42/binutils/testsuite/binutils-all/ar.exp 2024-02-07 11:17:01.079395624 +0000
@@ -581,7 +581,7 @@ proc replacing_non_deterministic_member
# Build the archive with the *newer* object file.
- set got [binutils_run $AR "rc $archive ${newer_objfile}"]
+ set got [binutils_run $AR "rUc $archive ${newer_objfile}"]
if ![string match "" $got] {
fail "$testname: (could not build archive)"
return
--- binutils.orig/binutils/testsuite/binutils-all/ar.exp 2024-02-07 13:02:23.490031197 +0000
+++ binutils-2.42/binutils/testsuite/binutils-all/ar.exp 2024-02-07 13:03:10.285034069 +0000
@@ -1017,7 +1017,7 @@ symbol_table
argument_parsing
deterministic_archive
replacing_deterministic_member
-replacing_non_deterministic_member
+# replacing_non_deterministic_member
replacing_sde_deterministic_member
delete_an_element
move_an_element

View File

@ -1,71 +0,0 @@
diff -rup binutils.orig/gold/powerpc.cc binutils-2.41/gold/powerpc.cc
--- binutils.orig/gold/powerpc.cc 2023-08-25 11:21:08.882071604 +0100
+++ binutils-2.41/gold/powerpc.cc 2023-08-25 11:21:26.050081034 +0100
@@ -3714,12 +3714,7 @@ Target_powerpc<size, big_endian>::do_rel
unsigned int prev_brlt_size = 0;
if (pass == 1)
{
- bool thread_safe
- = this->abiversion() < 2 && parameters->options().plt_thread_safe();
- if (size == 64
- && this->abiversion() < 2
- && !thread_safe
- && !parameters->options().user_set_plt_thread_safe())
+ if (size == 64 && this->abiversion() < 2)
{
static const char* const thread_starter[] =
{
@@ -3747,29 +3742,37 @@ Target_powerpc<size, big_endian>::do_rel
/* libgo */
"__go_go",
};
+ bool thread_safe = parameters->options().plt_thread_safe();
- if (parameters->options().shared())
- thread_safe = true;
- else
+ if (!thread_safe
+ && !parameters->options().user_set_plt_thread_safe())
{
- for (unsigned int i = 0;
- i < sizeof(thread_starter) / sizeof(thread_starter[0]);
- i++)
+ if (parameters->options().shared())
+ thread_safe = true;
+ else
{
- Symbol* sym = symtab->lookup(thread_starter[i], NULL);
- thread_safe = (sym != NULL
- && sym->in_reg()
- && sym->in_real_elf());
- if (thread_safe)
- break;
+ for (unsigned int i = 0;
+ i < sizeof(thread_starter) / sizeof(thread_starter[0]);
+ i++)
+ {
+ Symbol* sym = symtab->lookup(thread_starter[i], NULL);
+ thread_safe = (sym != NULL
+ && sym->in_reg()
+ && sym->in_real_elf());
+ if (thread_safe)
+ break;
+ }
}
}
+ this->plt_thread_safe_ = thread_safe;
}
- this->plt_thread_safe_ = thread_safe;
- if (parameters->options().output_is_position_independent())
- this->rela_dyn_size_
- = this->rela_dyn_section(layout)->current_data_size();
+ if (size == 64
+ && parameters->options().output_is_position_independent())
+ {
+ gold_assert (this->rela_dyn_);
+ this->rela_dyn_size_ = this->rela_dyn_->current_data_size();
+ }
this->stub_group_size_ = parameters->options().stub_group_size();
bool no_size_errors = true;

View File

@ -1,29 +0,0 @@
--- binutils.orig/bfd/elf.c 2023-10-13 11:38:25.159530287 +0100
+++ binutils-2.41/bfd/elf.c 2023-10-13 11:41:23.290898228 +0100
@@ -9479,6 +9479,8 @@ _bfd_elf_slurp_version_tables (bfd *abfd
if (elf_use_dt_symtab_p (abfd))
iverneed->vn_filename
= elf_tdata (abfd)->dt_strtab + iverneed->vn_file;
+ else if (hdr == NULL)
+ goto error_return_bad_verref;
else
iverneed->vn_filename
= bfd_elf_string_from_elf_section (abfd, hdr->sh_link,
@@ -9516,6 +9518,8 @@ _bfd_elf_slurp_version_tables (bfd *abfd
if (elf_use_dt_symtab_p (abfd))
ivernaux->vna_nodename
= elf_tdata (abfd)->dt_strtab + ivernaux->vna_name;
+ else if (hdr == NULL)
+ goto error_return_bad_verref;
else
ivernaux->vna_nodename
= bfd_elf_string_from_elf_section (abfd, hdr->sh_link,
@@ -9546,7 +9550,7 @@ _bfd_elf_slurp_version_tables (bfd *abfd
iverneed->vn_nextref = NULL;
if (iverneed->vn_next == 0)
break;
- if (i + 1 < hdr->sh_info)
+ if (hdr != NULL && (i + 1 < hdr->sh_info))
iverneed->vn_nextref = iverneed + 1;
if (iverneed->vn_next

View File

@ -1,49 +0,0 @@
diff -rupN binutils.orig/multilib.am binutils-2.41/multilib.am
--- binutils.orig/multilib.am 1970-01-01 01:00:00.000000000 +0100
+++ binutils-2.41/multilib.am 2024-02-12 16:41:56.899838085 +0000
@@ -0,0 +1,45 @@
+## automake - create Makefile.in from Makefile.am
+
+## Copyright (C) 1994-2017 Free Software Foundation, Inc.
+## This Makefile.in is free software; the Free Software Foundation
+## gives unlimited permission to copy and/or distribute it,
+## with or without modifications, as long as this notice is preserved.
+
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+
+MULTISRCTOP =
+MULTIBUILDTOP =
+MULTIDIRS =
+MULTISUBDIR =
+MULTIDO = true
+MULTICLEAN = true
+
+# GNU Make needs to see an explicit $(MAKE) variable in the command it
+# runs to enable its job server during parallel builds. Hence the
+# comments below.
+all-multi:
+ $(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do # $(MAKE)
+install-multi:
+ $(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do # $(MAKE)
+mostlyclean-multi:
+ $(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean # $(MAKE)
+clean-multi:
+ $(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean # $(MAKE)
+distclean-multi:
+ $(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean # $(MAKE)
+maintainer-clean-multi:
+ $(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean # $(MAKE)
+
+.MAKE .PHONY: all-multi clean-multi distclean-multi install-am \
+ install-multi maintainer-clean-multi mostlyclean-multi
+
+install-exec-local: install-multi
+
+all-local: all-multi
+mostlyclean-local: mostlyclean-multi
+clean-local: clean-multi
+distclean-local: distclean-multi
+maintainer-clean-local: maintainer-clean-multi

View File

@ -1,114 +0,0 @@
--- binutils.orig/bfd/elf64-ppc.c 2024-01-16 10:39:26.903071936 +0000
+++ binutils-2.41/bfd/elf64-ppc.c 2024-01-16 10:39:38.650127903 +0000
@@ -4749,6 +4749,21 @@ is_8byte_reloc (enum elf_ppc64_reloc_typ
|| r_type == R_PPC64_PLTCALL);
}
+/* The RELR encoding doesn't allow odd addresses, so RELR_ALIGN must
+ be at least 1. R_PPC64_RELATIVE relocs require alignment of 2**3.
+ We use 3 here to avoid complexity in relocate_section. PR30824. */
+#define RELR_ALIGN 3
+
+static bool
+maybe_relr (enum elf_ppc64_reloc_type r_type,
+ const Elf_Internal_Rela *rel,
+ const asection *sec)
+{
+ return ((r_type == R_PPC64_ADDR64 || r_type == R_PPC64_TOC)
+ && (rel->r_offset & ((1 << RELR_ALIGN) - 1)) == 0
+ && sec->alignment_power >= RELR_ALIGN);
+}
+
/* Like bfd_reloc_offset_in_range but without a howto. Return true
iff a field of SIZE bytes at OFFSET is within SEC limits. */
@@ -5401,9 +5416,7 @@ ppc64_elf_check_relocs (bfd *abfd, struc
p->count += 1;
if (!must_be_dyn_reloc (info, r_type))
p->pc_count += 1;
- if ((r_type == R_PPC64_ADDR64 || r_type == R_PPC64_TOC)
- && rel->r_offset % 2 == 0
- && sec->alignment_power != 0)
+ if (maybe_relr (r_type, rel, sec))
p->rel_count += 1;
}
else
@@ -5438,9 +5451,7 @@ ppc64_elf_check_relocs (bfd *abfd, struc
p->ifunc = is_ifunc;
}
p->count += 1;
- if ((r_type == R_PPC64_ADDR64 || r_type == R_PPC64_TOC)
- && rel->r_offset % 2 == 0
- && sec->alignment_power != 0)
+ if (maybe_relr (r_type, rel, sec))
p->rel_count += 1;
}
}
@@ -7291,9 +7302,7 @@ dec_dynrel_count (const Elf_Internal_Rel
{
if (!must_be_dyn_reloc (info, r_type))
p->pc_count -= 1;
- if ((r_type == R_PPC64_ADDR64 || r_type == R_PPC64_TOC)
- && rel->r_offset % 2 == 0
- && sec->alignment_power != 0)
+ if (maybe_relr (r_type, rel, sec))
p->rel_count -= 1;
p->count -= 1;
if (p->count == 0)
@@ -7326,9 +7335,7 @@ dec_dynrel_count (const Elf_Internal_Rel
{
if (p->sec == sec && p->ifunc == is_ifunc)
{
- if ((r_type == R_PPC64_ADDR64 || r_type == R_PPC64_TOC)
- && rel->r_offset % 2 == 0
- && sec->alignment_power != 0)
+ if (maybe_relr (r_type, rel, sec))
p->rel_count -= 1;
p->count -= 1;
if (p->count == 0)
@@ -13869,6 +13876,9 @@ ppc64_elf_size_stubs (struct bfd_link_in
switch (r_type)
{
default:
+ if (info->enable_dt_relr
+ && maybe_relr (r_type, irela, section))
+ break;
continue;
case R_PPC64_REL24:
@@ -13880,14 +13890,6 @@ ppc64_elf_size_stubs (struct bfd_link_in
if ((section->flags & SEC_CODE) != 0)
break;
continue;
-
- case R_PPC64_ADDR64:
- case R_PPC64_TOC:
- if (info->enable_dt_relr
- && irela->r_offset % 2 == 0
- && section->alignment_power != 0)
- break;
- continue;
}
/* Now determine the call target, its name, value,
@@ -15272,7 +15274,7 @@ ppc64_elf_build_stubs (struct bfd_link_i
while (i < htab->relr_count)
{
bfd_vma base = relr_addr[i];
- BFD_ASSERT (base % 2 == 0);
+ BFD_ASSERT ((base & ((1 << RELR_ALIGN) - 1)) == 0);
bfd_put_64 (htab->elf.dynobj, base, loc);
loc += 8;
i++;
@@ -17510,9 +17512,8 @@ ppc64_elf_relocate_section (bfd *output_
if (!(info->enable_dt_relr
&& ELF64_R_TYPE (outrel.r_info) == R_PPC64_RELATIVE
- && rel->r_offset % 2 == 0
- && input_section->alignment_power != 0
- && ELF64_R_TYPE (orig_rel.r_info) != R_PPC64_UADDR64))
+ && maybe_relr (ELF64_R_TYPE (orig_rel.r_info),
+ rel, input_section)))
{
sreloc = elf_section_data (input_section)->sreloc;
if (h != NULL

View File

@ -1,239 +0,0 @@
diff -rupN binutils.orig/bfd/elfnn-riscv.c binutils-2.41/bfd/elfnn-riscv.c
--- binutils.orig/bfd/elfnn-riscv.c 2024-01-02 17:35:07.412218130 +0000
+++ binutils-2.41/bfd/elfnn-riscv.c 2024-01-02 17:36:52.274311071 +0000
@@ -1737,7 +1737,10 @@ perform_relocation (const reloc_howto_ty
{
if (howto->pc_relative)
value -= sec_addr (input_section) + rel->r_offset;
- value += rel->r_addend;
+
+ /* PR31179, ignore the non-zero addend of R_RISCV_SUB_ULEB128. */
+ if (ELFNN_R_TYPE (rel->r_info) != R_RISCV_SUB_ULEB128)
+ value += rel->r_addend;
switch (ELFNN_R_TYPE (rel->r_info))
{
@@ -1818,10 +1821,7 @@ perform_relocation (const reloc_howto_ty
value = ENCODE_CITYPE_LUI_IMM (RISCV_CONST_HIGH_PART (value));
break;
- /* SUB_ULEB128 must be applied after SET_ULEB128, so we only write the
- value back for SUB_ULEB128 should be enough. */
- case R_RISCV_SET_ULEB128:
- break;
+ /* R_RISCV_SET_ULEB128 won't go into here. */
case R_RISCV_SUB_ULEB128:
{
unsigned int len = 0;
@@ -2514,7 +2514,7 @@ riscv_elf_relocate_section (bfd *output_
else
{
msg = ("Mismatched R_RISCV_SET_ULEB128, it must be paired with"
- "and applied before R_RISCV_SUB_ULEB128");
+ " and applied before R_RISCV_SUB_ULEB128");
r = bfd_reloc_dangerous;
}
break;
@@ -2523,14 +2523,40 @@ riscv_elf_relocate_section (bfd *output_
if (uleb128_set_rel != NULL
&& uleb128_set_rel->r_offset == rel->r_offset)
{
- relocation = uleb128_set_vma - relocation;
+ relocation = uleb128_set_vma - relocation
+ + uleb128_set_rel->r_addend;
uleb128_set_vma = 0;
uleb128_set_rel = NULL;
+
+ /* PR31179, the addend of SUB_ULEB128 should be zero if using
+ .uleb128, but we make it non-zero by accident in assembler,
+ so just ignore it in perform_relocation, and make assembler
+ continue doing the right thing. Don't reset the addend of
+ SUB_ULEB128 to zero here since it will break the --emit-reloc,
+ even though the non-zero addend is unexpected.
+
+ We encourage people to rebuild their stuff to get the
+ non-zero addend of SUB_ULEB128, but that might need some
+ times, so report warnings to inform people need to rebuild
+ if --check-uleb128 is enabled. However, since the failed
+ .reloc cases for ADD/SET/SUB/ULEB128 are rarely to use, it
+ may acceptable that stop supproting them until people rebuld
+ their stuff, maybe half-year or one year later. I believe
+ this might be the least harmful option that we should go.
+
+ Or maybe we should teach people that don't write the
+ .reloc R_RISCV_SUB* with non-zero constant, and report
+ warnings/errors in assembler. */
+ if (htab->params->check_uleb128
+ && rel->r_addend != 0)
+ _bfd_error_handler (_("%pB: warning: R_RISCV_SUB_ULEB128 with"
+ " non-zero addend, please rebuild by"
+ " Fedora 40 binutils or up"), input_bfd);
}
else
{
msg = ("Mismatched R_RISCV_SUB_ULEB128, it must be paired with"
- "and applied after R_RISCV_SET_ULEB128");
+ " and applied after R_RISCV_SET_ULEB128");
r = bfd_reloc_dangerous;
}
break;
@@ -5123,7 +5149,13 @@ _bfd_riscv_relax_section (bfd *abfd, ase
if (h != NULL && h->type == STT_GNU_IFUNC)
continue;
+ /* Maybe we should check UNDEFWEAK_NO_DYNAMIC_RELOC here? But that
+ will break the undefweak relaxation testcases, so just make sure
+ we won't do relaxations for linker_def symbols in short-term. */
if (h->root.type == bfd_link_hash_undefweak
+ /* The linker_def symbol like __ehdr_start that may be undefweak
+ for now, but will be guaranteed to be defined later. */
+ && !h->root.linker_def
&& (relax_func == _bfd_riscv_relax_lui
|| relax_func == _bfd_riscv_relax_pc))
{
diff -rupN binutils.orig/bfd/elfxx-riscv.h binutils-2.41/bfd/elfxx-riscv.h
--- binutils.orig/bfd/elfxx-riscv.h 2024-01-02 17:35:07.412218130 +0000
+++ binutils-2.41/bfd/elfxx-riscv.h 2024-01-02 17:35:24.252233056 +0000
@@ -31,6 +31,8 @@ struct riscv_elf_params
{
/* Whether to relax code sequences to GP-relative addressing. */
bool relax_gp;
+ /* Whether to check if SUB_ULEB128 relocation has non-zero addend. */
+ bool check_uleb128;
};
extern void riscv_elf32_set_options (struct bfd_link_info *,
diff -rupN binutils.orig/ld/NEWS binutils-2.41/ld/NEWS
--- binutils.orig/ld/NEWS 2024-01-02 17:35:08.012218662 +0000
+++ binutils-2.41/ld/NEWS 2024-01-02 17:35:56.139261318 +0000
@@ -1,5 +1,10 @@
-*- text -*-
+* On RISC-V, add ld target option --[no-]check-uleb128. Should rebuild the
+ objects by binutils 2.42 and up if enabling the option and get warnings,
+ since the non-zero addend of SUB_ULEB128 shouldn't be generated from .uleb128
+ directives.
+
* Added --warn-execstack-objects to warn about executable stacks only when an
input object file requests one. Also added --error-execstack and
--error-rxw-segments options to convert warnings about executable stacks and
diff -rupN binutils.orig/ld/emultempl/riscvelf.em binutils-2.41/ld/emultempl/riscvelf.em
--- binutils.orig/ld/emultempl/riscvelf.em 2024-01-02 17:35:07.699218385 +0000
+++ binutils-2.41/ld/emultempl/riscvelf.em 2024-01-02 17:35:24.252233056 +0000
@@ -25,7 +25,8 @@ fragment <<EOF
#include "elf/riscv.h"
#include "elfxx-riscv.h"
-static struct riscv_elf_params params = { .relax_gp = 1 };
+static struct riscv_elf_params params = { .relax_gp = 1,
+ .check_uleb128 = 0};
EOF
# Define some shell vars to insert bits of code into the standard elf
@@ -35,17 +36,23 @@ enum risccv_opt
{
OPTION_RELAX_GP = 321,
OPTION_NO_RELAX_GP,
+ OPTION_CHECK_ULEB128,
+ OPTION_NO_CHECK_ULEB128,
};
'
PARSE_AND_LIST_LONGOPTS=${PARSE_AND_LIST_LONGOPTS}'
{ "relax-gp", no_argument, NULL, OPTION_RELAX_GP },
{ "no-relax-gp", no_argument, NULL, OPTION_NO_RELAX_GP },
+ { "check-uleb128", no_argument, NULL, OPTION_CHECK_ULEB128 },
+ { "no-check-uleb128", no_argument, NULL, OPTION_NO_CHECK_ULEB128 },
'
PARSE_AND_LIST_OPTIONS=${PARSE_AND_LIST_OPTIONS}'
fprintf (file, _(" --relax-gp Perform GP relaxation\n"));
fprintf (file, _(" --no-relax-gp Don'\''t perform GP relaxation\n"));
+ fprintf (file, _(" --check-uleb128 Check if SUB_ULEB128 has non-zero addend\n"));
+ fprintf (file, _(" --no-check-uleb128 Don'\''t check if SUB_ULEB128 has non-zero addend\n"));
'
PARSE_AND_LIST_ARGS_CASES=${PARSE_AND_LIST_ARGS_CASES}'
@@ -56,6 +63,14 @@ PARSE_AND_LIST_ARGS_CASES=${PARSE_AND_LI
case OPTION_NO_RELAX_GP:
params.relax_gp = 0;
break;
+
+ case OPTION_CHECK_ULEB128:
+ params.check_uleb128 = 1;
+ break;
+
+ case OPTION_NO_CHECK_ULEB128:
+ params.check_uleb128 = 0;
+ break;
'
fragment <<EOF
diff -rupN binutils.orig/ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp binutils-2.41/ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp
--- binutils.orig/ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp 2024-01-02 17:35:07.942218600 +0000
+++ binutils-2.41/ld/testsuite/ld-riscv-elf/ld-riscv-elf.exp 2024-01-02 17:35:24.252233056 +0000
@@ -173,6 +173,8 @@ if [istarget "riscv*-*-*"] {
run_dump_test "attr-phdr"
run_dump_test "relax-max-align-gp"
run_dump_test "uleb128"
+ run_dump_test "pr31179"
+ run_dump_test "pr31179-r"
run_ld_link_tests [list \
[list "Weak reference 32" "-T weakref.ld -m[riscv_choose_ilp32_emul]" "" \
"-march=rv32i -mabi=ilp32" {weakref32.s} \
diff -rupN binutils.orig/ld/testsuite/ld-riscv-elf/pr31179-r.d binutils-2.41/ld/testsuite/ld-riscv-elf/pr31179-r.d
--- binutils.orig/ld/testsuite/ld-riscv-elf/pr31179-r.d 1970-01-01 01:00:00.000000000 +0100
+++ binutils-2.41/ld/testsuite/ld-riscv-elf/pr31179-r.d 2024-01-02 17:35:24.252233056 +0000
@@ -0,0 +1,10 @@
+#source: pr31179.s
+#as:
+#readelf: -Wr
+
+Relocation section '.rela.text' at .*
+[ ]+Offset[ ]+Info[ ]+Type[ ]+.*
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_SET_ULEB128[ ]+[0-9a-f]+[ ]+bar \+ 1
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_SUB_ULEB128[ ]+[0-9a-f]+[ ]+foo \+ 0
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_SET_ULEB128[ ]+[0-9a-f]+[ ]+bar \+ 1
+[0-9a-f]+[ ]+[0-9a-f]+[ ]+R_RISCV_SUB_ULEB128[ ]+[0-9a-f]+[ ]+foo \+ 1
diff -rupN binutils.orig/ld/testsuite/ld-riscv-elf/pr31179.d binutils-2.41/ld/testsuite/ld-riscv-elf/pr31179.d
--- binutils.orig/ld/testsuite/ld-riscv-elf/pr31179.d 1970-01-01 01:00:00.000000000 +0100
+++ binutils-2.41/ld/testsuite/ld-riscv-elf/pr31179.d 2024-01-02 17:35:24.252233056 +0000
@@ -0,0 +1,11 @@
+#source: pr31179.s
+#as:
+#ld: --check-uleb128
+#objdump: -sj .text
+#warning: .*R_RISCV_SUB_ULEB128 with non-zero addend, please rebuild by Fedora 40 binutils or up
+
+.*:[ ]+file format .*
+
+Contents of section .text:
+
+[ ]+[0-9a-f]+[ ]+00000303[ ]+.*
diff -rupN binutils.orig/ld/testsuite/ld-riscv-elf/pr31179.s binutils-2.41/ld/testsuite/ld-riscv-elf/pr31179.s
--- binutils.orig/ld/testsuite/ld-riscv-elf/pr31179.s 1970-01-01 01:00:00.000000000 +0100
+++ binutils-2.41/ld/testsuite/ld-riscv-elf/pr31179.s 2024-01-02 17:35:24.252233056 +0000
@@ -0,0 +1,13 @@
+.globl _start
+_start:
+
+foo:
+.2byte 0
+bar:
+
+.uleb128 bar - foo + 1
+
+reloc:
+.reloc reloc, R_RISCV_SET_ULEB128, bar + 1
+.reloc reloc, R_RISCV_SUB_ULEB128, foo + 1
+.byte 0x0
--- binutils.orig/gas/config/tc-riscv.c 2024-01-03 13:08:16.588286420 +0000
+++ binutils-2.41/gas/config/tc-riscv.c 2024-01-03 13:08:32.749297812 +0000
@@ -4949,6 +4949,7 @@ riscv_insert_uleb128_fixes (bfd *abfd AT
fix_new_exp (fragP, fragP->fr_fix, 0,
exp_dup, 0, BFD_RELOC_RISCV_SET_ULEB128);
exp_dup->X_add_symbol = exp->X_op_symbol;
+ exp_dup->X_add_number = 0; /* Set addend of SUB_ULEB128 to zero. */
fix_new_exp (fragP, fragP->fr_fix, 0,
exp_dup, 0, BFD_RELOC_RISCV_SUB_ULEB128);
}

View File

@ -30,8 +30,8 @@ diff -rup binutils.orig/ld/testsuite/ld-riscv-elf/pcgp-relax-02.d binutils-2.40/
@@ -11,5 +11,5 @@ Disassembly of section .text:
[0-9a-f]+ <_start>:
.*:[ ]+[0-9a-f]+[ ]+auipc[ ]+a1.*
.*:[ ]+[0-9a-f]+[ ]+addi?[ ]+a0,gp.*<data_a>
-.*:[ ]+[0-9a-f]+[ ]+addi?[ ]+a1,a1.*<data_b>
.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a0,gp.*<data_a>
-.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a1,a1.*<data_b>
+.*:[ ]+[0-9a-f]+[ ]+mv[ ]+a1,a1
#pass
diff -rup binutils.orig/ld/testsuite/ld-riscv-elf/pcrel-lo-addend-2a.d binutils-2.40/ld/testsuite/ld-riscv-elf/pcrel-lo-addend-2a.d
@ -134,3 +134,16 @@ 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" \

View File

@ -0,0 +1,66 @@
diff -rupN binutils.orig/gas/testsuite/gas/scfi/x86_64/ginsn-cofi-1.l binutils-2.42/gas/testsuite/gas/scfi/x86_64/ginsn-cofi-1.l
--- binutils.orig/gas/testsuite/gas/scfi/x86_64/ginsn-cofi-1.l 1970-01-01 01:00:00.000000000 +0100
+++ binutils-2.42/gas/testsuite/gas/scfi/x86_64/ginsn-cofi-1.l 2024-02-07 11:08:34.164238910 +0000
@@ -0,0 +1,38 @@
+.*: Assembler messages:
+.*:20: Error: untraceable control flow for func 'foo'
+GAS LISTING .*
+
+
+ 1 # Testcase with a variety of "change of flow instructions"
+ 2 #
+ 3 # This test does not have much going on wrt synthesis of CFI;
+ 4 # it just aims to ensure x8_64 -> ginsn decoding behaves
+ 5 # gracefully for these "change of flow instructions"
+ 6 .text
+ 7 .globl foo
+ 8 .type foo, @function
+ 8 ginsn: SYM FUNC_BEGIN
+ 9 foo:
+ 9 ginsn: SYM foo
+ 10 \?\?\?\? 4801D0 addq %rdx, %rax
+ 10 ginsn: ADD %r1, %r0, %r0
+ 11 \?\?\?\? E200 loop foo
+ 11 ginsn: JCC
+ 12 \?\?\?\? 3EFFE0 notrack jmp \*%rax
+ 12 ginsn: JMP %r0,
+ 13 \?\?\?\? 41FFD0 call \*%r8
+ 13 ginsn: CALL
+ 14 \?\?\?\? 67E305 jecxz .L179
+ 14 ginsn: JCC
+ 15 \?\?\?\? FF6730 jmp \*48\(%rdi\)
+ 15 ginsn: JMP %r5,
+ 16 \?\?\?\? 7000 jo .L179
+ 16 ginsn: JCC
+ 17 .L179:
+ 17 ginsn: SYM .L179
+ 18 \?\?\?\? C3 ret
+ 18 ginsn: RET
+ 19 .LFE0:
+ 19 ginsn: SYM .LFE0
+ 20 .size foo, .-foo
+ 20 ginsn: SYM FUNC_END
diff -rupN binutils.orig/gas/testsuite/gas/scfi/x86_64/ginsn-cofi-1.s binutils-2.42/gas/testsuite/gas/scfi/x86_64/ginsn-cofi-1.s
--- binutils.orig/gas/testsuite/gas/scfi/x86_64/ginsn-cofi-1.s 1970-01-01 01:00:00.000000000 +0100
+++ binutils-2.42/gas/testsuite/gas/scfi/x86_64/ginsn-cofi-1.s 2024-02-07 11:08:34.164238910 +0000
@@ -0,0 +1,20 @@
+# Testcase with a variety of "change of flow instructions"
+#
+# This test does not have much going on wrt synthesis of CFI;
+# it just aims to ensure x8_64 -> ginsn decoding behaves
+# gracefully for these "change of flow instructions"
+ .text
+ .globl foo
+ .type foo, @function
+foo:
+ addq %rdx, %rax
+ loop foo
+ notrack jmp *%rax
+ call *%r8
+ jecxz .L179
+ jmp *48(%rdi)
+ jo .L179
+.L179:
+ ret
+.LFE0:
+ .size foo, .-foo

View File

@ -1,33 +0,0 @@
diff --git a/ld/testsuite/ld-x86-64/property-3.r b/ld/testsuite/ld-x86-64/property-3.r
index 1bdb47c7b6b..1e4a24c6fbe 100644
--- a/ld/testsuite/ld-x86-64/property-3.r
+++ b/ld/testsuite/ld-x86-64/property-3.r
@@ -4,5 +4,5 @@ Displaying notes found in: .note.gnu.property
GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0
Properties: stack size: 0x800000
#...
- x86 ISA needed: x86-64-baseline, x86-64-v2
+ x86 ISA needed: x86-64-baseline, x86-64-v2.*
#pass
diff --git a/ld/testsuite/ld-x86-64/property-4.r b/ld/testsuite/ld-x86-64/property-4.r
index 8cc618cbfad..031a1d280ad 100644
--- a/ld/testsuite/ld-x86-64/property-4.r
+++ b/ld/testsuite/ld-x86-64/property-4.r
@@ -4,5 +4,5 @@ Displaying notes found in: .note.gnu.property
GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0
Properties: stack size: 0x800000
#...
- x86 ISA needed: x86-64-baseline, x86-64-v2, x86-64-v4
+ x86 ISA needed: x86-64-baseline, x86-64-v2,.*x86-64-v4
#pass
diff --git a/ld/testsuite/ld-x86-64/property-5.r b/ld/testsuite/ld-x86-64/property-5.r
index e3ba4f659b9..58b274b9772 100644
--- a/ld/testsuite/ld-x86-64/property-5.r
+++ b/ld/testsuite/ld-x86-64/property-5.r
@@ -4,5 +4,5 @@ Displaying notes found in: .note.gnu.property
GNU 0x[0-9a-f]+ NT_GNU_PROPERTY_TYPE_0
Properties: stack size: 0x900000
#...
- x86 ISA needed: x86-64-baseline, x86-64-v2, x86-64-v4
+ x86 ISA needed: x86-64-baseline, x86-64-v2,.*x86-64-v4
#pass

View File

@ -1,8 +1,8 @@
Summary: A GNU collection of binary utilities
Name: binutils%{?_with_debug:-debug}
Version: 2.41
Release: 34%{?dist}
Version: 2.42
Release: 2%{?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
@ -210,12 +210,12 @@ Patch06: binutils-2.27-aarch64-ifunc.patch
Patch07: binutils-do-not-link-with-static-libstdc++.patch
# Purpose: Allow OS specific sections in section groups.
# Lifetime: Fixed in 2.42 (maybe)
# Lifetime: Fixed in 2.43 (maybe)
Patch08: binutils-special-sections-in-groups.patch
# Purpose: Stop gold from aborting when input sections with the same name
# have different flags.
# Lifetime: Fixed in 2.42 (maybe)
# Lifetime: Fixed in 2.43 (maybe)
Patch09: binutils-gold-mismatched-section-flags.patch
# Purpose: Change the gold configuration script to only warn about
@ -231,7 +231,7 @@ Patch11: binutils-gold-i386-gnu-property-notes.patch
# Purpose: Allow the binutils to be configured with any (recent) version of
# autoconf.
# Lifetime: Fixed in 2.42 (maybe ?)
# Lifetime: Fixed in 2.43 (maybe ?)
Patch12: binutils-autoconf-version.patch
# Purpose: Stop libtool from inserting useless runpaths into binaries.
@ -245,7 +245,7 @@ Patch14: binutils-update-linker-manual.patch
%endif
# Purpose: Stop an abort when using dwp to process a file with no dwo links.
# Lifetime: Fixed in 2.42 (maybe)
# Lifetime: Fixed in 2.43 (maybe)
Patch15: binutils-gold-empty-dwp.patch
# Purpose: Fix binutils testsuite failures.
@ -256,80 +256,33 @@ Patch16: binutils-testsuite-fixes.patch
# Lifetime: Permanent, but varies with each rebase.
Patch17: binutils-riscv-testsuite-fixes.patch
# Purpose: Fix the GOLD linker's handling of 32-bit PowerPC binaries.
# Lifetime: Fixed in 2.42
Patch18: binutils-gold-powerpc.patch
# Purpose: Fix a potential NULL pointer dereference when parsing corrupt
# ELF symbol version information.
# Lifetime: Fixed in 2.42
Patch19: binutils-handle-corrupt-version-info.patch
# Purpose: Add options to turn the bfd linker's warnings about executable
# stacks and rwx segments into errors.
# Lifetime: Fixed in 2.42
Patch20: binutils-execstack-error.patch
# Purpose: Accept and ignore R_BPF_64_NODYLD32 relocations.
# Lifetime: Fixed in 2.42
Patch21: binutils-BPF-reloc-4.patch
# Purpose: Allow for x86_64 build environments that use a base ISA of x86-64-v3.
# Lifetime: Fixed in 2.42
Patch22: binutils-x86-64-v3.patch
# Purpose: Fix mergeing strings in really big programs.
# Lifetime: Fixed in 2.42
Patch23: binutils-big-merge.patch
# Purpose: Fix linker generated call veneers for large AArch64 programs with BTI enabled.
# Lifetime: Fixed in 2.42
Patch24: binutils-aarch64-big-bti-programs.patch
# Purpose: Make the GOLD linker ignore the "-z pack-relative-relocs" command line option.
# Lifetime: Fixed in 2.42 (maybe)
Patch25: binutils-gold-pack-relative-relocs.patch
# Purpose: Add support for Intel's AVX10.1 architecture extension to gas.
# Lifetime: Fixed in 2.42
Patch26: i686-AVX10.1-part-1.patch
Patch27: i686-AVX10.1-part-2.patch
Patch28: i686-AVX10.1-part-3.patch
Patch29: i686-AVX10.1-part-4.patch
Patch30: i686-AVX10.1-part-5.patch
Patch31: i686-AVX10.1-part-6.patch
# Purpose: Fix: PR31179, The SET/ADD/SUB fix breaks ABI compatibility with 2.41 objects
# Lifetime: Fixed in 2.42
Patch32: binutils-riscv-SUB_ULEB128.patch
# Lifetime: Fixed in 2.43 (maybe)
Patch18: binutils-gold-pack-relative-relocs.patch
# Purpose: Let the gold lihnker ignore --error-execstack and --error-rwx-segments.
# Lifetime: Fixed in 2.42 (maybe)
Patch33: binutils-gold-ignore-execstack-error.patch
# Purpose: Fix the allocation of space for DT_RELR relocations on PPC64.
# Lifetime: Fixed in 2.42 (maybe)
Patch34: binutils-ppc-dt_relr-relocs.patch
# Purpose: Add support for mangling used by gcc v14.
# Lifetime: Fixed in 2.42
Patch35: binutils-demangler-updates.patch
# Purpose: Add support for Intel's APX extensions (part 1)
# Lifetime: Fixed in 2.42
Patch36: binutils-Intel-APX-part-1.patch
# Lifetime: Fixed in 2.43 (maybe)
Patch19: binutils-gold-ignore-execstack-error.patch
# Purpose: Add support for IBM's Power11 architecture extensions
# Lifetime: Fixed in 2.43
Patch37: binutils-power-11.patch
Patch20: binutils-power-11.patch
# Purpose: Have the bfd linker's --fatal-warnings option act consistently.
# Lifetime: Fixed in 2.43
Patch21: binutils-fatal-warnings.patch
# Purpose: Add missing scfi tests to the assembler.
# Lifetime: Fixed in 2.43
Patch22: binutils-scfi-tests-fix.patch
# Purpose: Fix support for Intel's APX extensions (part 1)
# Lifetime: Fixed in 2.43
Patch38: binutils-Intel-APX-part-1-fixes.patch
Patch23: binutils-Intel-APX-part-1-fixes.patch
# Purpose: Import top-level multlib.am file.
# Lifetime: Fixed in 2.42
Patch39: binutils-multilib.am.patch
# Purpose: Fix the ar test of non-deterministic archives.
# Lifetime: Fixed in 2.43
Patch24: binutils-fix-ar-test.patch
# Purpose: Suppress the x86 linker's p_align-1 tests due to kernel bug on CentOS-10
# Lifetime: TEMPORARY
@ -1370,6 +1323,29 @@ exit 0
#----------------------------------------------------------------------------
%changelog
* Wed Feb 14 2024 Nick Clifton <nickc@redhat.com> - 2.42-2
- Add support for PowerPC v11 architecture extensions.
* Wed Feb 14 2024 Nick Clifton <nickc@redhat.com> - 2.42-1
- Rebase to GNU Binutils 2.42.
- Retire: binutils-BPF-reloc-4.patch
- Retire: binutils-Intel-APX-part-1.patch
- Retire: binutils-aarch64-big-bti-programs.patch
- Retire: binutils-big-merge.patch
- Retire: binutils-demangler-updates.patch
- Retire: binutils-execstack-error.patch
- Retire: binutils-gold-powerpc.patch
- Retire: binutils-handle-corrupt-version-info.patch
- Retire: binutils-ppc-dt_relr-relocs.patch
- Retire: binutils-riscv-SUB_ULEB128.patch
- Retire: binutils-x86-64-v3.patch
- Retire: i686-AVX10.1-part-1.patch
- Retire: i686-AVX10.1-part-2.patch
- Retire: i686-AVX10.1-part-3.patch
- Retire: i686-AVX10.1-part-4.patch
- Retire: i686-AVX10.1-part-5.patch
- Retire: i686-AVX10.1-part-6.patch
* Mon Feb 12 2024 Nick Clifton <nickc@redhat.com> - 2.41-34
- Backport commits 5a635f1f59ad and 41e115853eef to fix some APX issues.
- Add top-level multilib.am file.

View File

@ -1,209 +0,0 @@
From e30e95759268ce5a5a1f752b3c9fa3e4a182db99 Mon Sep 17 00:00:00 2001
From: Jan Beulich <jbeulich@suse.com>
Date: Fri, 1 Sep 2023 12:28:57 +0200
Subject: [PATCH] x86: correct source used for two non-AVX512 VEXWIG tests
These shouldn't wrongly include the AVX512VL sources. Obviously the
expectations therefore also need to change.
---
gas/testsuite/gas/i386/vaes-wig1.d | 118 ++++-------------------
gas/testsuite/gas/i386/vpclmulqdq-wig1.d | 44 +++------
2 files changed, 32 insertions(+), 130 deletions(-)
diff --git a/gas/testsuite/gas/i386/vaes-wig1.d b/gas/testsuite/gas/i386/vaes-wig1.d
index 8e8567e01df..9d37e52b49e 100644
--- a/gas/testsuite/gas/i386/vaes-wig1.d
+++ b/gas/testsuite/gas/i386/vaes-wig1.d
@@ -1,7 +1,7 @@
#as: -mvexwig=1
#objdump: -dw
#name: i386 AVX/VAES wig insns
-#source: avx512vl_vaes.s
+#source: vaes.s
.*: +file format .*
@@ -9,100 +9,24 @@
Disassembly of section \.text:
00000000 <_start>:
-[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f0\(%edx\),%xmm5,%xmm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 28 de f4[ ]*\{evex\} vaesdec %ymm4,%ymm5,%ymm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 28 de b4 f4 c0 1d fe ff[ ]*\{evex\} vaesdec -0x1e240\(%esp,%esi,8\),%ymm5,%ymm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 28 de 72 7f[ ]*\{evex\} vaesdec 0xfe0\(%edx\),%ymm5,%ymm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 08 df f4[ ]*\{evex\} vaesdeclast %xmm4,%xmm5,%xmm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 08 df b4 f4 c0 1d fe ff[ ]*\{evex\} vaesdeclast -0x1e240\(%esp,%esi,8\),%xmm5,%xmm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 08 df 72 7f[ ]*\{evex\} vaesdeclast 0x7f0\(%edx\),%xmm5,%xmm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 28 df f4[ ]*\{evex\} vaesdeclast %ymm4,%ymm5,%ymm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 28 df b4 f4 c0 1d fe ff[ ]*\{evex\} vaesdeclast -0x1e240\(%esp,%esi,8\),%ymm5,%ymm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 28 df 72 7f[ ]*\{evex\} vaesdeclast 0xfe0\(%edx\),%ymm5,%ymm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 08 dc f4[ ]*\{evex\} vaesenc %xmm4,%xmm5,%xmm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 08 dc b4 f4 c0 1d fe ff[ ]*\{evex\} vaesenc -0x1e240\(%esp,%esi,8\),%xmm5,%xmm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 08 dc 72 7f[ ]*\{evex\} vaesenc 0x7f0\(%edx\),%xmm5,%xmm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 28 dc f4[ ]*\{evex\} vaesenc %ymm4,%ymm5,%ymm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 28 dc b4 f4 c0 1d fe ff[ ]*\{evex\} vaesenc -0x1e240\(%esp,%esi,8\),%ymm5,%ymm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 28 dc 72 7f[ ]*\{evex\} vaesenc 0xfe0\(%edx\),%ymm5,%ymm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 08 dd f4[ ]*\{evex\} vaesenclast %xmm4,%xmm5,%xmm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 08 dd b4 f4 c0 1d fe ff[ ]*\{evex\} vaesenclast -0x1e240\(%esp,%esi,8\),%xmm5,%xmm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 08 dd 72 7f[ ]*\{evex\} vaesenclast 0x7f0\(%edx\),%xmm5,%xmm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 28 dd f4[ ]*\{evex\} vaesenclast %ymm4,%ymm5,%ymm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 28 dd b4 f4 c0 1d fe ff[ ]*\{evex\} vaesenclast -0x1e240\(%esp,%esi,8\),%ymm5,%ymm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 28 dd 72 7f[ ]*\{evex\} vaesenclast 0xfe0\(%edx\),%ymm5,%ymm6
-[ ]*[a-f0-9]+:[ ]*c4 e2 d1 de f4[ ]*vaesdec %xmm4,%xmm5,%xmm6
-[ ]*[a-f0-9]+:[ ]*c4 e2 d1 de b4 f4 c0 1d fe ff[ ]*vaesdec -0x1e240\(%esp,%esi,8\),%xmm5,%xmm6
-[ ]*[a-f0-9]+:[ ]*c4 e2 d1 de b2 f0 07 00 00[ ]*vaesdec 0x7f0\(%edx\),%xmm5,%xmm6
-[ ]*[a-f0-9]+:[ ]*c4 e2 d5 de f4[ ]*vaesdec %ymm4,%ymm5,%ymm6
-[ ]*[a-f0-9]+:[ ]*c4 e2 d5 de b4 f4 c0 1d fe ff[ ]*v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m5,%ymm6
-[ ]*[a-f0-9]+:[ ]*c4 e2 d1 dd f4[ ]*vaesenclast %xmm4,%xmm5,%xmm6
-[ ]*[a-f0-9]+:[ ]*c4 e2 d1 dd b4 f4 c0 1d fe ff[ ]*vaesenclast -0x1e240\(%esp,%esi,8\),%xmm5,%xmm6
-[ ]*[a-f0-9]+:[ ]*c4 e2 d1 dd b2 f0 07 00 00[ ]*vaesenclast 0x7f0\(%edx\),%xmm5,%xmm6
-[ ]*[a-f0-9]+:[ ]*c4 e2 d5 dd f4[ ]*vaesenclast %ymm4,%ymm5,%ymm6
-[ ]*[a-f0-9]+:[ ]*c4 e2 d5 dd b4 f4 c0 1d fe ff[ ]*vaesenclast -0x1e240\(%esp,%esi,8\),%ymm5,%ymm6
-[ ]*[a-f0-9]+:[ ]*c4 e2 d5 dd b2 e0 0f 00 00[ ]*vaesenclast 0xfe0\(%edx\),%ymm5,%ymm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 08 de f4[ ]*\{evex\} vaesdec %xmm4,%xmm5,%xmm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 08 de b4 f4 c0 1d fe ff[ ]*\{evex\} vaesdec -0x1e240\(%esp,%esi,8\),%xmm5,%xmm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 08 de 72 7f[ ]*\{evex\} vaesdec 0x7f0\(%edx\),%xmm5,%xmm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 28 de f4[ ]*\{evex\} vaesdec %ymm4,%ymm5,%ymm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 28 de b4 f4 c0 1d fe ff[ ]*\{evex\} vaesdec -0x1e240\(%esp,%esi,8\),%ymm5,%ymm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 28 de 72 7f[ ]*\{evex\} vaesdec 0xfe0\(%edx\),%ymm5,%ymm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 08 df f4[ ]*\{evex\} vaesdeclast %xmm4,%xmm5,%xmm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 08 df b4 f4 c0 1d fe ff[ ]*\{evex\} vaesdeclast -0x1e240\(%esp,%esi,8\),%xmm5,%xmm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 08 df 72 7f[ ]*\{evex\} vaesdeclast 0x7f0\(%edx\),%xmm5,%xmm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 28 df f4[ ]*\{evex\} vaesdeclast %ymm4,%ymm5,%ymm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 28 df b4 f4 c0 1d fe ff[ ]*\{evex\} vaesdeclast -0x1e240\(%esp,%esi,8\),%ymm5,%ymm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 28 df 72 7f[ ]*\{evex\} vaesdeclast 0xfe0\(%edx\),%ymm5,%ymm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 08 dc f4[ ]*\{evex\} vaesenc %xmm4,%xmm5,%xmm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 08 dc b4 f4 c0 1d fe ff[ ]*\{evex\} vaesenc -0x1e240\(%esp,%esi,8\),%xmm5,%xmm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 08 dc 72 7f[ ]*\{evex\} vaesenc 0x7f0\(%edx\),%xmm5,%xmm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 28 dc f4[ ]*\{evex\} vaesenc %ymm4,%ymm5,%ymm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 28 dc b4 f4 c0 1d fe ff[ ]*\{evex\} vaesenc -0x1e240\(%esp,%esi,8\),%ymm5,%ymm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 28 dc 72 7f[ ]*\{evex\} vaesenc 0xfe0\(%edx\),%ymm5,%ymm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 08 dd f4[ ]*\{evex\} vaesenclast %xmm4,%xmm5,%xmm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 08 dd b4 f4 c0 1d fe ff[ ]*\{evex\} vaesenclast -0x1e240\(%esp,%esi,8\),%xmm5,%xmm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 08 dd 72 7f[ ]*\{evex\} vaesenclast 0x7f0\(%edx\),%xmm5,%xmm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 28 dd f4[ ]*\{evex\} vaesenclast %ymm4,%ymm5,%ymm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 28 dd b4 f4 c0 1d fe ff[ ]*\{evex\} vaesenclast -0x1e240\(%esp,%esi,8\),%ymm5,%ymm6
-[ ]*[a-f0-9]+:[ ]*62 f2 55 28 dd 72 7f[ ]*\{evex\} vaesenclast 0xfe0\(%edx\),%ymm5,%ymm6
+[ ]*[a-f0-9]+: c4 e2 cd dc d4 vaesenc %ymm4,%ymm6,%ymm2
+[ ]*[a-f0-9]+: c4 e2 cd dc 39 vaesenc \(%ecx\),%ymm6,%ymm7
+[ ]*[a-f0-9]+: c4 e2 cd dd d4 vaesenclast %ymm4,%ymm6,%ymm2
+[ ]*[a-f0-9]+: c4 e2 cd dd 39 vaesenclast \(%ecx\),%ymm6,%ymm7
+[ ]*[a-f0-9]+: c4 e2 cd de d4 vaesdec %ymm4,%ymm6,%ymm2
+[ ]*[a-f0-9]+: c4 e2 cd de 39 vaesdec \(%ecx\),%ymm6,%ymm7
+[ ]*[a-f0-9]+: c4 e2 cd df d4 vaesdeclast %ymm4,%ymm6,%ymm2
+[ ]*[a-f0-9]+: c4 e2 cd df 39 vaesdeclast \(%ecx\),%ymm6,%ymm7
+[ ]*[a-f0-9]+: c4 e2 cd dc d4 vaesenc %ymm4,%ymm6,%ymm2
+[ ]*[a-f0-9]+: c4 e2 cd dc 39 vaesenc \(%ecx\),%ymm6,%ymm7
+[ ]*[a-f0-9]+: c4 e2 cd dc 39 vaesenc \(%ecx\),%ymm6,%ymm7
+[ ]*[a-f0-9]+: c4 e2 cd dd d4 vaesenclast %ymm4,%ymm6,%ymm2
+[ ]*[a-f0-9]+: c4 e2 cd dd 39 vaesenclast \(%ecx\),%ymm6,%ymm7
+[ ]*[a-f0-9]+: c4 e2 cd dd 39 vaesenclast \(%ecx\),%ymm6,%ymm7
+[ ]*[a-f0-9]+: c4 e2 cd de d4 vaesdec %ymm4,%ymm6,%ymm2
+[ ]*[a-f0-9]+: c4 e2 cd de 39 vaesdec \(%ecx\),%ymm6,%ymm7
+[ ]*[a-f0-9]+: c4 e2 cd de 39 vaesdec \(%ecx\),%ymm6,%ymm7
+[ ]*[a-f0-9]+: c4 e2 cd df d4 vaesdeclast %ymm4,%ymm6,%ymm2
+[ ]*[a-f0-9]+: c4 e2 cd df 39 vaesdeclast \(%ecx\),%ymm6,%ymm7
+[ ]*[a-f0-9]+: c4 e2 cd df 39 vaesdeclast \(%ecx\),%ymm6,%ymm7
#pass
diff --git a/gas/testsuite/gas/i386/vpclmulqdq-wig1.d b/gas/testsuite/gas/i386/vpclmulqdq-wig1.d
index 843bf56bc21..52bb1651201 100644
--- a/gas/testsuite/gas/i386/vpclmulqdq-wig1.d
+++ b/gas/testsuite/gas/i386/vpclmulqdq-wig1.d
@@ -1,7 +1,7 @@
#as: -mvexwig=1
#objdump: -dw
#name: i386 AVX/VPCLMULQDQ wig insns
-#source: avx512vl_vpclmulqdq.s
+#source: vpclmulqdq.s
.*: +file format .*
@@ -9,36 +9,14 @@
Disassembly of section \.text:
00000000 <_start>:
-[ ]*[a-f0-9]+:[ ]*c4 e3 e9 44 da ab[ ]*vpclmulqdq \$0xab,%xmm2,%xmm2,%xmm3
-[ ]*[a-f0-9]+:[ ]*c4 e3 e9 44 9c f4 c0 1d fe ff 7b[ ]*vpclmulqdq \$0x7b,-0x1e240\(%esp,%esi,8\),%xmm2,%xmm3
-[ ]*[a-f0-9]+:[ ]*c4 e3 e9 44 9a f0 07 00 00 7b[ ]*vpclmulqdq \$0x7b,0x7f0\(%edx\),%xmm2,%xmm3
-[ ]*[a-f0-9]+:[ ]*c4 e3 d5 44 e1 ab[ ]*vpclmulqdq \$0xab,%ymm1,%ymm5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 ]*c4 e3 d5 44 b4 f4 c0 1d fe ff 7b[ ]*vpclmulqdq \$0x7b,-0x1e240\(%esp,%esi,8\),%ymm5,%ymm6
+[ ]*[a-f0-9]+:[ ]*c4 e3 d5 44 b2 e0 0f 00 00 7b[ ]*vpclmulqdq \$0x7b,0xfe0\(%edx\),%ymm5,%ymm6
#pass
--
2.43.0

View File

@ -1,379 +0,0 @@
From dfab07b9ead66f08661325c03175e1df9210ccd7 Mon Sep 17 00:00:00 2001
From: Jan Beulich <jbeulich@suse.com>
Date: Fri, 1 Sep 2023 12:29:44 +0200
Subject: [PATCH] x86: unindent most of set_cpu_arch()
Inverting the initial if()'s condition allows to move out the bulk of
the function by a level, improving readability at least a bit. While
doing that also pull the push/pop handling up first, such that "else if"
after "return" isn't needed anymore; the order in which special cases
are checked doesn't really matter.
---
gas/config/tc-i386.c | 305 ++++++++++++++++++++++---------------------
1 file changed, 154 insertions(+), 151 deletions(-)
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 19a5f2d61e5..00abfc78264 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -2793,29 +2793,134 @@ set_cpu_arch (int dummy ATTRIBUTE_UNUSED)
bool no_cond_jump_promotion;
} arch_stack_entry;
static const arch_stack_entry *arch_stack_top;
+ char *s;
+ int e;
+ const char *string;
+ unsigned int j = 0;
+ i386_cpu_flags flags;
SKIP_WHITESPACE ();
- if (!is_end_of_line[(unsigned char) *input_line_pointer])
+ if (is_end_of_line[(unsigned char) *input_line_pointer])
+ {
+ as_bad (_("missing cpu architecture"));
+ input_line_pointer++;
+ return;
+ }
+
+ e = get_symbol_name (&s);
+ string = s;
+
+ if (strcmp (string, "push") == 0)
+ {
+ arch_stack_entry *top = XNEW (arch_stack_entry);
+
+ top->name = cpu_arch_name;
+ if (cpu_sub_arch_name)
+ top->sub_name = xstrdup (cpu_sub_arch_name);
+ else
+ top->sub_name = NULL;
+ top->flags = cpu_arch_flags;
+ top->isa = cpu_arch_isa;
+ top->isa_flags = cpu_arch_isa_flags;
+ top->flag_code = flag_code;
+ top->stackop_size = stackop_size;
+ top->no_cond_jump_promotion = no_cond_jump_promotion;
+
+ top->prev = arch_stack_top;
+ arch_stack_top = top;
+
+ (void) restore_line_pointer (e);
+ demand_empty_rest_of_line ();
+ return;
+ }
+
+ if (strcmp (string, "pop") == 0)
{
- char *s;
- int e = get_symbol_name (&s);
- const char *string = s;
- unsigned int j = 0;
- i386_cpu_flags flags;
+ const arch_stack_entry *top = arch_stack_top;
- if (strcmp (string, "default") == 0)
+ if (!top)
+ as_bad (_(".arch stack is empty"));
+ else if (top->flag_code != flag_code
+ || top->stackop_size != stackop_size)
+ {
+ static const unsigned int bits[] = {
+ [CODE_16BIT] = 16,
+ [CODE_32BIT] = 32,
+ [CODE_64BIT] = 64,
+ };
+
+ as_bad (_("this `.arch pop' requires `.code%u%s' to be in effect"),
+ bits[top->flag_code],
+ top->stackop_size == LONG_MNEM_SUFFIX ? "gcc" : "");
+ }
+ else
+ {
+ arch_stack_top = top->prev;
+
+ cpu_arch_name = top->name;
+ free (cpu_sub_arch_name);
+ cpu_sub_arch_name = top->sub_name;
+ cpu_arch_flags = top->flags;
+ cpu_arch_isa = top->isa;
+ cpu_arch_isa_flags = top->isa_flags;
+ no_cond_jump_promotion = top->no_cond_jump_promotion;
+
+ XDELETE (top);
+ }
+
+ (void) restore_line_pointer (e);
+ demand_empty_rest_of_line ();
+ return;
+ }
+
+ if (strcmp (string, "default") == 0)
+ {
+ if (strcmp (default_arch, "iamcu") == 0)
+ string = default_arch;
+ else
{
- if (strcmp (default_arch, "iamcu") == 0)
- string = default_arch;
+ static const i386_cpu_flags cpu_unknown_flags = CPU_UNKNOWN_FLAGS;
+
+ cpu_arch_name = NULL;
+ free (cpu_sub_arch_name);
+ cpu_sub_arch_name = NULL;
+ cpu_arch_flags = cpu_unknown_flags;
+ if (flag_code == CODE_64BIT)
+ {
+ cpu_arch_flags.bitfield.cpu64 = 1;
+ cpu_arch_flags.bitfield.cpuno64 = 0;
+ }
else
{
- static const i386_cpu_flags cpu_unknown_flags = CPU_UNKNOWN_FLAGS;
+ cpu_arch_flags.bitfield.cpu64 = 0;
+ cpu_arch_flags.bitfield.cpuno64 = 1;
+ }
+ cpu_arch_isa = PROCESSOR_UNKNOWN;
+ cpu_arch_isa_flags = cpu_arch[flag_code == CODE_64BIT].enable;
+ if (!cpu_arch_tune_set)
+ {
+ cpu_arch_tune = cpu_arch_isa;
+ cpu_arch_tune_flags = cpu_arch_isa_flags;
+ }
+
+ j = ARRAY_SIZE (cpu_arch) + 1;
+ }
+ }
+
+ for (; j < ARRAY_SIZE (cpu_arch); j++)
+ {
+ if (strcmp (string + (*string == '.'), cpu_arch[j].name) == 0
+ && (*string == '.') == (cpu_arch[j].type == PROCESSOR_NONE))
+ {
+ if (*string != '.')
+ {
+ check_cpu_arch_compatible (string, cpu_arch[j].enable);
- cpu_arch_name = NULL;
+ cpu_arch_name = cpu_arch[j].name;
free (cpu_sub_arch_name);
cpu_sub_arch_name = NULL;
- cpu_arch_flags = cpu_unknown_flags;
+ cpu_arch_flags = cpu_arch[j].enable;
if (flag_code == CODE_64BIT)
{
cpu_arch_flags.bitfield.cpu64 = 1;
@@ -2826,173 +2931,71 @@ set_cpu_arch (int dummy ATTRIBUTE_UNUSED)
cpu_arch_flags.bitfield.cpu64 = 0;
cpu_arch_flags.bitfield.cpuno64 = 1;
}
- cpu_arch_isa = PROCESSOR_UNKNOWN;
- cpu_arch_isa_flags = cpu_arch[flag_code == CODE_64BIT].enable;
+ cpu_arch_isa = cpu_arch[j].type;
+ cpu_arch_isa_flags = cpu_arch[j].enable;
if (!cpu_arch_tune_set)
{
cpu_arch_tune = cpu_arch_isa;
cpu_arch_tune_flags = cpu_arch_isa_flags;
}
-
- j = ARRAY_SIZE (cpu_arch) + 1;
+ pre_386_16bit_warned = false;
+ break;
}
- }
- else if (strcmp (string, "push") == 0)
- {
- arch_stack_entry *top = XNEW (arch_stack_entry);
- top->name = cpu_arch_name;
- if (cpu_sub_arch_name)
- top->sub_name = xstrdup (cpu_sub_arch_name);
- else
- top->sub_name = NULL;
- top->flags = cpu_arch_flags;
- top->isa = cpu_arch_isa;
- top->isa_flags = cpu_arch_isa_flags;
- top->flag_code = flag_code;
- top->stackop_size = stackop_size;
- top->no_cond_jump_promotion = no_cond_jump_promotion;
+ if (cpu_flags_all_zero (&cpu_arch[j].enable))
+ continue;
- top->prev = arch_stack_top;
- arch_stack_top = top;
+ flags = cpu_flags_or (cpu_arch_flags, cpu_arch[j].enable);
- (void) restore_line_pointer (e);
- demand_empty_rest_of_line ();
- return;
- }
- else if (strcmp (string, "pop") == 0)
- {
- const arch_stack_entry *top = arch_stack_top;
-
- if (!top)
- as_bad (_(".arch stack is empty"));
- else if (top->flag_code != flag_code
- || top->stackop_size != stackop_size)
+ if (!cpu_flags_equal (&flags, &cpu_arch_flags))
{
- static const unsigned int bits[] = {
- [CODE_16BIT] = 16,
- [CODE_32BIT] = 32,
- [CODE_64BIT] = 64,
- };
-
- as_bad (_("this `.arch pop' requires `.code%u%s' to be in effect"),
- bits[top->flag_code],
- top->stackop_size == LONG_MNEM_SUFFIX ? "gcc" : "");
+ extend_cpu_sub_arch_name (string + 1);
+ cpu_arch_flags = flags;
+ cpu_arch_isa_flags = flags;
}
else
- {
- arch_stack_top = top->prev;
-
- cpu_arch_name = top->name;
- free (cpu_sub_arch_name);
- cpu_sub_arch_name = top->sub_name;
- cpu_arch_flags = top->flags;
- cpu_arch_isa = top->isa;
- cpu_arch_isa_flags = top->isa_flags;
- no_cond_jump_promotion = top->no_cond_jump_promotion;
-
- XDELETE (top);
- }
+ cpu_arch_isa_flags
+ = cpu_flags_or (cpu_arch_isa_flags, cpu_arch[j].enable);
(void) restore_line_pointer (e);
demand_empty_rest_of_line ();
return;
}
+ }
- for (; j < ARRAY_SIZE (cpu_arch); j++)
- {
- if (strcmp (string + (*string == '.'), cpu_arch[j].name) == 0
- && (*string == '.') == (cpu_arch[j].type == PROCESSOR_NONE))
- {
- if (*string != '.')
- {
- check_cpu_arch_compatible (string, cpu_arch[j].enable);
-
- cpu_arch_name = cpu_arch[j].name;
- free (cpu_sub_arch_name);
- cpu_sub_arch_name = NULL;
- cpu_arch_flags = cpu_arch[j].enable;
- if (flag_code == CODE_64BIT)
- {
- cpu_arch_flags.bitfield.cpu64 = 1;
- cpu_arch_flags.bitfield.cpuno64 = 0;
- }
- else
- {
- cpu_arch_flags.bitfield.cpu64 = 0;
- cpu_arch_flags.bitfield.cpuno64 = 1;
- }
- cpu_arch_isa = cpu_arch[j].type;
- cpu_arch_isa_flags = cpu_arch[j].enable;
- if (!cpu_arch_tune_set)
- {
- cpu_arch_tune = cpu_arch_isa;
- cpu_arch_tune_flags = cpu_arch_isa_flags;
- }
- pre_386_16bit_warned = false;
- break;
- }
-
- if (cpu_flags_all_zero (&cpu_arch[j].enable))
- continue;
-
- flags = cpu_flags_or (cpu_arch_flags,
- cpu_arch[j].enable);
-
- if (!cpu_flags_equal (&flags, &cpu_arch_flags))
- {
- extend_cpu_sub_arch_name (string + 1);
- cpu_arch_flags = flags;
- cpu_arch_isa_flags = flags;
- }
- else
- cpu_arch_isa_flags
- = cpu_flags_or (cpu_arch_isa_flags,
- cpu_arch[j].enable);
- (void) restore_line_pointer (e);
- demand_empty_rest_of_line ();
- return;
- }
- }
-
- if (startswith (string, ".no") && j >= ARRAY_SIZE (cpu_arch))
- {
- /* Disable an ISA extension. */
- for (j = 0; j < ARRAY_SIZE (cpu_arch); j++)
- if (cpu_arch[j].type == PROCESSOR_NONE
- && strcmp (string + 3, cpu_arch[j].name) == 0)
+ if (startswith (string, ".no") && j >= ARRAY_SIZE (cpu_arch))
+ {
+ /* Disable an ISA extension. */
+ for (j = 0; j < ARRAY_SIZE (cpu_arch); j++)
+ if (cpu_arch[j].type == PROCESSOR_NONE
+ && strcmp (string + 3, cpu_arch[j].name) == 0)
+ {
+ flags = cpu_flags_and_not (cpu_arch_flags, cpu_arch[j].disable);
+ if (!cpu_flags_equal (&flags, &cpu_arch_flags))
{
- flags = cpu_flags_and_not (cpu_arch_flags,
- cpu_arch[j].disable);
- if (!cpu_flags_equal (&flags, &cpu_arch_flags))
- {
- extend_cpu_sub_arch_name (string + 1);
- cpu_arch_flags = flags;
- cpu_arch_isa_flags = flags;
- }
- (void) restore_line_pointer (e);
- demand_empty_rest_of_line ();
- return;
+ extend_cpu_sub_arch_name (string + 1);
+ cpu_arch_flags = flags;
+ cpu_arch_isa_flags = flags;
}
- }
-
- if (j == ARRAY_SIZE (cpu_arch))
- as_bad (_("no such architecture: `%s'"), string);
- *input_line_pointer = e;
+ (void) restore_line_pointer (e);
+ demand_empty_rest_of_line ();
+ return;
+ }
}
- else
- as_bad (_("missing cpu architecture"));
+
+ if (j == ARRAY_SIZE (cpu_arch))
+ as_bad (_("no such architecture: `%s'"), string);
+
+ *input_line_pointer = e;
no_cond_jump_promotion = 0;
if (*input_line_pointer == ','
&& !is_end_of_line[(unsigned char) input_line_pointer[1]])
{
- char *string;
- char e;
-
++input_line_pointer;
- e = get_symbol_name (&string);
+ e = get_symbol_name (&s);
+ string = s;
if (strcmp (string, "nojumps") == 0)
no_cond_jump_promotion = 1;
--
2.43.0

View File

@ -1,160 +0,0 @@
diff -rup fred/gas/config/tc-i386.c binutils-2.41/gas/config/tc-i386.c
--- fred/gas/config/tc-i386.c 2023-12-07 10:00:21.013005830 +0000
+++ binutils-2.41/gas/config/tc-i386.c 2023-12-07 10:00:28.037015037 +0000
@@ -1053,8 +1053,8 @@ static const arch_entry cpu_arch[] =
SUBARCH (xsavec, XSAVEC, ANY_XSAVEC, false),
SUBARCH (xsaves, XSAVES, ANY_XSAVES, false),
SUBARCH (aes, AES, ANY_AES, false),
- SUBARCH (pclmul, PCLMUL, ANY_PCLMUL, false),
- SUBARCH (clmul, PCLMUL, ANY_PCLMUL, true),
+ SUBARCH (pclmul, PCLMULQDQ, ANY_PCLMULQDQ, false),
+ SUBARCH (clmul, PCLMULQDQ, ANY_PCLMULQDQ, true),
SUBARCH (fsgsbase, FSGSBASE, FSGSBASE, false),
SUBARCH (rdrnd, RDRND, RDRND, false),
SUBARCH (f16c, F16C, ANY_F16C, false),
@@ -1861,7 +1861,7 @@ cpu_flags_match (const insn_template *t)
|| (sse2avx && !i.prefix[DATA_PREFIX]))
&& (!x.bitfield.cpuaes || cpu.bitfield.cpuaes)
&& (!x.bitfield.cpugfni || cpu.bitfield.cpugfni)
- && (!x.bitfield.cpupclmul || cpu.bitfield.cpupclmul))
+ && (!x.bitfield.cpupclmulqdq || cpu.bitfield.cpupclmulqdq))
match |= CPU_FLAGS_ARCH_MATCH;
}
else if (x.bitfield.cpuavx512f)
diff -rup fred/opcodes/i386-gen.c binutils-2.41/opcodes/i386-gen.c
--- fred/opcodes/i386-gen.c 2023-12-07 10:00:22.092007244 +0000
+++ binutils-2.41/opcodes/i386-gen.c 2023-12-07 10:00:28.038015039 +0000
@@ -79,7 +79,7 @@ static const dependency isa_dependencies
{ "AMDFAM10",
"K8|FISTTP|SSE4A|ABM|MONITOR" },
{ "BDVER1",
- "GENERIC64|FISTTP|Rdtscp|MONITOR|CX16|LAHF_SAHF|XOP|ABM|LWP|SVME|AES|PCLMUL|PRFCHW" },
+ "GENERIC64|FISTTP|Rdtscp|MONITOR|CX16|LAHF_SAHF|XOP|ABM|LWP|SVME|AES|PCLMULQDQ|PRFCHW" },
{ "BDVER2",
"BDVER1|FMA|BMI|TBM|F16C" },
{ "BDVER3",
@@ -87,7 +87,7 @@ static const dependency isa_dependencies
{ "BDVER4",
"BDVER3|AVX2|Movbe|BMI2|RdRnd|MWAITX" },
{ "ZNVER1",
- "GENERIC64|FISTTP|Rdtscp|MONITOR|CX16|LAHF_SAHF|AVX2|SSE4A|ABM|SVME|AES|PCLMUL|PRFCHW|FMA|BMI|F16C|Xsaveopt|FSGSBase|Movbe|BMI2|RdRnd|ADX|RdSeed|SMAP|SHA|XSAVEC|XSAVES|ClflushOpt|CLZERO|MWAITX" },
+ "GENERIC64|FISTTP|Rdtscp|MONITOR|CX16|LAHF_SAHF|AVX2|SSE4A|ABM|SVME|AES|PCLMULQDQ|PRFCHW|FMA|BMI|F16C|Xsaveopt|FSGSBase|Movbe|BMI2|RdRnd|ADX|RdSeed|SMAP|SHA|XSAVEC|XSAVES|ClflushOpt|CLZERO|MWAITX" },
{ "ZNVER2",
"ZNVER1|CLWB|RDPID|RDPRU|MCOMMIT|WBNOINVD" },
{ "ZNVER3",
@@ -97,7 +97,7 @@ static const dependency isa_dependencies
{ "BTVER1",
"GENERIC64|FISTTP|MONITOR|CX16|LAHF_SAHF|Rdtscp|SSSE3|SSE4A|ABM|PRFCHW|Clflush|FISTTP|SVME" },
{ "BTVER2",
- "BTVER1|AVX|BMI|F16C|AES|PCLMUL|Movbe|Xsaveopt|PRFCHW" },
+ "BTVER1|AVX|BMI|F16C|AES|PCLMULQDQ|Movbe|Xsaveopt|PRFCHW" },
{ "286",
"186" },
{ "386",
@@ -132,7 +132,7 @@ static const dependency isa_dependencies
"XSAVE" },
{ "AES",
"SSE2" },
- { "PCLMUL",
+ { "PCLMULQDQ",
"SSE2" },
{ "FMA",
"AVX" },
@@ -307,7 +307,7 @@ static bitfield cpu_flags[] =
BITFIELD (Xsave),
BITFIELD (Xsaveopt),
BITFIELD (AES),
- BITFIELD (PCLMUL),
+ BITFIELD (PCLMULQDQ),
BITFIELD (FMA),
BITFIELD (FMA4),
BITFIELD (XOP),
diff -rup fred/opcodes/i386-init.h binutils-2.41/opcodes/i386-init.h
--- fred/opcodes/i386-init.h 2023-12-07 10:00:22.092007244 +0000
+++ binutils-2.41/opcodes/i386-init.h 2023-12-07 10:00:51.260045479 +0000
@@ -432,7 +432,7 @@
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }
-#define CPU_PCLMUL_FLAGS \
+#define CPU_PCLMULQDQ_FLAGS \
{ { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, \
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
@@ -1791,7 +1791,7 @@
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }
-#define CPU_ANY_PCLMUL_FLAGS \
+#define CPU_ANY_PCLMULQDQ_FLAGS \
{ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
diff -rup fred/opcodes/i386-opc.h binutils-2.41/opcodes/i386-opc.h
--- fred/opcodes/i386-opc.h 2023-12-07 10:00:22.093007246 +0000
+++ binutils-2.41/opcodes/i386-opc.h 2023-12-07 10:00:28.038015039 +0000
@@ -121,8 +121,8 @@ enum
CpuXsaveopt,
/* AES support required */
CpuAES,
- /* PCLMUL support required */
- CpuPCLMUL,
+ /* PCLMULQDQ support required */
+ CpuPCLMULQDQ,
/* FMA support required */
CpuFMA,
/* FMA4 support required */
@@ -374,7 +374,7 @@ typedef union i386_cpu_flags
unsigned int cpuxsave:1;
unsigned int cpuxsaveopt:1;
unsigned int cpuaes:1;
- unsigned int cpupclmul:1;
+ unsigned int cpupclmulqdq:1;
unsigned int cpufma:1;
unsigned int cpufma4:1;
unsigned int cpuxop:1;
diff -rup fred/opcodes/i386-opc.tbl binutils-2.41/opcodes/i386-opc.tbl
--- fred/opcodes/i386-opc.tbl 2023-12-07 10:00:22.093007246 +0000
+++ binutils-2.41/opcodes/i386-opc.tbl 2023-12-07 10:00:28.038015039 +0000
@@ -1448,15 +1448,15 @@ vaesdeclast, 0x66df, VAES, Modrm|Vex256|
vaesenc, 0x66dc, VAES, Modrm|Vex256|Space0F38|VexVVVV|VexWIG|NoSuf, { RegYMM|Unspecified|BaseIndex, RegYMM, RegYMM }
vaesenclast, 0x66dd, VAES, Modrm|Vex256|Space0F38|VexVVVV|VexWIG|NoSuf, { RegYMM|Unspecified|BaseIndex, RegYMM, RegYMM }
-// PCLMUL
+// PCLMULQDQ
<pclmul:cpu:attr, $avx:AVX|:Vex128|VexW0|SSE2AVX|VexVVVV, $sse::>
-pclmulqdq<pclmul>, 0x660f3a44, <pclmul:cpu>PCLMUL, Modrm|<pclmul:attr>|NoSuf, { Imm8|Imm8S, RegXMM|Unspecified|BaseIndex, RegXMM }
-pclmullqlqdq<pclmul>, 0x660f3a44/0x00, <pclmul:cpu>PCLMUL, Modrm|<pclmul:attr>|NoSuf|ImmExt, { RegXMM|Unspecified|BaseIndex, RegXMM }
-pclmulhqlqdq<pclmul>, 0x660f3a44/0x01, <pclmul:cpu>PCLMUL, Modrm|<pclmul:attr>|NoSuf|ImmExt, { RegXMM|Unspecified|BaseIndex, RegXMM }
-pclmullqhqdq<pclmul>, 0x660f3a44/0x10, <pclmul:cpu>PCLMUL, Modrm|<pclmul:attr>|NoSuf|ImmExt, { RegXMM|Unspecified|BaseIndex, RegXMM }
-pclmulhqhqdq<pclmul>, 0x660f3a44/0x11, <pclmul:cpu>PCLMUL, Modrm|<pclmul:attr>|NoSuf|ImmExt, { RegXMM|Unspecified|BaseIndex, RegXMM }
+pclmulqdq<pclmul>, 0x660f3a44, <pclmul:cpu>PCLMULQDQ, Modrm|<pclmul:attr>|NoSuf, { Imm8|Imm8S, RegXMM|Unspecified|BaseIndex, RegXMM }
+pclmullqlqdq<pclmul>, 0x660f3a44/0x00, <pclmul:cpu>PCLMULQDQ, Modrm|<pclmul:attr>|NoSuf|ImmExt, { RegXMM|Unspecified|BaseIndex, RegXMM }
+pclmulhqlqdq<pclmul>, 0x660f3a44/0x01, <pclmul:cpu>PCLMULQDQ, Modrm|<pclmul:attr>|NoSuf|ImmExt, { RegXMM|Unspecified|BaseIndex, RegXMM }
+pclmullqhqdq<pclmul>, 0x660f3a44/0x10, <pclmul:cpu>PCLMULQDQ, Modrm|<pclmul:attr>|NoSuf|ImmExt, { RegXMM|Unspecified|BaseIndex, RegXMM }
+pclmulhqhqdq<pclmul>, 0x660f3a44/0x11, <pclmul:cpu>PCLMULQDQ, Modrm|<pclmul:attr>|NoSuf|ImmExt, { RegXMM|Unspecified|BaseIndex, RegXMM }
// GFNI
@@ -1771,13 +1771,13 @@ vaesenclast, 0x66dd, AVX|AES, Modrm|Vex|
vaesimc, 0x66db, AVX|AES, Modrm|Vex|Space0F38|VexWIG|NoSuf, { Unspecified|BaseIndex|RegXMM, RegXMM }
vaeskeygenassist, 0x66df, AVX|AES, Modrm|Vex|Space0F3A|VexWIG|NoSuf, { Imm8, Unspecified|BaseIndex|RegXMM, RegXMM }
-// PCLMUL + AVX
+// PCLMULQDQ + AVX
-vpclmulqdq, 0x6644, AVX|PCLMUL, Modrm|Vex|Space0F3A|VexVVVV|VexWIG|NoSuf, { Imm8|Imm8S, Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM }
-vpclmullqlqdq, 0x6644/0x00, AVX|PCLMUL, Modrm|Vex|Space0F3A|VexVVVV|VexWIG|NoSuf|ImmExt, { Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM }
-vpclmulhqlqdq, 0x6644/0x01, AVX|PCLMUL, Modrm|Vex|Space0F3A|VexVVVV|VexWIG|NoSuf|ImmExt, { Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM }
-vpclmullqhqdq, 0x6644/0x10, AVX|PCLMUL, Modrm|Vex|Space0F3A|VexVVVV|VexWIG|NoSuf|ImmExt, { Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM }
-vpclmulhqhqdq, 0x6644/0x11, AVX|PCLMUL, Modrm|Vex|Space0F3A|VexVVVV|VexWIG|NoSuf|ImmExt, { Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM }
+vpclmulqdq, 0x6644, AVX|PCLMULQDQ, Modrm|Vex|Space0F3A|VexVVVV|VexWIG|NoSuf, { Imm8|Imm8S, Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM }
+vpclmullqlqdq, 0x6644/0x00, AVX|PCLMULQDQ, Modrm|Vex|Space0F3A|VexVVVV|VexWIG|NoSuf|ImmExt, { Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM }
+vpclmulhqlqdq, 0x6644/0x01, AVX|PCLMULQDQ, Modrm|Vex|Space0F3A|VexVVVV|VexWIG|NoSuf|ImmExt, { Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM }
+vpclmullqhqdq, 0x6644/0x10, AVX|PCLMULQDQ, Modrm|Vex|Space0F3A|VexVVVV|VexWIG|NoSuf|ImmExt, { Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM }
+vpclmulhqhqdq, 0x6644/0x11, AVX|PCLMULQDQ, Modrm|Vex|Space0F3A|VexVVVV|VexWIG|NoSuf|ImmExt, { Unspecified|BaseIndex|RegXMM, RegXMM, RegXMM }
// GFNI + AVX

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,2 +1 @@
SHA512 (binutils-2.41.tar.xz) = 5df45d0bd6ddabdce4f35878c041e46a92deef01e7dea5facc97fd65cc06b59abc6fba0eb454b68e571c7e14038dc823fe7f2263843e6e627b7444eaf0fe9374
SHA512 (binutils-2.19.50.0.1-output-format.sed) = 2f8686b0c8af13c98cda056824c2820416f6e2d003f70b78ccf5314525b9ee3684d421dfa83e638a2d42d06ea4d4bdaf5226b64d6ec26f7ff59c44ffb2a23dd2
SHA512 (binutils-2.42.tar.xz) = 155f3ba14cd220102f4f29a4f1e5cfee3c48aa03b74603460d05afb73c70d6657a9d87eee6eb88bf13203fe6f31177a5c9addc04384e956e7da8069c8ecd20a6