s390: Refactor ifunc resolvers due to false debuginfo.

This patch adjusts the s390 specific ifunc helper macros in ifunc-resolve.h to
use the common __ifunc macro, which uses gcc attribute ifunc to get rid of the
false debuginfo. Therefore the redirection construct is applied where needed.

Perhaps in future we can switch some of the internal symbols __GI_* from the
fallback variant to the ifunc function. But this change is not
straightforward due to a segmentation fault while linking libc.so with older
binutils on s390.

ChangeLog:

	[BZ #20478]
	* sysdeps/s390/multiarch/ifunc-resolve.h
	(s390_vx_libc_ifunc2, s390_libc_ifunc): Use __ifunc from libc-symbols.h
	to create ifunc symbols.
	(s390_vx_libc_ifunc_init, s390_vx_libc_ifunc_redirected
	, s390_vx_libc_ifunc2_redirected, s390_libc_ifunc_init): New define.
	* sysdeps/s390/multiarch/memchr.c: Redirect ifunced function in header
	for using it as type for ifunc function.
	* sysdeps/s390/multiarch/mempcpy.c: Likewise.
	* sysdeps/s390/multiarch/rawmemchr.c: Likewise.
	* sysdeps/s390/multiarch/stpcpy.c: Likewise.
	* sysdeps/s390/multiarch/stpncpy.c: Likewise.
	* sysdeps/s390/multiarch/strcat.c: Likewise.
	* sysdeps/s390/multiarch/strchr.c: Likewise.
	* sysdeps/s390/multiarch/strcmp.c: Likewise.
	* sysdeps/s390/multiarch/strcpy.c: Likewise.
	* sysdeps/s390/multiarch/strcspn.c: Likewise.
	* sysdeps/s390/multiarch/strlen.c: Likewise.
	* sysdeps/s390/multiarch/strncmp.c: Likewise.
	* sysdeps/s390/multiarch/strncpy.c: Likewise.
	* sysdeps/s390/multiarch/strnlen.c: Likewise.
	* sysdeps/s390/multiarch/strpbrk.c: Likewise.
	* sysdeps/s390/multiarch/strrchr.c: Likewise.
	* sysdeps/s390/multiarch/strspn.c: Likewise.
	* sysdeps/s390/multiarch/wcschr.c: Likewise.
	* sysdeps/s390/multiarch/wcscmp.c: Likewise.
	* sysdeps/s390/multiarch/wcspbrk.c: Likewise.
	* sysdeps/s390/multiarch/wcsspn.c: Likewise.
	* sysdeps/s390/multiarch/wmemchr.c: Likewise.
	* sysdeps/s390/multiarch/wmemset.c: Likewise.
	* sysdeps/s390/s390-32/multiarch/memcmp.c: Likewise.
	* sysdeps/s390/s390-32/multiarch/memcpy.c: Likewise.
	* sysdeps/s390/s390-32/multiarch/memset.c: Likewise.
	* sysdeps/s390/s390-64/multiarch/memcmp.c: Likewise.
	* sysdeps/s390/s390-64/multiarch/memcpy.c: Likewise.
	* sysdeps/s390/s390-64/multiarch/memset.c: Likewise.
This commit is contained in:
Stefan Liebler 2016-10-07 09:56:47 +02:00
parent 00980d845f
commit 18d6c45e12
31 changed files with 209 additions and 86 deletions

View File

@ -1,3 +1,42 @@
2016-10-07 Stefan Liebler <stli@linux.vnet.ibm.com>
[BZ #20478]
* sysdeps/s390/multiarch/ifunc-resolve.h
(s390_vx_libc_ifunc2, s390_libc_ifunc): Use __ifunc from libc-symbols.h
to create ifunc symbols.
(s390_vx_libc_ifunc_init, s390_vx_libc_ifunc_redirected
, s390_vx_libc_ifunc2_redirected, s390_libc_ifunc_init): New define.
* sysdeps/s390/multiarch/memchr.c: Redirect ifunced function in header
for using it as type for ifunc function.
* sysdeps/s390/multiarch/mempcpy.c: Likewise.
* sysdeps/s390/multiarch/rawmemchr.c: Likewise.
* sysdeps/s390/multiarch/stpcpy.c: Likewise.
* sysdeps/s390/multiarch/stpncpy.c: Likewise.
* sysdeps/s390/multiarch/strcat.c: Likewise.
* sysdeps/s390/multiarch/strchr.c: Likewise.
* sysdeps/s390/multiarch/strcmp.c: Likewise.
* sysdeps/s390/multiarch/strcpy.c: Likewise.
* sysdeps/s390/multiarch/strcspn.c: Likewise.
* sysdeps/s390/multiarch/strlen.c: Likewise.
* sysdeps/s390/multiarch/strncmp.c: Likewise.
* sysdeps/s390/multiarch/strncpy.c: Likewise.
* sysdeps/s390/multiarch/strnlen.c: Likewise.
* sysdeps/s390/multiarch/strpbrk.c: Likewise.
* sysdeps/s390/multiarch/strrchr.c: Likewise.
* sysdeps/s390/multiarch/strspn.c: Likewise.
* sysdeps/s390/multiarch/wcschr.c: Likewise.
* sysdeps/s390/multiarch/wcscmp.c: Likewise.
* sysdeps/s390/multiarch/wcspbrk.c: Likewise.
* sysdeps/s390/multiarch/wcsspn.c: Likewise.
* sysdeps/s390/multiarch/wmemchr.c: Likewise.
* sysdeps/s390/multiarch/wmemset.c: Likewise.
* sysdeps/s390/s390-32/multiarch/memcmp.c: Likewise.
* sysdeps/s390/s390-32/multiarch/memcpy.c: Likewise.
* sysdeps/s390/s390-32/multiarch/memset.c: Likewise.
* sysdeps/s390/s390-64/multiarch/memcmp.c: Likewise.
* sysdeps/s390/s390-64/multiarch/memcpy.c: Likewise.
* sysdeps/s390/s390-64/multiarch/memset.c: Likewise.
2016-10-07 Stefan Liebler <stli@linux.vnet.ibm.com> 2016-10-07 Stefan Liebler <stli@linux.vnet.ibm.com>
* include/libc-symbols.h (__ifunc_resolver): * include/libc-symbols.h (__ifunc_resolver):

View File

@ -40,53 +40,46 @@
".machine pop" "\n" \ ".machine pop" "\n" \
: "=QS" (STFLE_BITS), "+d" (reg0) \ : "=QS" (STFLE_BITS), "+d" (reg0) \
: : "cc"); : : "cc");
#define s390_libc_ifunc_init() \
unsigned long long stfle_bits = 0ULL; \
if (__glibc_likely((dl_hwcap & HWCAP_S390_STFLE) \
&& (dl_hwcap & HWCAP_S390_ZARCH) \
&& (dl_hwcap & HWCAP_S390_HIGH_GPRS))) \
{ \
S390_STORE_STFLE (stfle_bits); \
}
#define s390_libc_ifunc(FUNC) \ #define s390_libc_ifunc(TYPE_FUNC, RESOLVERFUNC, FUNC) \
__asm__ (".globl " #FUNC "\n\t" \
".type " #FUNC ",@gnu_indirect_function\n\t" \
".set " #FUNC ",__resolve_" #FUNC "\n\t"); \
\
/* Make the declarations of the optimized functions hidden in order /* Make the declarations of the optimized functions hidden in order
to prevent GOT slots being generated for them. */ \ to prevent GOT slots being generated for them. */ \
extern void *__##FUNC##_z196 attribute_hidden; \ extern __typeof (TYPE_FUNC) RESOLVERFUNC##_z196 attribute_hidden; \
extern void *__##FUNC##_z10 attribute_hidden; \ extern __typeof (TYPE_FUNC) RESOLVERFUNC##_z10 attribute_hidden; \
extern void *__##FUNC##_default attribute_hidden; \ extern __typeof (TYPE_FUNC) RESOLVERFUNC##_default attribute_hidden; \
\ __ifunc (TYPE_FUNC, FUNC, \
void *__resolve_##FUNC (unsigned long int dl_hwcap) \ __glibc_likely (S390_IS_Z196 (stfle_bits)) \
{ \ ? RESOLVERFUNC##_z196 \
if ((dl_hwcap & HWCAP_S390_STFLE) \ : __glibc_likely (S390_IS_Z10 (stfle_bits)) \
&& (dl_hwcap & HWCAP_S390_ZARCH) \ ? RESOLVERFUNC##_z10 \
&& (dl_hwcap & HWCAP_S390_HIGH_GPRS)) \ : RESOLVERFUNC##_default, \
{ \ unsigned long int dl_hwcap, s390_libc_ifunc_init);
unsigned long long stfle_bits; \
S390_STORE_STFLE (stfle_bits); \
\
if (S390_IS_Z196 (stfle_bits)) \
return &__##FUNC##_z196; \
else if (S390_IS_Z10 (stfle_bits)) \
return &__##FUNC##_z10; \
else \
return &__##FUNC##_default; \
} \
else \
return &__##FUNC##_default; \
}
#define s390_vx_libc_ifunc(FUNC) \ #define s390_vx_libc_ifunc(FUNC) \
s390_vx_libc_ifunc2(FUNC, FUNC) s390_vx_libc_ifunc2_redirected(FUNC, FUNC, FUNC)
#define s390_vx_libc_ifunc2(RESOLVERFUNC, FUNC) \ #define s390_vx_libc_ifunc_redirected(TYPE_FUNC, FUNC) \
s390_vx_libc_ifunc2_redirected(TYPE_FUNC, FUNC, FUNC)
#define s390_vx_libc_ifunc2(RESOLVERFUNC, FUNC) \
s390_vx_libc_ifunc2_redirected(FUNC, RESOLVERFUNC, FUNC)
#define s390_vx_libc_ifunc_init()
#define s390_vx_libc_ifunc2_redirected(TYPE_FUNC, RESOLVERFUNC, FUNC) \
/* Make the declarations of the optimized functions hidden in order /* Make the declarations of the optimized functions hidden in order
to prevent GOT slots being generated for them. */ \ to prevent GOT slots being generated for them. */ \
extern __typeof (FUNC) RESOLVERFUNC##_vx attribute_hidden; \ extern __typeof (TYPE_FUNC) RESOLVERFUNC##_vx attribute_hidden; \
extern __typeof (FUNC) RESOLVERFUNC##_c attribute_hidden; \ extern __typeof (TYPE_FUNC) RESOLVERFUNC##_c attribute_hidden; \
extern void *__resolve_##RESOLVERFUNC (unsigned long int) __asm__ (#FUNC); \ __ifunc (TYPE_FUNC, FUNC, \
\ (dl_hwcap & HWCAP_S390_VX) \
void *__resolve_##RESOLVERFUNC (unsigned long int dl_hwcap) \ ? RESOLVERFUNC##_vx \
{ \ : RESOLVERFUNC##_c, \
if (dl_hwcap & HWCAP_S390_VX) \ unsigned long int dl_hwcap, s390_vx_libc_ifunc_init);
return &RESOLVERFUNC##_vx; \
else \
return &RESOLVERFUNC##_c; \
} \
__asm__ (".type " #FUNC ", %gnu_indirect_function");

View File

@ -17,8 +17,11 @@
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc) #if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc)
# define memchr __redirect_memchr
# include <string.h> # include <string.h>
# undef memchr
# include <ifunc-resolve.h> # include <ifunc-resolve.h>
s390_vx_libc_ifunc2 (__memchr, memchr) s390_vx_libc_ifunc2_redirected (__redirect_memchr, __memchr, memchr)
#endif #endif

