summaryrefslogtreecommitdiff
path: root/libc/string/x86_64
diff options
context:
space:
mode:
Diffstat (limited to 'libc/string/x86_64')
-rw-r--r--libc/string/x86_64/_glibc_inc.h1
-rw-r--r--libc/string/x86_64/bzero.S4
-rw-r--r--libc/string/x86_64/memcpy.S8
-rw-r--r--libc/string/x86_64/mempcpy.S4
-rw-r--r--libc/string/x86_64/memset.S8
-rw-r--r--libc/string/x86_64/stpcpy.S4
-rw-r--r--libc/string/x86_64/strcat.S6
-rw-r--r--libc/string/x86_64/strchr.S8
-rw-r--r--libc/string/x86_64/strcmp.S10
-rw-r--r--libc/string/x86_64/strcpy.S4
-rw-r--r--libc/string/x86_64/strcspn.S8
-rw-r--r--libc/string/x86_64/strlen.S6
-rw-r--r--libc/string/x86_64/strpbrk.S4
-rw-r--r--libc/string/x86_64/strspn.S6
14 files changed, 40 insertions, 41 deletions
diff --git a/libc/string/x86_64/_glibc_inc.h b/libc/string/x86_64/_glibc_inc.h
index 3c31957db..88cef2ea3 100644
--- a/libc/string/x86_64/_glibc_inc.h
+++ b/libc/string/x86_64/_glibc_inc.h
@@ -14,7 +14,6 @@
#define ENTRY(sym) \
.global sym; \
- .hidden sym; \
.align ENTRY_ALIGN; \
.type sym,%function; \
sym:
diff --git a/libc/string/x86_64/bzero.S b/libc/string/x86_64/bzero.S
index 73ba75436..2b6ac0988 100644
--- a/libc/string/x86_64/bzero.S
+++ b/libc/string/x86_64/bzero.S
@@ -1,3 +1,3 @@
-#define __memset __bzero
+#define memset bzero
#include "memset.S"
-strong_alias(__bzero,bzero)
+libc_hidden_def(bzero)
diff --git a/libc/string/x86_64/memcpy.S b/libc/string/x86_64/memcpy.S
index 973cd513f..b3bb0f96c 100644
--- a/libc/string/x86_64/memcpy.S
+++ b/libc/string/x86_64/memcpy.S
@@ -23,7 +23,7 @@
/* BEWARE: `#ifdef memcpy' means that memcpy is redefined as `mempcpy',
and the return value is the byte after the last one copied in
the destination. */
-#define MEMPCPY_P (defined __memcpy)
+#define MEMPCPY_P (defined memcpy)
.text
#if defined PIC && !defined NOT_IN_libc
@@ -32,7 +32,7 @@ ENTRY (__memcpy_chk)
jb HIDDEN_JUMPTARGET (__chk_fail)
END (__memcpy_chk)
#endif
-ENTRY (BP_SYM (__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,7 +92,7 @@ ENTRY (BP_SYM (__memcpy))
#endif
ret
-END (BP_SYM (__memcpy))
+END (BP_SYM (memcpy))
#if !MEMPCPY_P
-strong_alias(__memcpy,memcpy)
+libc_hidden_def(memcpy)
#endif
diff --git a/libc/string/x86_64/mempcpy.S b/libc/string/x86_64/mempcpy.S
index 3a8e925fd..3816d9f72 100644
--- a/libc/string/x86_64/mempcpy.S
+++ b/libc/string/x86_64/mempcpy.S
@@ -1,3 +1,3 @@
-#define __memcpy __mempcpy
+#define memcpy mempcpy
#include "memcpy.S"
-strong_alias(__mempcpy,mempcpy)
+libc_hidden_def(mempcpy)
diff --git a/libc/string/x86_64/memset.S b/libc/string/x86_64/memset.S
index 923e1c208..d72d74468 100644
--- a/libc/string/x86_64/memset.S
+++ b/libc/string/x86_64/memset.S
@@ -22,7 +22,7 @@
#include "_glibc_inc.h"
/* BEWARE: `#ifdef memset' means that memset is redefined as `bzero' */
-#define BZERO_P (defined __memset)
+#define BZERO_P (defined memset)
/* This is somehow experimental and could made dependend on the cache
size. */
@@ -35,7 +35,7 @@ ENTRY (__memset_chk)
jb HIDDEN_JUMPTARGET (__chk_fail)
END (__memset_chk)
#endif
-ENTRY (__memset)
+ENTRY (memset)
#if BZERO_P
mov %rsi,%rdx /* Adjust parameter. */
xorl %esi,%esi /* Fill with 0s. */
@@ -131,9 +131,9 @@ ENTRY (__memset)
jne 11b
jmp 4b
-END (__memset)
+END (memset)
#if !BZERO_P
-strong_alias(__memset,memset)
+libc_hidden_def(memset)
#endif
#if !BZERO_P && defined PIC && !defined NOT_IN_libc
diff --git a/libc/string/x86_64/stpcpy.S b/libc/string/x86_64/stpcpy.S
index 075773371..138d0fb17 100644
--- a/libc/string/x86_64/stpcpy.S
+++ b/libc/string/x86_64/stpcpy.S
@@ -1,4 +1,4 @@
#define USE_AS_STPCPY
-#define STRCPY __stpcpy
+#define STRCPY stpcpy
#include "strcpy.S"
-strong_alias(__stpcpy,stpcpy)
+libc_hidden_def(stpcpy)
diff --git a/libc/string/x86_64/strcat.S b/libc/string/x86_64/strcat.S
index 6c7189a21..9b0068981 100644
--- a/libc/string/x86_64/strcat.S
+++ b/libc/string/x86_64/strcat.S
@@ -23,7 +23,7 @@
.text
-ENTRY (BP_SYM (__strcat))
+ENTRY (BP_SYM (strcat))
movq %rdi, %rcx /* Dest. register. */
andl $7, %ecx /* mask alignment bits */
movq %rdi, %rax /* Duplicate destination pointer. */
@@ -253,6 +253,6 @@ ENTRY (BP_SYM (__strcat))
24:
movq %rdi, %rax /* Source is return value. */
retq
-END (BP_SYM (__strcat))
+END (BP_SYM (strcat))
-strong_alias(__strcat,strcat)
+libc_hidden_def(strcat)
diff --git a/libc/string/x86_64/strchr.S b/libc/string/x86_64/strchr.S
index 312d62b61..6f6635a39 100644
--- a/libc/string/x86_64/strchr.S
+++ b/libc/string/x86_64/strchr.S
@@ -22,7 +22,7 @@
.text
-ENTRY (BP_SYM (__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,7 +282,7 @@ ENTRY (BP_SYM (__strchr))
6:
nop
retq
-END (BP_SYM (__strchr))
+END (BP_SYM (strchr))
-strong_alias(__strchr,strchr)
-strong_alias (BP_SYM (__strchr), BP_SYM (index))
+libc_hidden_def(strchr)
+strong_alias (BP_SYM (strchr), BP_SYM (index))
diff --git a/libc/string/x86_64/strcmp.S b/libc/string/x86_64/strcmp.S
index b0252f341..437e145bf 100644
--- a/libc/string/x86_64/strcmp.S
+++ b/libc/string/x86_64/strcmp.S
@@ -22,7 +22,7 @@
#include "_glibc_inc.h"
.text
-ENTRY (BP_SYM (__strcmp))
+ENTRY (BP_SYM (strcmp))
L(oop): movb (%rdi), %al
cmpb (%rsi), %al
jne L(neq)
@@ -38,10 +38,10 @@ L(neq): movl $1, %eax
movl $-1, %ecx
cmovbl %ecx, %eax
ret
-END (BP_SYM (__strcmp))
+END (BP_SYM (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/x86_64/strcpy.S b/libc/string/x86_64/strcpy.S
index 0bd2a6471..d9a51b0bb 100644
--- a/libc/string/x86_64/strcpy.S
+++ b/libc/string/x86_64/strcpy.S
@@ -21,7 +21,7 @@
#include "_glibc_inc.h"
#ifndef USE_AS_STPCPY
-# define STRCPY __strcpy
+# define STRCPY strcpy
#endif
.text
@@ -152,5 +152,5 @@ ENTRY (BP_SYM (STRCPY))
retq
END (BP_SYM (STRCPY))
#ifndef USE_AS_STPCPY
-strong_alias(__strcpy,strcpy)
+libc_hidden_def(strcpy)
#endif
diff --git a/libc/string/x86_64/strcspn.S b/libc/string/x86_64/strcspn.S
index 35959e500..fed12b5f6 100644
--- a/libc/string/x86_64/strcspn.S
+++ b/libc/string/x86_64/strcspn.S
@@ -26,10 +26,10 @@
#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)
+ENTRY (strcspn)
movq %rdi, %rdx /* Save SRC. */
@@ -120,8 +120,8 @@ L(4): addq $256, %rsp /* remove skipset */
non-valid character */
#endif
ret
-END (__strcspn)
+END (strcspn)
#if !STRPBRK_P
-strong_alias(__strcspn,strcspn)
+libc_hidden_def(strcspn)
#endif
diff --git a/libc/string/x86_64/strlen.S b/libc/string/x86_64/strlen.S
index 77aae71ba..0441dc46c 100644
--- a/libc/string/x86_64/strlen.S
+++ b/libc/string/x86_64/strlen.S
@@ -22,7 +22,7 @@
.text
-ENTRY (__strlen)
+ENTRY (strlen)
movq %rdi, %rcx /* Duplicate source pointer. */
andl $7, %ecx /* mask alignment bits */
movq %rdi, %rax /* duplicate destination. */
@@ -132,6 +132,6 @@ ENTRY (__strlen)
2:
subq %rdi, %rax /* compute difference to string start */
ret
-END (__strlen)
+END (strlen)
-strong_alias(__strlen,strlen)
+libc_hidden_def(strlen)
diff --git a/libc/string/x86_64/strpbrk.S b/libc/string/x86_64/strpbrk.S
index 94b14d091..72a47bcb9 100644
--- a/libc/string/x86_64/strpbrk.S
+++ b/libc/string/x86_64/strpbrk.S
@@ -1,3 +1,3 @@
-#define __strcspn __strpbrk
+#define strcspn strpbrk
#include "strcspn.S"
-strong_alias(__strpbrk,strpbrk)
+libc_hidden_proto(strpbrk)
diff --git a/libc/string/x86_64/strspn.S b/libc/string/x86_64/strspn.S
index ae5b4a1df..c126abd2e 100644
--- a/libc/string/x86_64/strspn.S
+++ b/libc/string/x86_64/strspn.S
@@ -26,7 +26,7 @@
#include "_glibc_inc.h"
.text
-ENTRY (__strspn)
+ENTRY (strspn)
movq %rdi, %rdx /* Save SRC. */
@@ -111,6 +111,6 @@ L(4): addq $256, %rsp /* remove stopset */
characters, so compute distance to first
non-valid character */
ret
-END (__strspn)
+END (strspn)
-strong_alias(__strspn,strspn)
+libc_hidden_def(strspn)