mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-26 23:10:06 +00:00
bdc543e338
With the removal of divdi3 object from sparcv9-linux-gnu build, its definition came from libgcc and its functions internall calls .udiv. Since glibc also exports these symbols for compatibility reasons, it will end up creating PLT calls internally in libc.so. To avoid it, this patch uses the linker option --wrap to replace all the internal libc.so .udiv calls to the wrapper __wrap_.udiv. Along with strong alias in the udiv implementations, it makes linker do local calls. Checked on sparcv9-linux-gnu. * sysdeps/sparc/sparc32/Makefile (libc.so-gnulib): New rule. * sysdeps/sparc/sparc32/sparcv8/udiv.S (.udiv): Make a strong_alias to __wrap_.udiv. * sysdeps/sparc/sparc32/sparcv9/udiv.S (.udiv): Likewise. * sysdeps/sparc/sparc32/udiv.S (.udiv): Likewise.
19 lines
266 B
ArmAsm
19 lines
266 B
ArmAsm
/*
|
|
* Sparc v9 has divide.
|
|
* As divx takes 68 cycles and udiv only 37,
|
|
* we use udiv eventhough it is deprecated.
|
|
*/
|
|
|
|
#include <sysdep.h>
|
|
|
|
.text
|
|
.align 32
|
|
ENTRY(.udiv)
|
|
|
|
wr %g0, 0, %y
|
|
retl
|
|
udiv %o0, %o1, %o0
|
|
|
|
END(.udiv)
|
|
strong_alias (.udiv, __wrap_.udiv)
|