git: rtld-elf - save/restore args fp regs as well (clang)
dillon at crater.dragonflybsd.org
Sun Nov 9 13:32:42 PST 2014
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Sun Nov 9 13:27:54 2014 -0800
rtld-elf - save/restore args fp regs as well (clang)
* Note: this has no real effect on gcc based systems.
* fp registers %xmm0-7 can be used for arguments to procedures. With
GCC we didn't have to save/restore them for the rtld binder because
rtld didn't use any FP registers and GCC did not insert any for
But CLANG does, so the binder has to save/restore these registers or
dynamically linked calls which take FP arguments will explode on the
* For example, A simple clang program to printf("%f", 1.0); a few times...
the first output would be 0.0 instead of 1.0 due to the binder blowing
away the procedure argument to dtoa(). The bug also blows up awk and
dports and... well.
Summary of changes:
libexec/rtld-elf/x86_64/rtld_start.S | 31 ++++++++++++++++++++++++++-----
1 file changed, 26 insertions(+), 5 deletions(-)
DragonFly BSD source repository
More information about the Commits