about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2023-11-23 18:23:46 +0100
committerWilco Dijkstra <wilco.dijkstra@arm.com>2024-04-09 18:43:49 +0100
commit4818620ee2f938120cc1fa5f868a9feedf138cdc (patch)
tree54365e4b2b6a0be2afe57300193e1b35128ad03e
parent062d8a648f6fd8389094008cca625ce5c8a62177 (diff)
downloadglibc-4818620ee2f938120cc1fa5f868a9feedf138cdc.tar.gz
glibc-4818620ee2f938120cc1fa5f868a9feedf138cdc.tar.xz
glibc-4818620ee2f938120cc1fa5f868a9feedf138cdc.zip
aarch64: correct CFI in rawmemchr (bug 31113)
The .cfi_return_column directive changes the return column for the whole
FDE range.  But the actual intent is to tell the unwinder that the value
in x30 (lr) now resides in x15 after the move, and that is expressed by
the .cfi_register directive.

(cherry picked from commit 3f798427884fa57770e8e2291cf58d5918254bb5)
-rw-r--r--sysdeps/aarch64/rawmemchr.S2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/aarch64/rawmemchr.S b/sysdeps/aarch64/rawmemchr.S
index aa49892dcb..a92b8ea875 100644
--- a/sysdeps/aarch64/rawmemchr.S
+++ b/sysdeps/aarch64/rawmemchr.S
@@ -31,7 +31,7 @@ ENTRY (__rawmemchr)
 
 L(do_strlen):
 	mov	x15, x30
-	cfi_return_column (x15)
+	cfi_register (x30, x15)
 	mov	x14, x0
 	bl	__strlen
 	add	x0, x14, x0