summaryrefslogtreecommitdiff
path: root/libc/string/arm
diff options
context:
space:
mode:
Diffstat (limited to 'libc/string/arm')
-rw-r--r--libc/string/arm/bcopy.S13
-rw-r--r--libc/string/arm/bzero.S13
-rw-r--r--libc/string/arm/memcmp.S13
-rw-r--r--libc/string/arm/memcpy.S11
-rw-r--r--libc/string/arm/memmove.S11
-rw-r--r--libc/string/arm/memset.S11
-rw-r--r--libc/string/arm/strcmp.S15
-rw-r--r--libc/string/arm/strlen.S11
-rw-r--r--libc/string/arm/strncmp.S11
9 files changed, 50 insertions, 59 deletions
diff --git a/libc/string/arm/bcopy.S b/libc/string/arm/bcopy.S
index 2914b8972..dde4f6027 100644
--- a/libc/string/arm/bcopy.S
+++ b/libc/string/arm/bcopy.S
@@ -42,18 +42,17 @@
#include <features.h>
.text
-.global __bcopy
-.hidden __bcopy
-.type __bcopy,%function
+.global bcopy
+.type bcopy,%function
.align 4
-__bcopy:
+bcopy:
/* switch the source and destination registers */
eor r0, r1, r0
eor r1, r0, r1
eor r0, r1, r0
- b _memcpy (PLT)
+ b _memcpy /* (PLT) */
-.size __bcopy,.-__bcopy
+.size bcopy,.-bcopy
-strong_alias(__bcopy,bcopy)
+libc_hidden_def(bcopy)
diff --git a/libc/string/arm/bzero.S b/libc/string/arm/bzero.S
index 2cb67097e..1f679f5b7 100644
--- a/libc/string/arm/bzero.S
+++ b/libc/string/arm/bzero.S
@@ -40,16 +40,15 @@
#include <features.h>
.text
-.global __bzero
-.hidden __bzero
-.type __bzero,%function
+.global bzero
+.type bzero,%function
.align 4
-__bzero:
+bzero:
mov r2, r1
mov r1, #0
- b __memset
+ b HIDDEN_JUMPTARGET(memset)
-.size __bzero,.-__bzero
+.size bzero,.-bzero
-strong_alias(__bzero,bzero)
+libc_hidden_def(bzero)
diff --git a/libc/string/arm/memcmp.S b/libc/string/arm/memcmp.S
index a97e02742..e97bbc480 100644
--- a/libc/string/arm/memcmp.S
+++ b/libc/string/arm/memcmp.S
@@ -32,12 +32,11 @@
#include <features.h>
.text
-.global __memcmp
-.hidden __memcmp
-.type __memcmp,%function
+.global memcmp
+.type memcmp,%function
.align 4
-__memcmp:
+memcmp:
/* if ((len - 1) < 0) return 0 */
subs r2, r2, #1
movmi r0, #0
@@ -54,7 +53,7 @@ __memcmp:
sub r0, r2, r3
mov pc, lr
-.size __memcmp,.-__memcmp
+.size memcmp,.-memcmp
-strong_alias(__memcmp,memcmp)
-strong_alias(__memcmp,bcmp)
+libc_hidden_def(memcmp)
+strong_alias(memcmp,bcmp)
diff --git a/libc/string/arm/memcpy.S b/libc/string/arm/memcpy.S
index 8f81a15e5..7a5b6ab76 100644
--- a/libc/string/arm/memcpy.S
+++ b/libc/string/arm/memcpy.S
@@ -40,16 +40,15 @@
#include <features.h>
.text
-.global __memcpy
-.hidden __memcpy
-.type __memcpy,%function
+.global memcpy
+.type memcpy,%function
.align 4
-__memcpy:
+memcpy:
stmfd sp!, {r0, lr}
bl _memcpy
ldmfd sp!, {r0, pc}
-.size __memcpy,.-__memcpy
+.size memcpy,.-memcpy
-strong_alias(__memcpy,memcpy)
+libc_hidden_def(memcpy)
diff --git a/libc/string/arm/memmove.S b/libc/string/arm/memmove.S
index a26cf731e..45cd9b4d4 100644
--- a/libc/string/arm/memmove.S
+++ b/libc/string/arm/memmove.S
@@ -40,16 +40,15 @@
#include <features.h>
.text
-.global __memmove
-.hidden __memmove
-.type __memmove,%function
+.global memmove
+.type memmove,%function
.align 4
-__memmove:
+memmove:
stmfd sp!, {r0, lr}
bl _memcpy
ldmfd sp!, {r0, pc}
-.size __memmove,.-__memmove
+.size memmove,.-memmove
-strong_alias(__memmove,memmove)
+libc_hidden_def(memmove)
diff --git a/libc/string/arm/memset.S b/libc/string/arm/memset.S
index dea05a6b0..476dad52a 100644
--- a/libc/string/arm/memset.S
+++ b/libc/string/arm/memset.S
@@ -21,12 +21,11 @@
#include <sys/syscall.h>
.text
-.global __memset
-.hidden __memset
-.type __memset,%function
+.global memset
+.type memset,%function
.align 4
-__memset:
+memset:
mov a4, a1
cmp a3, $8 @ at least 8 bytes to do?
blt 2f
@@ -70,6 +69,6 @@ __memset:
strb a2, [a4], $1
mov pc, lr
-.size __memset,.-__memset
+.size memset,.-memset
-strong_alias(__memset,memset)
+libc_hidden_def(memset)
diff --git a/libc/string/arm/strcmp.S b/libc/string/arm/strcmp.S
index 3f462dec0..cdc4ac469 100644
--- a/libc/string/arm/strcmp.S
+++ b/libc/string/arm/strcmp.S
@@ -32,12 +32,11 @@
#include <features.h>
.text
-.global __strcmp
-.hidden __strcmp
-.type __strcmp,%function
+.global strcmp
+.type strcmp,%function
.align 4
-__strcmp:
+strcmp:
1:
ldrb r2, [r0], #1
ldrb r3, [r1], #1
@@ -47,10 +46,10 @@ __strcmp:
sub r0, r2, r3
mov pc, lr
-.size __strcmp,.-__strcmp
+.size strcmp,.-strcmp
-strong_alias(__strcmp,strcmp)
+libc_hidden_def(strcmp)
#ifndef __UCLIBC_HAS_LOCALE__
-hidden_strong_alias(__strcmp,__strcoll)
-strong_alias(__strcmp,strcoll)
+strong_alias(strcmp,strcoll)
+libc_hidden_def(strcoll)
#endif
diff --git a/libc/string/arm/strlen.S b/libc/string/arm/strlen.S
index f623cbe20..b7af3480d 100644
--- a/libc/string/arm/strlen.S
+++ b/libc/string/arm/strlen.S
@@ -27,12 +27,11 @@
*/
.text
-.global __strlen
-.hidden __strlen
-.type __strlen,%function
+.global strlen
+.type strlen,%function
.align 4
-__strlen:
+strlen:
bic r1, r0, $3 @ addr of word containing first byte
ldr r2, [r1], $4 @ get the first word
ands r3, r0, $3 @ how many bytes are duff?
@@ -78,6 +77,6 @@ Llastword: @ drop through to here once we find a
#endif
mov pc,lr
-.size __strlen,.-__strlen
+.size strlen,.-strlen
-strong_alias(__strlen,strlen)
+libc_hidden_def(strlen)
diff --git a/libc/string/arm/strncmp.S b/libc/string/arm/strncmp.S
index a3278727e..82d45e8f3 100644
--- a/libc/string/arm/strncmp.S
+++ b/libc/string/arm/strncmp.S
@@ -32,12 +32,11 @@
#include <features.h>
.text
-.global __strncmp
-.hidden __strncmp
-.type __strncmp,%function
+.global strncmp
+.type strncmp,%function
.align 4
-__strncmp:
+strncmp:
/* if (len == 0) return 0 */
cmp r2, #0
moveq r0, #0
@@ -56,6 +55,6 @@ __strncmp:
sub r0, r2, r3
mov pc, lr
-.size __strncmp,.-__strncmp
+.size strncmp,.-strncmp
-strong_alias(__strncmp,strncmp)
+libc_hidden_def(strncmp)