import binutils-2.35.2-37.el9

This commit is contained in:
CentOS Sources 2023-03-28 08:53:51 +00:00 committed by root
parent 63308a95fb
commit f43fd3d1e8
6 changed files with 857 additions and 306 deletions

View File

@ -0,0 +1,155 @@
--- binutils.orig/gas/dw2gencfi.c 2022-09-08 13:54:05.539276706 +0100
+++ binutils-2.35.2/gas/dw2gencfi.c 2022-09-08 14:05:56.128016840 +0100
@@ -2054,6 +2054,64 @@ output_fde (struct fde_entry *fde, struc
symbol_set_value_now (end_address);
}
+/* Allow these insns to be put in the initial sequence of a CIE.
+ If J is non-NULL, then compare I and J insns for a match. */
+
+static inline bfd_boolean
+initial_cie_insn (const struct cfi_insn_data *i, const struct cfi_insn_data *j)
+{
+ if (j && i->insn != j->insn)
+ return FALSE;
+
+ switch (i->insn)
+ {
+ case DW_CFA_offset:
+ case DW_CFA_def_cfa:
+ case DW_CFA_val_offset:
+ if (j)
+ {
+ if (i->u.ri.reg != j->u.ri.reg)
+ return FALSE;
+ if (i->u.ri.offset != j->u.ri.offset)
+ return FALSE;
+ }
+ break;
+
+ case DW_CFA_register:
+ if (j)
+ {
+ if (i->u.rr.reg1 != j->u.rr.reg1)
+ return FALSE;
+ if (i->u.rr.reg2 != j->u.rr.reg2)
+ return FALSE;
+ }
+ break;
+
+ case DW_CFA_def_cfa_register:
+ case DW_CFA_restore:
+ case DW_CFA_undefined:
+ case DW_CFA_same_value:
+ if (j)
+ {
+ if (i->u.r != j->u.r)
+ return FALSE;
+ }
+ break;
+
+ case DW_CFA_def_cfa_offset:
+ if (j)
+ {
+ if (i->u.i != j->u.i)
+ return FALSE;
+ }
+ break;
+
+ default:
+ return FALSE;
+ }
+ return TRUE;
+}
+
static struct cie_entry *
select_cie_for_fde (struct fde_entry *fde, bfd_boolean eh_frame,
struct cfi_insn_data **pfirst, int align)
@@ -2099,71 +2157,15 @@ select_cie_for_fde (struct fde_entry *fd
i != cie->last && j != NULL;
i = i->next, j = j->next)
{
- if (i->insn != j->insn)
- goto fail;
- switch (i->insn)
- {
- case DW_CFA_advance_loc:
- case DW_CFA_remember_state:
- /* We reached the first advance/remember in the FDE,
- but did not reach the end of the CIE list. */
- goto fail;
-
- case DW_CFA_offset:
- case DW_CFA_def_cfa:
- if (i->u.ri.reg != j->u.ri.reg)
- goto fail;
- if (i->u.ri.offset != j->u.ri.offset)
- goto fail;
- break;
-
- case DW_CFA_register:
- if (i->u.rr.reg1 != j->u.rr.reg1)
- goto fail;
- if (i->u.rr.reg2 != j->u.rr.reg2)
- goto fail;
- break;
-
- case DW_CFA_def_cfa_register:
- case DW_CFA_restore:
- case DW_CFA_undefined:
- case DW_CFA_same_value:
- if (i->u.r != j->u.r)
- goto fail;
- break;
-
- case DW_CFA_def_cfa_offset:
- if (i->u.i != j->u.i)
- goto fail;
- break;
-
- case CFI_escape:
- case CFI_val_encoded_addr:
- case CFI_label:
- /* Don't bother matching these for now. */
- goto fail;
-
- default:
- abort ();
- }
+ if (!initial_cie_insn (i, j))
+ break;
}
- /* Success if we reached the end of the CIE list, and we've either
- run out of FDE entries or we've encountered an advance,
- remember, or escape. */
- if (i == cie->last
- && (!j
- || j->insn == DW_CFA_advance_loc
- || j->insn == DW_CFA_remember_state
- || j->insn == CFI_escape
- || j->insn == CFI_val_encoded_addr
- || j->insn == CFI_label))
+ if (i == cie->last)
{
*pfirst = j;
return cie;
}
-
- fail:;
}
cie = XNEW (struct cie_entry);
@@ -2181,11 +2183,7 @@ select_cie_for_fde (struct fde_entry *fd
#endif
for (i = cie->first; i ; i = i->next)
- if (i->insn == DW_CFA_advance_loc
- || i->insn == DW_CFA_remember_state
- || i->insn == CFI_escape
- || i->insn == CFI_val_encoded_addr
- || i->insn == CFI_label)
+ if (!initial_cie_insn (i, NULL))
break;
cie->last = i;

View File

@ -0,0 +1,11 @@
--- binutils.orig/config/override.m4 2021-08-31 14:20:17.275574804 +0100
+++ binutils-2.37/config/override.m4 2021-08-31 14:36:37.793954247 +0100
@@ -41,7 +41,7 @@ dnl Or for updating the whole tree at on
AC_DEFUN([_GCC_AUTOCONF_VERSION_CHECK],
[m4_if(m4_defn([_GCC_AUTOCONF_VERSION]),
m4_defn([m4_PACKAGE_VERSION]), [],
- [m4_fatal([Please use exactly Autoconf ]_GCC_AUTOCONF_VERSION[ instead of ]m4_defn([m4_PACKAGE_VERSION])[.])])
+ [])
])
m4_define([AC_INIT], m4_defn([AC_INIT])[
_GCC_AUTOCONF_VERSION_CHECK

View File

@ -0,0 +1,17 @@
diff --git a/ld/testsuite/ld-plugin/lto.exp b/ld/testsuite/ld-plugin/lto.exp
index 3c129760498..dbda6c4465d 100644
--- a/ld/testsuite/ld-plugin/lto.exp
+++ b/ld/testsuite/ld-plugin/lto.exp
@@ -721,7 +721,7 @@ if { [at_least_gcc_version 4 7] } {
] \
]
set exec_output [run_host_cmd "sh" \
- "-c \"ulimit -n 16; \
+ "-c \" \
$ar -rc $plug_opt \
tmpdir/libpr23460.a \
tmpdir/pr23460a.o \
--
2.38.1

View File

@ -0,0 +1,59 @@
diff -rup binutils.orig/bfd/elflink.c binutils-2.35.2/bfd/elflink.c
--- binutils.orig/bfd/elflink.c 2022-11-28 16:10:23.919422266 +0000
+++ binutils-2.35.2/bfd/elflink.c 2022-11-28 16:14:24.308499080 +0000
@@ -1260,14 +1260,25 @@ _bfd_elf_merge_symbol (bfd *abfd,
olddyn = (oldsec->symbol->flags & BSF_DYNAMIC) != 0;
}
- /* Handle a case where plugin_notice won't be called and thus won't
- set the non_ir_ref flags on the first pass over symbols. */
if (oldbfd != NULL
- && (oldbfd->flags & BFD_PLUGIN) != (abfd->flags & BFD_PLUGIN)
- && newdyn != olddyn)
+ && (oldbfd->flags & BFD_PLUGIN) != (abfd->flags & BFD_PLUGIN))
{
- h->root.non_ir_ref_dynamic = TRUE;
- hi->root.non_ir_ref_dynamic = TRUE;
+ if (newdyn != olddyn)
+ {
+ /* Handle a case where plugin_notice won't be called and thus
+ won't set the non_ir_ref flags on the first pass over
+ symbols. */
+ h->root.non_ir_ref_dynamic = TRUE;
+ hi->root.non_ir_ref_dynamic = TRUE;
+ }
+
+ if ((oldbfd->flags & BFD_PLUGIN) != 0
+ && hi->root.type == bfd_link_hash_indirect)
+ {
+ /* Change indirect symbol from IR to undefined. */
+ hi->root.type = bfd_link_hash_undefined;
+ hi->root.u.undef.abfd = oldbfd;
+ }
}
/* NEWDEF and OLDDEF indicate whether the new or old symbol,
diff -rup binutils.orig/bfd/linker.c binutils-2.35.2/bfd/linker.c
--- binutils.orig/bfd/linker.c 2022-11-28 16:10:23.822422639 +0000
+++ binutils-2.35.2/bfd/linker.c 2022-11-28 16:13:28.709712603 +0000
@@ -1672,7 +1672,7 @@ _bfd_generic_link_add_one_symbol (struct
case MIND:
/* Multiple indirect symbols. This is OK if they both point
to the same symbol. */
- if (strcmp (h->u.i.link->root.string, string) == 0)
+ if (string != NULL && strcmp (h->u.i.link->root.string, string) == 0)
break;
/* Fall through. */
case MDEF:
--- binutils.orig/bfd/elflink.c 2023-01-10 15:47:50.062668055 +0000
+++ binutils-2.35.2/bfd/elflink.c 2023-01-10 15:47:59.554659559 +0000
@@ -1271,8 +1271,7 @@ _bfd_elf_merge_symbol (bfd *abfd,
h->root.non_ir_ref_dynamic = TRUE;
hi->root.non_ir_ref_dynamic = TRUE;
}
-
- if ((oldbfd->flags & BFD_PLUGIN) != 0
+ else if ((oldbfd->flags & BFD_PLUGIN) != 0
&& hi->root.type == bfd_link_hash_indirect)
{
/* Change indirect symbol from IR to undefined. */

View File

@ -0,0 +1,30 @@
diff -rup binutils.orig/bfd/configure binutils-2.35.2/bfd/configure
--- binutils.orig/bfd/configure 2023-01-19 12:17:21.293513059 +0000
+++ binutils-2.35.2/bfd/configure 2023-01-19 12:27:25.783974084 +0000
@@ -18921,11 +18921,6 @@ _LT_EOF
esac
done ;;
"bfd_stdint.h":C)
-if test "$GCC" = yes; then
- echo "/* generated for " `$CC --version | sed 1q` "*/" > tmp-stdint.h
-else
- echo "/* generated for $CC */" > tmp-stdint.h
-fi
sed 's/^ *//' >> tmp-stdint.h <<EOF
diff -rup binutils.orig/config/stdint.m4 binutils-2.35.2/config/stdint.m4
--- binutils.orig/config/stdint.m4 2023-01-19 12:17:20.169515897 +0000
+++ binutils-2.35.2/config/stdint.m4 2023-01-19 12:27:02.920032688 +0000
@@ -192,11 +192,6 @@ fi
# ----------------- done all checks, emit header -------------
AC_CONFIG_COMMANDS(_GCC_STDINT_H, [
-if test "$GCC" = yes; then
- echo "/* generated for " `$CC --version | sed 1q` "*/" > tmp-stdint.h
-else
- echo "/* generated for $CC */" > tmp-stdint.h
-fi
sed 's/^ *//' >> tmp-stdint.h <<EOF

File diff suppressed because it is too large Load Diff