mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-22 14:12:26 +00:00
c175b21ce4
Bring in the fixes for GCC 7 through 13. https://rtx.meta.security/mitigation/2023/09/12/CVE-2023-4039.html https://developer.arm.com/Arm%20Security%20Center/GCC%20Stack%20Protector%20Vulnerability%20AArch64 Signed-off-by: Chris Packham <judge.packham@gmail.com>
46 lines
1.6 KiB
Diff
46 lines
1.6 KiB
Diff
From 7356df0319aefe4c68ef57ec4c6bd18c72188a34 Mon Sep 17 00:00:00 2001
|
|
From: Richard Sandiford <richard.sandiford@arm.com>
|
|
Date: Tue, 12 Sep 2023 16:19:46 +0100
|
|
Subject: [PATCH 17/29] aarch64: Only calculate chain_offset if there is a
|
|
chain
|
|
|
|
After previous patches, it is no longer necessary to calculate
|
|
a chain_offset in cases where there is no chain record.
|
|
|
|
gcc/
|
|
* config/aarch64/aarch64.c (aarch64_expand_prologue): Move the
|
|
calculation of chain_offset into the emit_frame_chain block.
|
|
---
|
|
gcc/config/aarch64/aarch64.c | 10 +++++-----
|
|
1 file changed, 5 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
|
|
index 96e99f6c17ae..cf5244b7ec08 100644
|
|
--- a/gcc/config/aarch64/aarch64.c
|
|
+++ b/gcc/config/aarch64/aarch64.c
|
|
@@ -8974,16 +8974,16 @@ aarch64_expand_prologue (void)
|
|
if (callee_adjust != 0)
|
|
aarch64_push_regs (reg1, reg2, callee_adjust);
|
|
|
|
- /* The offset of the frame chain record (if any) from the current SP. */
|
|
- poly_int64 chain_offset = (initial_adjust + callee_adjust
|
|
- - frame.hard_fp_offset);
|
|
- gcc_assert (known_ge (chain_offset, 0));
|
|
-
|
|
/* The offset of the current SP from the bottom of the static frame. */
|
|
poly_int64 bytes_below_sp = frame_size - initial_adjust - callee_adjust;
|
|
|
|
if (emit_frame_chain)
|
|
{
|
|
+ /* The offset of the frame chain record (if any) from the current SP. */
|
|
+ poly_int64 chain_offset = (initial_adjust + callee_adjust
|
|
+ - frame.hard_fp_offset);
|
|
+ gcc_assert (known_ge (chain_offset, 0));
|
|
+
|
|
if (callee_adjust == 0)
|
|
{
|
|
reg1 = R29_REGNUM;
|
|
--
|
|
2.42.0
|
|
|