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
F166873038: D54597.id.diff
Mon, Aug 17, 9:38 AM
Unknown Object (File)
Tue, Aug 11, 7:52 PM
Unknown Object (File)
Sun, Aug 9, 6:33 PM
Unknown Object (File)
Sat, Aug 8, 7:06 PM
Unknown Object (File)
Sat, Aug 8, 2:38 PM
Unknown Object (File)
Fri, Aug 7, 7:23 PM
Unknown Object (File)
Fri, Aug 7, 1:36 PM
Unknown Object (File)
Fri, Aug 7, 6:21 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?