瀏覽代碼

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.
Rich Felker 10 年之前
父節點
當前提交
8ed66ecbcb
共有 6 個文件被更改,包括 16 次插入4 次删除
  1. 3 0
      src/math/i386/exp.s
  2. 2 1
      src/math/i386/expl.s
  3. 3 0
      src/setjmp/i386/setjmp.s
  4. 3 2
      src/signal/i386/sigsetjmp.s
  5. 3 0
      src/string/i386/memcpy.s
  6. 2 1
      src/string/i386/memmove.s

+ 3 - 0
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
 

+ 2 - 1
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)

+ 3 - 0
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:

+ 3 - 2
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

+ 3 - 0
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

+ 2 - 1
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