From 7ea510127e2067efa07865158ac92c330c379950 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Mon, 6 Feb 2023 13:15:22 -0300 Subject: 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 --- sysdeps/s390/strchrnul-c.c | 4 +++- sysdeps/s390/strchrnul.c | 8 +++++--- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'sysdeps/s390') 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 +# 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 #if HAVE_STRCHRNUL_IFUNC +# define __strchrnul __redirect_strchrnul # include +# undef __strchrnul # include # 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 -- cgit v1.1