View File

@ -18,9 +18,15 @@
#if defined SHARED && IS_IN (libc) #if defined SHARED && IS_IN (libc)
# define mempcpy __redirect_mempcpy
# define __mempcpy __redirect___mempcpy
/* Omit the mempcpy inline definitions because it would redefine mempcpy. */
# define _HAVE_STRING_ARCH_mempcpy 1
# include <string.h>
# undef mempcpy
# undef __mempcpy
# include <ifunc-resolve.h> # include <ifunc-resolve.h>
s390_libc_ifunc (__mempcpy)
__asm__ (".weak mempcpy\n\t" s390_libc_ifunc (__redirect___mempcpy, ____mempcpy, __mempcpy)
".set mempcpy,__mempcpy\n\t"); weak_alias (__mempcpy, mempcpy);
#endif #endif

View File

@ -17,10 +17,13 @@
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc) #if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc)
# define __rawmemchr __redirect___rawmemchr
# include <string.h> # include <string.h>
# undef __rawmemchr
# include <ifunc-resolve.h> # include <ifunc-resolve.h>
s390_vx_libc_ifunc (__rawmemchr) s390_vx_libc_ifunc2_redirected (__redirect___rawmemchr, __rawmemchr
, __rawmemchr)
weak_alias (__rawmemchr, rawmemchr) weak_alias (__rawmemchr, rawmemchr)
#else #else

