aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/s390
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2023-02-06 13:15:22 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2023-02-08 17:13:56 -0300
commit7ea510127e2067efa07865158ac92c330c379950 (patch)
treedf830b3da00683a56693e2cca08268b8764c14eb /sysdeps/s390
parent9fd63e35371b9939e9153907c6a753e6960b68ad (diff)
downloadglibc-7ea510127e2067efa07865158ac92c330c379950.zip
glibc-7ea510127e2067efa07865158ac92c330c379950.tar.gz
glibc-7ea510127e2067efa07865158ac92c330c379950.tar.bz2
string: Add libc_hidden_proto for strchrnul
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/s390')
-rw-r--r--sysdeps/s390/strchrnul-c.c4
-rw-r--r--sysdeps/s390/strchrnul.c8
2 files changed, 8 insertions, 4 deletions
diff --git a/sysdeps/s390/strchrnul-c.c b/sysdeps/s390/strchrnul-c.c
index ff6aa38..f6f5bae 100644
--- a/sysdeps/s390/strchrnul-c.c
+++ b/sysdeps/s390/strchrnul-c.c
@@ -21,8 +21,10 @@
#if HAVE_STRCHRNUL_C
# if HAVE_STRCHRNUL_IFUNC
# define STRCHRNUL STRCHRNUL_C
-# define __strchrnul STRCHRNUL
# endif
# include <string/strchrnul.c>
+# if defined SHARED && IS_IN (libc)
+__hidden_ver1 (__strchrnul_c, __GI___strchrnul, __strchrnul_c);
+# endif
#endif
diff --git a/sysdeps/s390/strchrnul.c b/sysdeps/s390/strchrnul.c
index a480d28..e86ba6d 100644
--- a/sysdeps/s390/strchrnul.c
+++ b/sysdeps/s390/strchrnul.c
@@ -19,18 +19,20 @@
#include <ifunc-strchrnul.h>
#if HAVE_STRCHRNUL_IFUNC
+# define __strchrnul __redirect_strchrnul
# include <string.h>
+# undef __strchrnul
# include <ifunc-resolve.h>
# if HAVE_STRCHRNUL_C
-extern __typeof (__strchrnul) STRCHRNUL_C attribute_hidden;
+extern __typeof (__redirect_strchrnul) STRCHRNUL_C attribute_hidden;
# endif
# if HAVE_STRCHRNUL_Z13
-extern __typeof (__strchrnul) STRCHRNUL_Z13 attribute_hidden;
+extern __typeof (__redirect_strchrnul) STRCHRNUL_Z13 attribute_hidden;
# endif
-s390_libc_ifunc_expr (__strchrnul, __strchrnul,
+s390_libc_ifunc_expr (__redirect_strchrnul, __strchrnul,
(HAVE_STRCHRNUL_Z13 && (hwcap & HWCAP_S390_VX))
? STRCHRNUL_Z13
: STRCHRNUL_DEFAULT