Page MenuHomeFreeBSD

arm64: Add -mgeneral-regs-only to rtld
Needs ReviewPublic

Authored by wac_gmail.com on Jan 8 2026, 9:39 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, May 11, 4:59 AM
Unknown Object (File)
Mon, May 11, 4:58 AM
Unknown Object (File)
Thu, Apr 30, 9:26 AM
Unknown Object (File)
Thu, Apr 30, 9:26 AM
Unknown Object (File)
Tue, Apr 28, 3:58 PM
Unknown Object (File)
Sat, Apr 25, 2:24 PM
Unknown Object (File)
Thu, Apr 16, 6:43 PM
Unknown Object (File)
Apr 13 2026, 9:55 PM
Subscribers

Details

Reviewers
andrew
Summary

Ensure the rtld for aarch64 is built with -mgeneral-regs-only to prevent the compiler from generating SIMD instructions. This guarantees that volatile SIMD registers (q16-q31) are not clobbered during lazy symbol binding. Without this, symbol binding operations could corrupt application state, especially during signal delivery or context switches.

This resolves a potential source of failure in tests like xregs_sig, as seen in bug 271730.

Test Plan

Run xregs_sig successfully. Observe no use of SIMD registers in linker assembly.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

xregs_sig doesn't follow the ABI so it is valid to trash these registers.

Does this fix a problem in software that follows the ABI?