View File

@ -17,13 +17,18 @@
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc) #if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc)
# define stpcpy __redirect_stpcpy
# define __stpcpy __redirect___stpcpy
/* Omit the stpcpy inline definitions because it would redefine stpcpy. */
# define __NO_STRING_INLINES
# define NO_MEMPCPY_STPCPY_REDIRECT # define NO_MEMPCPY_STPCPY_REDIRECT
# include <string.h> # include <string.h>
# undef stpcpy
# undef __stpcpy
# include <ifunc-resolve.h> # include <ifunc-resolve.h>
s390_vx_libc_ifunc (__stpcpy) s390_vx_libc_ifunc_redirected (__redirect___stpcpy, __stpcpy);
weak_alias (__stpcpy, stpcpy) weak_alias (__stpcpy, stpcpy)
libc_hidden_builtin_def (stpcpy)
#else #else
# include <string/stpcpy.c> # include <string/stpcpy.c>

View File

@ -17,10 +17,14 @@
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc) #if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc)
# define stpncpy __redirect_stpncpy
# define __stpncpy __redirect___stpncpy
# include <string.h> # include <string.h>
# undef stpncpy
# undef __stpncpy
# include <ifunc-resolve.h> # include <ifunc-resolve.h>
s390_vx_libc_ifunc (__stpncpy) s390_vx_libc_ifunc_redirected (__redirect___stpncpy, __stpncpy)
weak_alias (__stpncpy, stpncpy) weak_alias (__stpncpy, stpncpy)
#else #else

