diff options
author | Wilco Dijkstra <wilco.dijkstra@arm.com> | 2025-05-14 16:32:31 +0000 |
---|---|---|
committer | Wilco Dijkstra <wilco.dijkstra@arm.com> | 2025-05-19 15:35:32 +0000 |
commit | 2c421fc4302ecb729823ca442f9dfab95afba752 (patch) | |
tree | 1009d63b2ee40e64ea83f51973d1649cd79d2d2e /sysdeps/unix | |
parent | 96abd59bf2a11ddd4e7ccaac840ec13c0b62d3ba (diff) | |
download | glibc-2c421fc4302ecb729823ca442f9dfab95afba752.zip glibc-2c421fc4302ecb729823ca442f9dfab95afba752.tar.gz glibc-2c421fc4302ecb729823ca442f9dfab95afba752.tar.bz2 |
AArch64: Cleanup PAC and BTI
Now we finally support modern GCC and binutils, it's time for a cleanup.
Use PAC and BTI instructions unconditionally and use proper assembler syntax.
Remove the PR target/94791 strip_pac workarounds for buggy GCCs. Remove the
PAC/BTI configure checks - always emit GNU property notes on assembly files.
Change cfi_window_save to the correct cfi_negate_ra_state unwind directive.
Reviewed-by: Matthieu Longo <matthieu.longo@arm.com>
Diffstat (limited to 'sysdeps/unix')
-rw-r--r-- | sysdeps/unix/sysv/linux/aarch64/setcontext.S | 12 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/aarch64/swapcontext.S | 2 |
2 files changed, 5 insertions, 9 deletions
diff --git a/sysdeps/unix/sysv/linux/aarch64/setcontext.S b/sysdeps/unix/sysv/linux/aarch64/setcontext.S index 022a263..18e4fb7 100644 --- a/sysdeps/unix/sysv/linux/aarch64/setcontext.S +++ b/sysdeps/unix/sysv/linux/aarch64/setcontext.S @@ -49,10 +49,8 @@ ENTRY (__setcontext) b C_SYMBOL_NAME (__syscall_error) 1: /* Disable ZA of SME. */ -#if HAVE_AARCH64_PAC_RET - PACIASP - cfi_window_save -#endif + paciasp + cfi_negate_ra_state stp x29, x30, [sp, -16]! cfi_adjust_cfa_offset (16) cfi_rel_offset (x29, 0) @@ -63,10 +61,8 @@ ENTRY (__setcontext) cfi_adjust_cfa_offset (-16) cfi_restore (x29) cfi_restore (x30) -#if HAVE_AARCH64_PAC_RET - AUTIASP - cfi_window_save -#endif + autiasp + cfi_negate_ra_state /* Restore the general purpose registers. */ mov x0, x9 cfi_def_cfa (x0, 0) diff --git a/sysdeps/unix/sysv/linux/aarch64/swapcontext.S b/sysdeps/unix/sysv/linux/aarch64/swapcontext.S index cc41253..58ddb95 100644 --- a/sysdeps/unix/sysv/linux/aarch64/swapcontext.S +++ b/sysdeps/unix/sysv/linux/aarch64/swapcontext.S @@ -119,7 +119,7 @@ L(gcs_done): 2: /* The oucp context is restored here via an indirect branch, x1 must be restored too which has the real return address. */ - BTI_J + bti j mov x30, x1 RET PSEUDO_END (__swapcontext) |