From: Rich Felker Date: Sun, 19 Apr 2015 00:45:39 +0000 (-0400) Subject: remove the last of possible-textrels from i386 asm X-Git-Tag: v1.1.9~50 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8ed66ecbcba1dd0f899f22b534aac92a282f42d5;p=oweals%2Fmusl.git remove the last of possible-textrels from i386 asm none of these are actual textrels because of ld-time binding performed by -Bsymbolic-functions, but I'm changing them with the goal of making ld-time binding purely an optimization rather than relying on it for semantic purposes. in the case of memmove's call to memcpy, making it explicit that the memmove asm is assuming the forward-copying behavior of the memcpy asm is desirable anyway; in case memcpy is ever changed, the semantic mismatch would be apparent while editing memmcpy.s. --- diff --git a/src/math/i386/exp.s b/src/math/i386/exp.s index abb90369..c7aa5b6e 100644 --- a/src/math/i386/exp.s +++ b/src/math/i386/exp.s @@ -72,8 +72,11 @@ exp2f: jmp 1f .global exp2l +.global __exp2l +.hidden __exp2l .type exp2l,@function exp2l: +__exp2l: fldt 4(%esp) jmp 1f diff --git a/src/math/i386/expl.s b/src/math/i386/expl.s index 61ef1ddc..b5124e8f 100644 --- a/src/math/i386/expl.s +++ b/src/math/i386/expl.s @@ -37,7 +37,8 @@ expl: fstpt (%esp) fstpt 16(%esp) fstpt 32(%esp) - call exp2l +.hidden __exp2l + call __exp2l # if 2^hi == inf return 2^hi fld %st(0) fstpt (%esp) diff --git a/src/setjmp/i386/setjmp.s b/src/setjmp/i386/setjmp.s index 586d4390..4d19cf87 100644 --- a/src/setjmp/i386/setjmp.s +++ b/src/setjmp/i386/setjmp.s @@ -1,9 +1,12 @@ +.global ___setjmp +.hidden ___setjmp .global __setjmp .global _setjmp .global setjmp .type __setjmp,@function .type _setjmp,@function .type setjmp,@function +___setjmp: __setjmp: _setjmp: setjmp: diff --git a/src/signal/i386/sigsetjmp.s b/src/signal/i386/sigsetjmp.s index 1d24b6f7..690b251c 100644 --- a/src/signal/i386/sigsetjmp.s +++ b/src/signal/i386/sigsetjmp.s @@ -12,7 +12,8 @@ __sigsetjmp: mov %ebx,28+8(%eax) mov %eax,%ebx - call setjmp +.hidden ___setjmp + call ___setjmp pushl 24(%ebx) mov %ebx,4(%esp) @@ -22,4 +23,4 @@ __sigsetjmp: .hidden __sigsetjmp_tail jmp __sigsetjmp_tail -1: jmp setjmp +1: jmp ___setjmp diff --git a/src/string/i386/memcpy.s b/src/string/i386/memcpy.s index b2977c89..0608dd83 100644 --- a/src/string/i386/memcpy.s +++ b/src/string/i386/memcpy.s @@ -1,6 +1,9 @@ .global memcpy +.global __memcpy_fwd +.hidden __memcpy_fwd .type memcpy,@function memcpy: +__memcpy_fwd: push %esi push %edi mov 12(%esp),%edi diff --git a/src/string/i386/memmove.s b/src/string/i386/memmove.s index 6e6cc8e3..2a6a504b 100644 --- a/src/string/i386/memmove.s +++ b/src/string/i386/memmove.s @@ -4,7 +4,8 @@ memmove: mov 4(%esp),%eax sub 8(%esp),%eax cmp 12(%esp),%eax - jae memcpy +.hidden __memcpy_fwd + jae __memcpy_fwd push %esi push %edi mov 12(%esp),%edi