View File

@ -17,10 +17,12 @@
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc) #if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc)
# define strcat __redirect_strcat
# include <string.h> # include <string.h>
# undef strcat
# include <ifunc-resolve.h> # include <ifunc-resolve.h>
s390_vx_libc_ifunc2 (__strcat, strcat) s390_vx_libc_ifunc2_redirected (__redirect_strcat, __strcat, strcat)
#else #else
# include <string/strcat.c> # include <string/strcat.c>

View File

@ -17,10 +17,14 @@
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc) #if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc)
# define strchr __redirect_strchr
/* Omit the strchr inline definitions because it would redefine strchr. */
# define __NO_STRING_INLINES
# include <string.h> # include <string.h>
# undef strchr
# include <ifunc-resolve.h> # include <ifunc-resolve.h>
s390_vx_libc_ifunc2 (__strchr, strchr) s390_vx_libc_ifunc2_redirected (__redirect_strchr, __strchr, strchr)
weak_alias (strchr, index) weak_alias (strchr, index)
#else #else

View File

@ -17,10 +17,13 @@
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc) #if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc)
# define strcmp __redirect_strcmp
/* Omit the strcmp inline definitions because it would redefine strcmp. */
# define __NO_STRING_INLINES
# include <string.h> # include <string.h>
# include <ifunc-resolve.h> # include <ifunc-resolve.h>
# undef strcmp # undef strcmp
s390_vx_libc_ifunc2 (__strcmp, strcmp)
s390_vx_libc_ifunc2_redirected (__redirect_strcmp, __strcmp, strcmp)
#endif #endif

