path: root/src/string
diff options
authorRich Felker <>2015-04-18 20:45:39 -0400
committerRich Felker <>2015-04-18 20:45:39 -0400
commit8ed66ecbcba1dd0f899f22b534aac92a282f42d5 (patch)
tree2ed0c71c33c29f7e6f407a8ca8aa1265c878292c /src/string
parent01d42747118522b7a486ece1736b93c6d5751344 (diff)
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.
Diffstat (limited to 'src/string')
2 files changed, 5 insertions, 1 deletions
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 __memcpy_fwd
+.hidden __memcpy_fwd
.type memcpy,@function
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