mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-22 03:04:34 +01:00
rtld-elf: Add CFI annotation for .rtld_start on RISC-V
Without this change, unwinders such as LLVM libunwind will attempt to unwind beyond the start of RTLD and get stuck in an infinite loop or crash (depending on the current values on the stack). This fixes an infinite loop in the LLVM libunwind test suite on RISC-V. See also https://reviews.freebsd.org/D40844 for AArch64 Reviewed By: #riscv, jhb MFC After: 2 weeks Differential Revision: https://reviews.freebsd.org/D46406
This commit is contained in:
parent
6e7581236e
commit
04262ed78d
@ -39,6 +39,7 @@
|
||||
*/
|
||||
|
||||
ENTRY(.rtld_start)
|
||||
.cfi_undefined ra /* Do not attempt to unwind any further. */
|
||||
mv s0, a0 /* Put ps_strings in a callee-saved register */
|
||||
mv s1, sp /* And the stack pointer */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user