View File

@ -17,8 +17,11 @@
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc) #if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc)
# define strcpy __redirect_strcpy
# include <string.h> # include <string.h>
# undef strcpy
# include <ifunc-resolve.h> # include <ifunc-resolve.h>
s390_vx_libc_ifunc2 (__strcpy, strcpy) s390_vx_libc_ifunc2_redirected (__redirect_strcpy, __strcpy, strcpy)
#endif #endif

View File

@ -17,10 +17,14 @@
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc) #if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc)
# define strcspn __redirect_strcspn
/* Omit the strcspn inline definitions because it would redefine strcspn. */
# define __NO_STRING_INLINES
# include <string.h> # include <string.h>
# undef strcspn
# include <ifunc-resolve.h> # include <ifunc-resolve.h>
s390_vx_libc_ifunc2 (__strcspn, strcspn) s390_vx_libc_ifunc2_redirected (__redirect_strcspn, __strcspn, strcspn)
#else #else
# include <string/strcspn.c> # include <string/strcspn.c>

View File

@ -17,10 +17,12 @@
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc) #if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc)
# define strlen __redirect_strlen
# include <string.h> # include <string.h>
# include <ifunc-resolve.h> # include <ifunc-resolve.h>
# undef strlen
s390_vx_libc_ifunc2 (__strlen, strlen) s390_vx_libc_ifunc2_redirected (__redirect_strlen, __strlen, strlen)
#else #else
# include <string/strlen.c> # include <string/strlen.c>

View File

@ -17,13 +17,14 @@
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc) #if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc)
# define strncmp __redirect_strncmp
/* Omit the strncmp inline definitions because it would redefine strncmp. */
# define __NO_STRING_INLINES
# include <string.h> # include <string.h>
# undef strncmp
# include <ifunc-resolve.h> # include <ifunc-resolve.h>
s390_vx_libc_ifunc2_redirected (__redirect_strncmp, __strncmp, strncmp)
# undef strcmp
extern __typeof (strncmp) __strncmp;
s390_vx_libc_ifunc2 (__strncmp, strncmp)
#else #else
# include <string/strncmp.c> # include <string/strncmp.c>

View File

@ -17,8 +17,13 @@
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc) #if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc)
# define strncpy __redirect_strncpy
/* Omit the strncpy inline definitions because it would redefine strncpy. */
# define __NO_STRING_INLINES
# include <string.h> # include <string.h>
# undef strncpy
# include <ifunc-resolve.h> # include <ifunc-resolve.h>
s390_vx_libc_ifunc2 (__strncpy, strncpy) s390_vx_libc_ifunc2_redirected (__redirect_strncpy, __strncpy, strncpy);
#endif #endif

View File

@ -17,12 +17,15 @@
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc) #if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc)
# define strnlen __redirect_strnlen
# define __strnlen __redirect___strnlen
# include <string.h> # include <string.h>
# undef strnlen
# undef __strnlen
# include <ifunc-resolve.h> # include <ifunc-resolve.h>
s390_vx_libc_ifunc (__strnlen) s390_vx_libc_ifunc_redirected (__redirect___strnlen, __strnlen)
weak_alias (__strnlen, strnlen) weak_alias (__strnlen, strnlen)
libc_hidden_def (strnlen)
#else #else
# include <string/strnlen.c> # include <string/strnlen.c>

View File

@ -17,10 +17,14 @@
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc) #if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc)
# define strpbrk __redirect_strpbrk
/* Omit the strpbrk inline definitions because it would redefine strpbrk. */
# define __NO_STRING_INLINES
# include <string.h> # include <string.h>
# undef strpbrk
# include <ifunc-resolve.h> # include <ifunc-resolve.h>
s390_vx_libc_ifunc2 (__strpbrk, strpbrk) s390_vx_libc_ifunc2_redirected (__redirect_strpbrk, __strpbrk, strpbrk)
#else #else
# include <string/strpbrk.c> # include <string/strpbrk.c>

