git: rtld-elf - save/restore args fp regs as well (clang)
Matthew Dillon
dillon at crater.dragonflybsd.org
Sun Nov 9 13:32:42 PST 2014
commit 9631883ec7333a05f8e824cb63b405893a1707ff
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
structural copies.
But CLANG does, so the binder has to save/restore these registers or
dynamically linked calls which take FP arguments will explode on the
first call.
* 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.
Reported-by: marino
Summary of changes:
libexec/rtld-elf/x86_64/rtld_start.S | 31 ++++++++++++++++++++++++++-----
1 file changed, 26 insertions(+), 5 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/9631883ec7333a05f8e824cb63b405893a1707ff
--
DragonFly BSD source repository
More information about the Commits
mailing list