The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/src/commit/?id=c24e475dec9b7e15dabd2176d994d6bd9c8d4aff
commit c24e475dec9b7e15dabd2176d994d6bd9c8d4aff Author: Piotr Kubaj <[email protected]> AuthorDate: 2026-12-03 16:40:31 +0000 Commit: Piotr Kubaj <[email protected]> CommitDate: 2026-12-04 12:31:33 +0000 rtld: keep FP and vector registers out of the C code on powerpc64 _rtld_bind_start only saves r3-r10 around the binder, but functions also take arguments in f1-f13 and v2-v13. The binder doesn't clobber them today only because clang happens to use vs0 for the copies and the memset() it vectorizes there. Build rtld without AltiVec, VSX and hard float so that it stays this way, like amd64 and i386 do with SSE. glibc does the same for its binder. Reported by: llm-postcr Approved by: jhibbits (blanket) MFC after: 1 week --- libexec/rtld-elf/powerpc64/Makefile.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libexec/rtld-elf/powerpc64/Makefile.inc b/libexec/rtld-elf/powerpc64/Makefile.inc index 641336724894..03c056d279ac 100644 --- a/libexec/rtld-elf/powerpc64/Makefile.inc +++ b/libexec/rtld-elf/powerpc64/Makefile.inc @@ -1 +1,5 @@ RTLD_ENTRY= _rtld_start + +# _rtld_bind_start only preserves the integer argument registers, so keep +# the C code away from the floating-point and vector ones. +CFLAGS+= -mno-altivec -msoft-float