View File

@ -17,11 +17,13 @@
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc) #if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc)
# define strrchr __redirect_strrchr
# include <string.h> # include <string.h>
# undef strrchr
# include <ifunc-resolve.h> # include <ifunc-resolve.h>
s390_vx_libc_ifunc2 (__strrchr, strrchr) s390_vx_libc_ifunc2_redirected (__redirect_strrchr, __strrchr, strrchr)
weak_alias (strrchr, rindex) weak_alias (strrchr, rindex);
#else #else
# include <string/strrchr.c> # include <string/strrchr.c>

View File

@ -17,10 +17,14 @@
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc) #if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc)
# define strspn __redirect_strspn
/* Omit the strspn inline definitions because it would redefine strspn. */
# define __NO_STRING_INLINES
# include <string.h> # include <string.h>
# undef strspn
# include <ifunc-resolve.h> # include <ifunc-resolve.h>
s390_vx_libc_ifunc2 (__strspn, strspn) s390_vx_libc_ifunc2_redirected (__redirect_strspn, __strspn, strspn)
#else #else
# include <string/strspn.c> # include <string/strspn.c>

View File

@ -17,12 +17,15 @@
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc) #if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc)
# define wcschr __redirect_wcschr
# define __wcschr __redirect___wcschr
# include <wchar.h> # include <wchar.h>
# undef wcschr
# undef __wcschr
# include <ifunc-resolve.h> # include <ifunc-resolve.h>
s390_vx_libc_ifunc (__wcschr) s390_vx_libc_ifunc_redirected (__redirect___wcschr, __wcschr)
weak_alias (__wcschr, wcschr) weak_alias (__wcschr, wcschr)
libc_hidden_weak (wcschr)
#else #else
# include <wcsmbs/wcschr.c> # include <wcsmbs/wcschr.c>

View File

@ -17,10 +17,12 @@
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc) #if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc)
# define __wcscmp __redirect___wcscmp
# include <wchar.h> # include <wchar.h>
# undef __wcscmp
# include <ifunc-resolve.h> # include <ifunc-resolve.h>
s390_vx_libc_ifunc (__wcscmp) s390_vx_libc_ifunc_redirected (__redirect___wcscmp, __wcscmp)
weak_alias (__wcscmp, wcscmp) weak_alias (__wcscmp, wcscmp)
#else #else

View File

@ -17,10 +17,12 @@
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc) #if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc)
# define wcspbrk __redirect_wcspbrk
# include <wchar.h> # include <wchar.h>
# undef wcspbrk
# include <ifunc-resolve.h> # include <ifunc-resolve.h>
s390_vx_libc_ifunc2 (__wcspbrk, wcspbrk) s390_vx_libc_ifunc2_redirected (__redirect_wcspbrk, __wcspbrk, wcspbrk)
#else #else
# include <wcsmbs/wcspbrk.c> # include <wcsmbs/wcspbrk.c>

View File

@ -17,10 +17,12 @@
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc) #if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc)
# define wcsspn __redirect_wcsspn
# include <wchar.h> # include <wchar.h>
# undef wcsspn
# include <ifunc-resolve.h> # include <ifunc-resolve.h>
s390_vx_libc_ifunc2 (__wcsspn, wcsspn) s390_vx_libc_ifunc2_redirected (__redirect_wcsspn, __wcsspn, wcsspn)
#else #else
# include <wcsmbs/wcsspn.c> # include <wcsmbs/wcsspn.c>

View File

@ -17,12 +17,15 @@
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc) #if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc)
# define wmemchr __redirect_wmemchr
# define __wmemchr __redirect___wmemchr
# include <wchar.h> # include <wchar.h>
# undef wmemchr
# undef __wmemchr
# include <ifunc-resolve.h> # include <ifunc-resolve.h>
s390_vx_libc_ifunc (__wmemchr) s390_vx_libc_ifunc_redirected (__redirect___wmemchr, __wmemchr)
weak_alias (__wmemchr, wmemchr) weak_alias (__wmemchr, wmemchr)
libc_hidden_weak (wmemchr)
#else #else
# include <wcsmbs/wmemchr.c> # include <wcsmbs/wmemchr.c>

