HomeFreeBSD

rtld-elf: Add CFI annotation for .rtld_start on RISC-V

Description

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

Details

Provenance
arichardsonAuthored on Aug 26 2024, 4:51 AM
Reviewer
riscv
Differential Revision
D46406: rtld-elf: Add CFI annotation for .rtld_start on RISC-V
Parents
rG6e7581236ed7: tcp: whitespace cleanup in enum tcp_log_events
Branches
Unknown
Tags
Unknown