about summary refs log tree commit diff
path: root/sysdeps/i386
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2023-02-06 15:05:56 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2023-02-08 17:13:58 -0300
commit22999b2f0fb62eed1af4095d062bd1272d6afeb1 (patch)
treecb21ffd0c043cdb5393c3529148b83679349d7a5 /sysdeps/i386
parent7ea510127e2067efa07865158ac92c330c379950 (diff)
downloadglibc-22999b2f0fb62eed1af4095d062bd1272d6afeb1.tar.gz
glibc-22999b2f0fb62eed1af4095d062bd1272d6afeb1.tar.xz
glibc-22999b2f0fb62eed1af4095d062bd1272d6afeb1.zip
string: Add libc_hidden_proto for memrchr
Although static linker can optimize it to local call, it follows the
internal scheme to provide hidden proto and definitions.

Reviewed-by: Carlos Eduardo Seo <carlos.seo@linaro.org>
Diffstat (limited to 'sysdeps/i386')
-rw-r--r--sysdeps/i386/i686/multiarch/memrchr-sse2.S1
-rw-r--r--sysdeps/i386/i686/multiarch/memrchr.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/sysdeps/i386/i686/multiarch/memrchr-sse2.S b/sysdeps/i386/i686/multiarch/memrchr-sse2.S
index c2c37f7ce1..aa15e7cf24 100644
--- a/sysdeps/i386/i686/multiarch/memrchr-sse2.S
+++ b/sysdeps/i386/i686/multiarch/memrchr-sse2.S
@@ -720,4 +720,5 @@ L(ret_null):
 	ret
 
 END (__memrchr_sse2)
+strong_alias (__memrchr_sse2, __GI___memrchr)
 #endif
diff --git a/sysdeps/i386/i686/multiarch/memrchr.c b/sysdeps/i386/i686/multiarch/memrchr.c
index c820a9d607..80dca18000 100644
--- a/sysdeps/i386/i686/multiarch/memrchr.c
+++ b/sysdeps/i386/i686/multiarch/memrchr.c
@@ -20,8 +20,10 @@
 /* Define multiple versions only for the definition in libc.  */
 #if IS_IN (libc)
 # define memrchr __redirect_memrchr
+# define __memrchr __redirect___memrchr
 # include <string.h>
 # undef memrchr
+# undef __memrchr
 
 # define SYMBOL_NAME memrchr
 # include "ifunc-sse2-bsf.h"