View File

@ -17,12 +17,15 @@
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc) #if defined HAVE_S390_VX_ASM_SUPPORT && IS_IN (libc)
# define wmemset __redirect_wmemset
# define __wmemset __redirect___wmemset
# include <wchar.h> # include <wchar.h>
# undef wmemset
# undef __wmemset
# include <ifunc-resolve.h> # include <ifunc-resolve.h>
s390_vx_libc_ifunc (__wmemset) s390_vx_libc_ifunc_redirected (__redirect___wmemset, __wmemset)
weak_alias (__wmemset, wmemset) weak_alias (__wmemset, wmemset)
libc_hidden_weak (wmemset)
#else #else
# include <wcsmbs/wmemset.c> # include <wcsmbs/wmemset.c>

View File

@ -17,8 +17,11 @@
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#if IS_IN (libc) #if IS_IN (libc)
# define memcmp __redirect_memcmp
# include <string.h>
# undef memcmp
# include <ifunc-resolve.h> # include <ifunc-resolve.h>
s390_libc_ifunc (memcmp) s390_libc_ifunc (__redirect_memcmp, __memcmp, memcmp)
__asm__(".weak bcmp ; bcmp = memcmp"); weak_alias (memcmp, bcmp);
#endif #endif

View File

@ -18,7 +18,10 @@
/* In the static lib memcpy is needed before the reloc is resolved. */ /* In the static lib memcpy is needed before the reloc is resolved. */
#if defined SHARED && IS_IN (libc) #if defined SHARED && IS_IN (libc)
# define memcpy __redirect_memcpy
# include <string.h>
# undef memcpy
# include <ifunc-resolve.h> # include <ifunc-resolve.h>
s390_libc_ifunc (memcpy) s390_libc_ifunc (__redirect_memcpy, __memcpy, memcpy)
#endif #endif

View File

@ -17,7 +17,10 @@
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#if IS_IN (libc) #if IS_IN (libc)
# define memset __redirect_memset
# include <string.h>
# undef memset
# include <ifunc-resolve.h> # include <ifunc-resolve.h>
s390_libc_ifunc (memset) s390_libc_ifunc (__redirect_memset, __memset, memset)
#endif #endif

View File

@ -17,8 +17,11 @@
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#if IS_IN (libc) #if IS_IN (libc)
# define memcmp __redirect_memcmp
# include <string.h>
# undef memcmp
# include <ifunc-resolve.h> # include <ifunc-resolve.h>
s390_libc_ifunc (memcmp) s390_libc_ifunc (__redirect_memcmp, __memcmp, memcmp)
__asm__(".weak bcmp ; bcmp = memcmp"); weak_alias (memcmp, bcmp);
#endif #endif

View File

@ -18,7 +18,10 @@
/* In the static lib memcpy is needed before the reloc is resolved. */ /* In the static lib memcpy is needed before the reloc is resolved. */
#if defined SHARED && IS_IN (libc) #if defined SHARED && IS_IN (libc)
# define memcpy __redirect_memcpy
# include <string.h>
# undef memcpy
# include <ifunc-resolve.h> # include <ifunc-resolve.h>
s390_libc_ifunc (memcpy) s390_libc_ifunc (__redirect_memcpy, __memcpy, memcpy)
#endif #endif

View File

@ -17,7 +17,10 @@
<http://www.gnu.org/licenses/>. */ <http://www.gnu.org/licenses/>. */
#if IS_IN (libc) #if IS_IN (libc)
# define memset __redirect_memset
# include <string.h>
# undef memset
# include <ifunc-resolve.h> # include <ifunc-resolve.h>
s390_libc_ifunc (memset) s390_libc_ifunc (__redirect_memset, __memset, memset)
#endif #endif