OSDN Git Service

Add hidden versions
authorPeter S. Mazinger <ps.m@gmx.net>
Sat, 12 Nov 2005 01:03:51 +0000 (01:03 -0000)
committerPeter S. Mazinger <ps.m@gmx.net>
Sat, 12 Nov 2005 01:03:51 +0000 (01:03 -0000)
libc/string/x86_64/memcpy.S
libc/string/x86_64/memset.S
libc/string/x86_64/strcat.S
libc/string/x86_64/strchr.S
libc/string/x86_64/strcmp.S
libc/string/x86_64/strcpy.S
libc/string/x86_64/strcspn.S
libc/string/x86_64/strlen.S
libc/string/x86_64/strpbrk.S
libc/string/x86_64/strspn.S

index 4fa38a6..c375bf3 100644 (file)
@@ -32,7 +32,10 @@ ENTRY (__memcpy_chk)
        jb      HIDDEN_JUMPTARGET (__chk_fail)
 END (__memcpy_chk)
 #endif
-ENTRY (BP_SYM (memcpy))
+.global memcpy
+.set memcpy,__memcpy
+.hidden __memcpy
+ENTRY (BP_SYM (__memcpy))
        /* Cutoff for the big loop is a size of 32 bytes since otherwise
           the loop will never be entered.  */
        cmpq    $32, %rdx
@@ -92,4 +95,4 @@ ENTRY (BP_SYM (memcpy))
 #endif
        ret
 
-END (BP_SYM (memcpy))
+END (BP_SYM (__memcpy))
index d74ec8c..d661955 100644 (file)
@@ -35,7 +35,10 @@ ENTRY (__memset_chk)
        jb      HIDDEN_JUMPTARGET (__chk_fail)
 END (__memset_chk)
 #endif
-ENTRY (memset)
+.global memset
+.set memset,__memset
+.hidden __memset
+ENTRY (__memset)
 #if BZERO_P
        mov     %rsi,%rdx       /* Adjust parameter.  */
        xorl    %esi,%esi       /* Fill with 0s.  */
@@ -131,7 +134,7 @@ ENTRY (memset)
        jne     11b
        jmp     4b
 
-END (memset)
+END (__memset)
 
 #if !BZERO_P && defined PIC && !defined NOT_IN_libc
 strong_alias (__memset_chk, __memset_zero_constant_len_parameter)
index 1106cb4..9ee10b2 100644 (file)
 
 
        .text
-ENTRY (BP_SYM (strcat))
+.global strcat
+.set strcat,__strcat
+.hidden __strcat
+ENTRY (BP_SYM (__strcat))
        movq %rdi, %rcx         /* Dest. register. */
        andl $7, %ecx           /* mask alignment bits */
        movq %rdi, %rax         /* Duplicate destination pointer.  */
@@ -253,4 +256,4 @@ ENTRY (BP_SYM (strcat))
 24:
        movq    %rdi, %rax      /* Source is return value.  */
        retq
-END (BP_SYM (strcat))
+END (BP_SYM (__strcat))
index b84b012..04d365a 100644 (file)
 
 
        .text
-ENTRY (BP_SYM (strchr))
+.globl strchr
+.set strchr,__strchr
+.hidden __strchr
+ENTRY (BP_SYM (__strchr))
 
        /* Before we start with the main loop we process single bytes
           until the source pointer is aligned.  This has two reasons:
@@ -282,6 +285,6 @@ ENTRY (BP_SYM (strchr))
 6:
        nop
        retq
-END (BP_SYM (strchr))
+END (BP_SYM (__strchr))
 
 weak_alias (BP_SYM (strchr), BP_SYM (index))
index 0b401a7..f933c11 100644 (file)
 #include "_glibc_inc.h"
 
         .text
-ENTRY (BP_SYM (strcmp))
+.global strcmp
+.set strcmp,__strcmp
+.hidden __strcmp
+ENTRY (BP_SYM (__strcmp))
 L(oop):        movb    (%rdi), %al
        cmpb    (%rsi), %al
        jne     L(neq)
@@ -38,4 +41,4 @@ L(neq):       movl    $1, %eax
        movl    $-1, %ecx
        cmovbl  %ecx, %eax
        ret
-END (BP_SYM (strcmp))
+END (BP_SYM (__strcmp))
index 0847e2b..1a64d27 100644 (file)
 #include "_glibc_inc.h"
 
 #ifndef USE_AS_STPCPY
-# define STRCPY strcpy
+# define STRCPY __strcpy
+.global strcpy
+.set strcpy,__strcpy
+.hidden __strcpy
 #endif
 
        .text
index e1a22e4..e25100b 100644 (file)
 #include "_glibc_inc.h"
 
 /* BEWARE: `#ifdef strcspn' means that strcspn is redefined as `strpbrk' */
-#define STRPBRK_P (defined strcspn)
+#define STRPBRK_P (defined __strcspn)
 
        .text
-ENTRY (strcspn)
+#if STRPBRK_P
+#else
+.global strcspn
+.set strcspn,__strcspn
+.hidden __strcspn
+#endif
+ENTRY (__strcspn)
 
        movq %rdi, %rdx         /* Save SRC.  */
 
@@ -120,4 +126,4 @@ L(4):       addq $256, %rsp         /* remove skipset */
                                   non-valid character */
 #endif
        ret
-END (strcspn)
+END (__strcspn)
index 36b6303..ab25515 100644 (file)
 
 
        .text
-ENTRY (strlen)
+.global strlen
+.set strlen,__strlen
+.hidden __strlen
+ENTRY (__strlen)
        movq %rdi, %rcx         /* Duplicate source pointer. */
        andl $7, %ecx           /* mask alignment bits */
        movq %rdi, %rax         /* duplicate destination.  */
@@ -132,4 +135,4 @@ ENTRY (strlen)
 2:
        subq %rdi, %rax         /* compute difference to string start */
        ret
-END (strlen)
+END (__strlen)
index c49cd2c..c37befe 100644 (file)
@@ -1,2 +1,5 @@
-#define strcspn strpbrk
+#define __strcspn __strpbrk
+.global strpbrk
+.set strpbrk,__strpbrk
+.hidden __strpbrk
 #include "strcspn.S"
index 245d8e6..8d5903c 100644 (file)
 #include "_glibc_inc.h"
 
        .text
-ENTRY (strspn)
+.global strspn
+.set strspn,__strspn
+.hidden __strspn
+ENTRY (__strspn)
 
        movq %rdi, %rdx         /* Save SRC.  */
 
@@ -111,4 +114,4 @@ L(4):       addq $256, %rsp         /* remove stopset */
                                   characters, so compute distance to first
                                   non-valid character */
        ret
-END (strspn)
+END (__strspn)