OSDN Git Service

Add hidden versions, add missing .size
authorPeter S. Mazinger <ps.m@gmx.net>
Fri, 11 Nov 2005 23:59:19 +0000 (23:59 -0000)
committerPeter S. Mazinger <ps.m@gmx.net>
Fri, 11 Nov 2005 23:59:19 +0000 (23:59 -0000)
libc/string/arm/bcopy.S
libc/string/arm/bzero.S
libc/string/arm/memcmp.S
libc/string/arm/memcpy.S
libc/string/arm/memmove.S
libc/string/arm/memset.S
libc/string/arm/strcmp.S
libc/string/arm/strlen.S
libc/string/arm/strncmp.S

index 9e3efc7..a028075 100644 (file)
 
 /* bcopy = memcpy/memmove with arguments reversed. */
 
-.text
 .global bcopy
-.type bcopy,%function
+.set bcopy,__bcopy
+.text
+.global __bcopy
+.hidden __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)
+       
+.size __bcopy,.-__bcopy
index 0e96ba0..93582f7 100644 (file)
@@ -47,4 +47,6 @@ __bzero:
        mov     r1, #0
        b       memset (PLT)
 
+.size __bzero,.-__bzero
+
 .weak bzero ; bzero = __bzero
index 6f7a064..bdb5aca 100644 (file)
  */
 
 
-.text
 .global memcmp
-.type memcmp,%function
+.set memcmp,__memcmp
+.text
+.global __memcmp
+.hidden __memcmp
+.type __memcmp,%function
 .align 4
 
-memcmp:
+__memcmp:
        /* if ((len - 1) < 0) return 0 */
        subs    r2, r2, #1
        movmi   r0, #0
@@ -52,4 +55,5 @@ memcmp:
        sub     r0, r2, r3
        mov     pc, lr
 
+.size __memcmp,.-__memcmp
 .weak bcmp ; bcmp = memcmp
index 4869007..372da4c 100644 (file)
  * by Erik Andersen <andersen@codepoet.org>
  */
 
-.text
 .global memcpy
-.type memcpy,%function
+.set memcpy,__memcpy
+.text
+.global __memcpy
+.hidden __memcpy
+.type __memcpy,%function
 .align 4
 
-memcpy:
+__memcpy:
        stmfd   sp!, {r0, lr}
        bl      _memcpy (PLT)
        ldmfd   sp!, {r0, pc}
+
+.size __memcpy,.-__memcpy
index 9dbd3a0..eafd345 100644 (file)
  * by Erik Andersen <andersen@codepoet.org>
  */
 
-.text
 .global memmove
-.type memmove,%function
+.set memmove,__memmove
+.text
+.global __memmove
+.hidden __memmove
+.type __memmove,%function
 .align 4
 
-memmove:
+__memmove:
        stmfd   sp!, {r0, lr}
        bl      _memcpy (PLT)
        ldmfd   sp!, {r0, pc}
+
+.size __memmove,.-__memmove
index 097c5b9..5fca03a 100644 (file)
 
 #include <sys/syscall.h>
 
-.text
 .global memset
-.type memset,%function
+.set memset,__memset
+.text
+.global __memset
+.hidden __memset
+.type __memset,%function
 .align 4
 
-memset:
+__memset:
        mov     a4, a1
        cmp     a3, $8          @ at least 8 bytes to do?
        blt     2f
@@ -68,4 +71,4 @@ memset:
        strb    a2, [a4], $1
        mov     pc, lr
 
-.size memset,.-memset
+.size __memset,.-__memset
index 1f48654..e572cbe 100644 (file)
  * by Erik Andersen <andersen@codepoet.org>
  */
 
-.text
 .global strcmp
-.type strcmp,%function
+.set strcmp,__strcmp
+.text
+.global __strcmp
+.hidden __strcmp
+.type __strcmp,%function
 .align 4
 
-strcmp:
+__strcmp:
 1:
        ldrb    r2, [r0], #1
        ldrb    r3, [r1], #1
@@ -44,4 +47,5 @@ strcmp:
        sub     r0, r2, r3
        mov     pc, lr
 
+.size __strcmp,.-__strcmp
 .weak strcoll ; strcoll = strcmp
index 195276e..7d91fd0 100644 (file)
  * exit: r0 = len
  */
 
-.text
 .global strlen
-.type strlen,%function
+.set strlen,__strlen
+.text
+.global __strlen
+.hidden __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?
@@ -76,4 +79,4 @@ Llastword:                            @ drop through to here once we find a
 #endif
        mov     pc,lr
 
-.size strlen,.-strlen
+.size __strlen,.-__strlen
index 46f5f50..94e93f7 100644 (file)
  * by Erik Andersen <andersen@codepoet.org>
  */
 
-.text
 .global strncmp
-.type strncmp,%function
+.set strncmp,__strncmp
+.text
+.global __strncmp
+.hidden __strncmp
+.type __strncmp,%function
 .align 4
 
-strncmp:
+__strncmp:
        /* if (len == 0) return 0 */
        cmp     r2, #0
        moveq   r0, #0
@@ -52,3 +55,5 @@ strncmp:
        beq     1b
        sub     r0, r2, r3
        mov     pc, lr
+
+.size __strncmp,.-__strncmp