summaryrefslogtreecommitdiff
path: root/libc/string/sparc
diff options
context:
space:
mode:
Diffstat (limited to 'libc/string/sparc')
-rw-r--r--libc/string/sparc/_glibc_inc.h6
-rw-r--r--libc/string/sparc/sparc32/memchr.S6
-rw-r--r--libc/string/sparc/sparc32/memcpy.S12
-rw-r--r--libc/string/sparc/sparc32/memset.S7
-rw-r--r--libc/string/sparc/sparc32/stpcpy.S5
-rw-r--r--libc/string/sparc/sparc32/strcat.S5
-rw-r--r--libc/string/sparc/sparc32/strchr.S13
-rw-r--r--libc/string/sparc/sparc32/strcmp.S5
-rw-r--r--libc/string/sparc/sparc32/strcpy.S5
-rw-r--r--libc/string/sparc/sparc32/strlen.S5
-rw-r--r--libc/string/sparc/sparc64/memchr.S4
-rw-r--r--libc/string/sparc/sparc64/memcpy.S16
-rw-r--r--libc/string/sparc/sparc64/memset.S7
-rw-r--r--libc/string/sparc/sparc64/sparcv9b/memcpy.S22
-rw-r--r--libc/string/sparc/sparc64/stpcpy.S2
-rw-r--r--libc/string/sparc/sparc64/strcat.S5
-rw-r--r--libc/string/sparc/sparc64/strchr.S13
-rw-r--r--libc/string/sparc/sparc64/strcmp.S5
-rw-r--r--libc/string/sparc/sparc64/strcpy.S5
-rw-r--r--libc/string/sparc/sparc64/strlen.S5
20 files changed, 52 insertions, 101 deletions
diff --git a/libc/string/sparc/_glibc_inc.h b/libc/string/sparc/_glibc_inc.h
index 7840ba1bf..6ef1dbde6 100644
--- a/libc/string/sparc/_glibc_inc.h
+++ b/libc/string/sparc/_glibc_inc.h
@@ -14,6 +14,7 @@
#define ENTRY(sym) \
.global sym; \
+ .hidden sym; \
.align ENTRY_ALIGN; \
.type sym,%function; \
sym:
@@ -23,8 +24,3 @@
#define END(sym) \
.size sym,.-sym;
-
-#undef weak_alias
-#define weak_alias(sym, alias) \
- .weak alias; \
- alias = sym;
diff --git a/libc/string/sparc/sparc32/memchr.S b/libc/string/sparc/sparc32/memchr.S
index e8f44f176..e012844ba 100644
--- a/libc/string/sparc/sparc32/memchr.S
+++ b/libc/string/sparc/sparc32/memchr.S
@@ -63,9 +63,6 @@
1: retl
sub %o0, 1, %o0
-.globl memchr
-.set memchr,__memchr
-.hidden __memchr
ENTRY(__memchr)
andcc %o1, 0xff, %o1
sll %o1, 8, %g6
@@ -140,7 +137,8 @@ ENTRY(__memchr)
4: retl
sub %o0, 4, %o0
END(__memchr)
+strong_alias(__memchr,memchr)
#if !__BOUNDED_POINTERS__
-weak_alias (__memchr, __ubp_memchr)
+weak_alias(__memchr,__ubp_memchr)
#endif
diff --git a/libc/string/sparc/sparc32/memcpy.S b/libc/string/sparc/sparc32/memcpy.S
index b2a9b1602..a1dd246e6 100644
--- a/libc/string/sparc/sparc32/memcpy.S
+++ b/libc/string/sparc/sparc32/memcpy.S
@@ -161,18 +161,13 @@
b 3f
sub %o0, 2, %o0
-.globl bcopy
-.set bcopy,__bcopy
-.hidden __bcopy
ENTRY(__bcopy)
mov %o0, %o3
mov %o1, %o0
mov %o3, %o1
END(__bcopy)
+strong_alias(__bcopy,bcopy)
-.globl memmove
-.set memmove,__memmove
-.hidden __memmove
ENTRY(__memmove)
cmp %o0, %o1
st %o0, [%sp + 64]
@@ -454,10 +449,8 @@ ENTRY(__memmove)
b 3f
add %o0, 2, %o0
END(__memmove)
+strong_alias(__memmove,memmove)
-.globl memcpy
-.set memcpy,__memcpy
-.hidden __memcpy
ENTRY(__memcpy) /* %o0=dst %o1=src %o2=len */
sub %o0, %o1, %o4
st %o0, [%sp + 64]
@@ -974,3 +967,4 @@ ENTRY(__memcpy) /* %o0=dst %o1=src %o2=len */
110: retl
sub %o7, %g6, %o5
END(__memcpy)
+strong_alias(__memcpy,memcpy)
diff --git a/libc/string/sparc/sparc32/memset.S b/libc/string/sparc/sparc32/memset.S
index ef8a5b634..b60b881be 100644
--- a/libc/string/sparc/sparc32/memset.S
+++ b/libc/string/sparc/sparc32/memset.S
@@ -61,10 +61,8 @@ ENTRY(__bzero)
b 4f
sub %o0, %o2, %o0
END(__bzero)
+strong_alias(__bzero,bzero)
-.globl memset
-.set memset,__memset
-.hidden __memset
ENTRY(__memset)
and %o1, 0xff, %g3
sll %g3, 8, %g2
@@ -151,5 +149,4 @@ ENTRY(__memset)
0: retl
nop
END(__memset)
-
-weak_alias (__bzero, bzero)
+strong_alias(__memset,memset)
diff --git a/libc/string/sparc/sparc32/stpcpy.S b/libc/string/sparc/sparc32/stpcpy.S
index 97a5dce0e..26d2fecbd 100644
--- a/libc/string/sparc/sparc32/stpcpy.S
+++ b/libc/string/sparc/sparc32/stpcpy.S
@@ -65,9 +65,6 @@
1: retl
add %o0, -1, %o0
-.globl stpcpy
-.set stpcpy,__stpcpy
-.hidden __stpcpy
ENTRY(__stpcpy)
andcc %o1, 3, %g0
bne 10b
@@ -160,3 +157,5 @@ ENTRY(__stpcpy)
19: retl
nop
END(__stpcpy)
+
+strong_alias(__stpcpy,stpcpy)
diff --git a/libc/string/sparc/sparc32/strcat.S b/libc/string/sparc/sparc32/strcat.S
index 8efe6aebf..2ee630b23 100644
--- a/libc/string/sparc/sparc32/strcat.S
+++ b/libc/string/sparc/sparc32/strcat.S
@@ -91,9 +91,6 @@
b 3f
sub %o0, 1, %o0
-.globl strcat
-.set strcat,__strcat
-.hidden __strcat
ENTRY(__strcat)
mov %o0, %g2
andcc %o0, 3, %g0
@@ -347,3 +344,5 @@ ENTRY(__strcat)
retl
mov %g2, %o0
END(__strcat)
+
+strong_alias(__strcat,strcat)
diff --git a/libc/string/sparc/sparc32/strchr.S b/libc/string/sparc/sparc32/strchr.S
index 450b4ffe6..69360c53a 100644
--- a/libc/string/sparc/sparc32/strchr.S
+++ b/libc/string/sparc/sparc32/strchr.S
@@ -67,9 +67,6 @@
1: retl
sub %o0, 1, %o0
-.globl strchr
-.set strchr,__strchr
-.hidden __strchr
ENTRY(__strchr)
andcc %o1, 0xff, %o1
be 12f
@@ -219,10 +216,9 @@ ENTRY(__strchr)
b 7f
ld [%o0], %g4
END(__strchr)
+strong_alias(__strchr,strchr)
+strong_alias(__strchr,index)
-.globl strrchr
-.set strrchr,__strrchr
-.hidden __strrchr
ENTRY(__strrchr)
andcc %o1, 0xff, %o1
clr %o5
@@ -281,6 +277,5 @@ ENTRY(__strrchr)
9: retl
mov %o5, %o0
END(__strrchr)
-
-weak_alias (strchr, index)
-weak_alias (strrchr, rindex)
+strong_alias(__strrchr,strrchr)
+strong_alias(__strrchr,rindex)
diff --git a/libc/string/sparc/sparc32/strcmp.S b/libc/string/sparc/sparc32/strcmp.S
index 2ae1b2ef4..6a807e08a 100644
--- a/libc/string/sparc/sparc32/strcmp.S
+++ b/libc/string/sparc/sparc32/strcmp.S
@@ -74,9 +74,6 @@
2: retl
mov %o4, %o0
-.globl strcmp
-.set strcmp,__strcmp
-.hidden __strcmp
ENTRY(__strcmp)
andcc %o0, 3, %g0
bne 10b
@@ -256,3 +253,5 @@ ENTRY(__strcmp)
jmpl %i7 + 8, %g0
restore %g4, %g0, %o0
END(__strcmp)
+
+strong_alias(__strcmp,strcmp)
diff --git a/libc/string/sparc/sparc32/strcpy.S b/libc/string/sparc/sparc32/strcpy.S
index 6dc3517b5..ab57e00a5 100644
--- a/libc/string/sparc/sparc32/strcpy.S
+++ b/libc/string/sparc/sparc32/strcpy.S
@@ -63,9 +63,6 @@
b 6f
andcc %o0, 3, %g3
-.globl strcpy
-.set strcpy,__strcpy
-.hidden __strcpy
ENTRY(__strcpy)
mov %o0, %g2
andcc %o1, 3, %g0
@@ -273,3 +270,5 @@ ENTRY(__strcpy)
retl
mov %g2, %o0
END(__strcpy)
+
+strong_alias(__strcpy,strcpy)
diff --git a/libc/string/sparc/sparc32/strlen.S b/libc/string/sparc/sparc32/strlen.S
index 116700e24..81beb7f62 100644
--- a/libc/string/sparc/sparc32/strlen.S
+++ b/libc/string/sparc/sparc32/strlen.S
@@ -63,9 +63,6 @@
3: retl
mov 2, %o0
-.globl strlen
-.set strlen,__strlen
-.hidden __strlen
ENTRY(__strlen)
mov %o0, %o1
andcc %o0, 3, %g0
@@ -102,3 +99,5 @@ ENTRY(__strlen)
13: retl
sub %o4, %o1, %o0
END(__strlen)
+
+strong_alias(__strlen,strlen)
diff --git a/libc/string/sparc/sparc64/memchr.S b/libc/string/sparc/sparc64/memchr.S
index a10dfbc63..7017b5540 100644
--- a/libc/string/sparc/sparc64/memchr.S
+++ b/libc/string/sparc/sparc64/memchr.S
@@ -255,7 +255,7 @@ ENTRY(__memchr)
add %o0, -1, %o0 /* IEU0 */
END(__memchr)
-weak_alias (__memchr, memchr)
+strong_alias(__memchr,memchr)
#if !__BOUNDED_POINTERS__
-weak_alias (__memchr, __ubp_memchr)
+weak_alias(__memchr,__ubp_memchr)
#endif
diff --git a/libc/string/sparc/sparc64/memcpy.S b/libc/string/sparc/sparc64/memcpy.S
index 47f812a1e..4201b5ec2 100644
--- a/libc/string/sparc/sparc64/memcpy.S
+++ b/libc/string/sparc/sparc64/memcpy.S
@@ -191,9 +191,6 @@
.text
.align 32
-.globl bcopy
-.set bcopy,__bcopy
-.hidden __bcopy
ENTRY(__bcopy)
sub %o1, %o0, %o4 /* IEU0 Group */
mov %o0, %g3 /* IEU1 */
@@ -209,6 +206,7 @@ ENTRY(__bcopy)
retl
nop
END(__bcopy)
+strong_alias(__bcopy,bcopy)
.align 32
200: be,pt %xcc, 201f /* CTI */
@@ -506,9 +504,6 @@ END(__align_cpy_16)
#endif
.align 32
-.globl memcpy
-.set memcpy,__memcpy
-.hidden __memcpy
ENTRY(__memcpy)
210:
#ifndef USE_BPR
@@ -701,6 +696,7 @@ ENTRY(__memcpy)
retl
mov %g4, %o0
END(__memcpy)
+strong_alias(__memcpy,memcpy)
.align 32
228: andcc %o2, 1, %g0 /* IEU1 Group */
@@ -725,9 +721,6 @@ END(__memcpy)
nop
.align 32
-.globl memmove
-.set memmove,__memmove
-.hidden __memmove
ENTRY(__memmove)
#ifndef USE_BPR
srl %o2, 0, %o2 /* IEU1 Group */
@@ -920,8 +913,9 @@ ENTRY(__memmove)
retl
mov %g4, %o0
END(__memmove)
+strong_alias(__memmove,memmove)
#ifdef USE_BPR
-weak_alias (memcpy, __align_cpy_1)
-weak_alias (memcpy, __align_cpy_2)
+weak_alias(__memcpy,__align_cpy_1)
+weak_alias(__memcpy,__align_cpy_2)
#endif
diff --git a/libc/string/sparc/sparc64/memset.S b/libc/string/sparc/sparc64/memset.S
index 5d2911451..6fb25d211 100644
--- a/libc/string/sparc/sparc64/memset.S
+++ b/libc/string/sparc/sparc64/memset.S
@@ -36,9 +36,6 @@
/* Well, memset is a lot easier to get right than bcopy... */
.text
.align 32
-.globl memset
-.set memset,__memset
-.hidden __memset
ENTRY(__memset)
andcc %o1, 0xff, %o1
mov %o0, %o5
@@ -180,6 +177,7 @@ ENTRY(__memset)
ba,pt %xcc, 18b
ldd [%o0], %f0
END(__memset)
+strong_alias(__memset,memset)
#define ZERO_BLOCKS(base, offset, source) \
stx source, [base - offset - 0x38]; \
@@ -312,5 +310,4 @@ ENTRY(__bzero)
0: retl
mov %o5, %o0
END(__bzero)
-
-weak_alias (__bzero, bzero)
+strong_alias(__bzero,bzero)
diff --git a/libc/string/sparc/sparc64/sparcv9b/memcpy.S b/libc/string/sparc/sparc64/sparcv9b/memcpy.S
index 91e74d438..dd381c7ef 100644
--- a/libc/string/sparc/sparc64/sparcv9b/memcpy.S
+++ b/libc/string/sparc/sparc64/sparcv9b/memcpy.S
@@ -36,9 +36,6 @@
.text
.align 32
-.globl bcopy
-.set bcopy,__bcopy
-.hidden __bcopy
ENTRY(__bcopy)
sub %o1, %o0, %o4
mov %o0, %g4
@@ -54,6 +51,7 @@ ENTRY(__bcopy)
retl
nop
END(__bcopy)
+strong_alias(__bcopy,bcopy)
/* Special/non-trivial issues of this code:
*
@@ -70,9 +68,6 @@ END(__bcopy)
* of up to 2.4GB per second.
*/
.align 32
-.globl memcpy
-.set memcpy,__memcpy
-.hidden __memcpy
ENTRY(__memcpy)
100: /* %o0=dst, %o1=src, %o2=len */
@@ -335,6 +330,7 @@ small_copy_unaligned:
mov %g5, %o0
END(__memcpy)
+strong_alias(__memcpy,memcpy)
#define RMOVE_BIGCHUNK(src, dst, offset, t0, t1, t2, t3) \
ldx [%src - offset - 0x20], %t0; \
@@ -409,9 +405,6 @@ END(__memcpy)
mov %g4, %o0
.align 32
-.globl memmove
-.set memmove,__memmove
-.hidden __memmove
ENTRY(__memmove)
mov %o0, %g5
#ifndef USE_BPR
@@ -605,11 +598,12 @@ ENTRY(__memmove)
retl
mov %g4, %o0
END(__memmove)
+strong_alias(__memmove,memmove)
#ifdef USE_BPR
-weak_alias (memcpy, __align_cpy_1)
-weak_alias (memcpy, __align_cpy_2)
-weak_alias (memcpy, __align_cpy_4)
-weak_alias (memcpy, __align_cpy_8)
-weak_alias (memcpy, __align_cpy_16)
+weak_alias(memcpy,__align_cpy_1)
+weak_alias(memcpy,__align_cpy_2)
+weak_alias(memcpy,__align_cpy_4)
+weak_alias(memcpy,__align_cpy_8)
+weak_alias(memcpy,__align_cpy_16)
#endif
diff --git a/libc/string/sparc/sparc64/stpcpy.S b/libc/string/sparc/sparc64/stpcpy.S
index a66f9d152..6bd24cfee 100644
--- a/libc/string/sparc/sparc64/stpcpy.S
+++ b/libc/string/sparc/sparc64/stpcpy.S
@@ -269,4 +269,4 @@ ENTRY(__stpcpy)
mov %g6, %o0 /* IEU0 */
END(__stpcpy)
-weak_alias (__stpcpy, stpcpy)
+strong_alias(__stpcpy,stpcpy)
diff --git a/libc/string/sparc/sparc64/strcat.S b/libc/string/sparc/sparc64/strcat.S
index 3b81e59e6..fb3ad2d12 100644
--- a/libc/string/sparc/sparc64/strcat.S
+++ b/libc/string/sparc/sparc64/strcat.S
@@ -47,9 +47,6 @@
.text
.align 32
-.globl strcat
-.set strcat,__strcat
-.hidden __strcat
ENTRY(__strcat)
sethi %hi(0x01010101), %g1 /* IEU0 Group */
ldub [%o0], %o3 /* Load */
@@ -339,3 +336,5 @@ ENTRY(__strcat)
retl /* CTI+IEU1 Group */
mov %g6, %o0 /* IEU0 */
END(__strcat)
+
+strong_alias(__strcat,strcat)
diff --git a/libc/string/sparc/sparc64/strchr.S b/libc/string/sparc/sparc64/strchr.S
index 6943e8b96..34c30df31 100644
--- a/libc/string/sparc/sparc64/strchr.S
+++ b/libc/string/sparc/sparc64/strchr.S
@@ -47,9 +47,6 @@
.text
.align 32
-.globl strchr
-.set strchr,__strchr
-.hidden __strchr
ENTRY(__strchr)
andcc %o1, 0xff, %o1 /* IEU1 Group */
be,pn %icc, 17f /* CTI */
@@ -331,11 +328,10 @@ ENTRY(__strchr)
retl /* CTI+IEU1 Group */
add %o0, -1, %o0 /* IEU0 */
END(__strchr)
+strong_alias(__strchr,strchr)
+strong_alias(__strchr,index)
.align 32
-.globl strrchr
-.set strrchr,__strrchr
-.hidden __strrchr
ENTRY(__strrchr)
andcc %o1, 0xff, %o1 /* IEU1 Group */
be,pn %icc, 17b /* CTI */
@@ -481,6 +477,5 @@ ENTRY(__strrchr)
ldx [%o0], %o3 /* Load */
END(__strrchr)
-
-weak_alias (strchr, index)
-weak_alias (strrchr, rindex)
+strong_alias(__strrchr,strrchr)
+strong_alias(__strrchr,rindex)
diff --git a/libc/string/sparc/sparc64/strcmp.S b/libc/string/sparc/sparc64/strcmp.S
index a4eb36632..0e078e9ac 100644
--- a/libc/string/sparc/sparc64/strcmp.S
+++ b/libc/string/sparc/sparc64/strcmp.S
@@ -45,9 +45,6 @@
.text
.align 32
-.globl strcmp
-.set strcmp,__strcmp
-.hidden __strcmp
ENTRY(__strcmp)
sethi %hi(0x01010101), %g1 /* IEU0 Group */
andcc %o0, 7, %g0 /* IEU1 */
@@ -279,3 +276,5 @@ ENTRY(__strcmp)
ba,pt %xcc, 11b /* CTI Group */
ldxa [%o1 + %o0] ASI_PNF, %g6 /* Load */
END(__strcmp)
+
+strong_alias(__strcmp,strcmp)
diff --git a/libc/string/sparc/sparc64/strcpy.S b/libc/string/sparc/sparc64/strcpy.S
index cc906bae7..d9dff104a 100644
--- a/libc/string/sparc/sparc64/strcpy.S
+++ b/libc/string/sparc/sparc64/strcpy.S
@@ -45,9 +45,6 @@
.text
.align 32
-.globl strcpy
-.set strcpy,__strcpy
-.hidden __strcpy
ENTRY(__strcpy)
sethi %hi(0x01010101), %g1 /* IEU0 Group */
mov %o0, %g6 /* IEU1 */
@@ -244,3 +241,5 @@ ENTRY(__strcpy)
retl /* CTI+IEU1 Group */
mov %g6, %o0 /* IEU0 */
END(__strcpy)
+
+strong_alias(__strcpy,strcpy)
diff --git a/libc/string/sparc/sparc64/strlen.S b/libc/string/sparc/sparc64/strlen.S
index 9f48fe6a1..3c1cfc0d8 100644
--- a/libc/string/sparc/sparc64/strlen.S
+++ b/libc/string/sparc/sparc64/strlen.S
@@ -39,9 +39,6 @@
.text
.align 32
-.globl strlen
-.set strlen,__strlen
-.hidden __strlen
ENTRY(__strlen)
sethi %hi(0x01010101), %g1 /* IEU0 Group */
ldub [%o0], %o3 /* Load */
@@ -173,3 +170,5 @@ ENTRY(__strlen)
retl /* CTI+IEU1 Group */
sub %o0, %o1, %o0 /* IEU0 */
END(__strlen)
+
+strong_alias(__strlen,strlen)