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)
Fri, Sep 4, 7:46 PM
Unknown Object (File)
Fri, Sep 4, 7:41 PM
Unknown Object (File)
Sun, Aug 30, 10:30 AM
Unknown Object (File)
Sat, Aug 22, 7:00 PM
Unknown Object (File)
Fri, Aug 21, 3:47 PM
Unknown Object (File)
Fri, Aug 21, 4:04 AM
Unknown Object (File)
Fri, Aug 21, 2:19 AM
Unknown Object (File)
Aug 19 2026, 3:09 AM
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?