ce426f
From 6b9ad27fafd9c09aee186f2630b1c54348335040 Mon Sep 17 00:00:00 2001
ce426f
From: Stefan Liebler <stli@linux.vnet.ibm.com>
ce426f
Date: Thu, 8 Oct 2015 10:29:17 +0200
ce426f
Subject: [PATCH 03/30] S390: Get rid of linknamespace failures for string
ce426f
 functions.
ce426f
ce426f
upstream-commit-id: 1d53248326dbd3c620a2bca16d35eff3019d900a
ce426f
https://www.sourceware.org/ml/libc-alpha/2015-01/msg00310.html
ce426f
ce426f
This patch is needed to prepare for the optimized string function patchset.
ce426f
This patch prefixes the ifunc-resolvers, the specific functions
ce426f
and helper functions with '__' on s390-32/s390-64.
ce426f
---
ce426f
 sysdeps/s390/s390-32/memcmp.S                  |  4 ++--
ce426f
 sysdeps/s390/s390-32/memcpy.S                  | 10 +++++-----
ce426f
 sysdeps/s390/s390-32/memset.S                  |  4 ++--
ce426f
 sysdeps/s390/s390-32/multiarch/ifunc-resolve.c | 16 ++++++++--------
ce426f
 sysdeps/s390/s390-32/multiarch/memcmp.S        | 12 ++++++------
ce426f
 sysdeps/s390/s390-32/multiarch/memcpy.S        | 14 +++++++-------
ce426f
 sysdeps/s390/s390-32/multiarch/memset.S        | 18 +++++++++---------
ce426f
 sysdeps/s390/s390-64/memcmp.S                  |  4 ++--
ce426f
 sysdeps/s390/s390-64/memcpy.S                  | 10 +++++-----
ce426f
 sysdeps/s390/s390-64/memset.S                  |  4 ++--
ce426f
 sysdeps/s390/s390-64/multiarch/ifunc-resolve.c | 18 +++++++++---------
ce426f
 sysdeps/s390/s390-64/multiarch/memcmp.S        | 12 ++++++------
ce426f
 sysdeps/s390/s390-64/multiarch/memcpy.S        | 14 +++++++-------
ce426f
 sysdeps/s390/s390-64/multiarch/memset.S        | 18 +++++++++---------
ce426f
 14 files changed, 79 insertions(+), 79 deletions(-)
ce426f
ce426f
diff --git a/sysdeps/s390/s390-32/memcmp.S b/sysdeps/s390/s390-32/memcmp.S
ce426f
index 9ff84a3..b6eabe5 100644
ce426f
--- a/sysdeps/s390/s390-32/memcmp.S
ce426f
+++ b/sysdeps/s390/s390-32/memcmp.S
ce426f
@@ -27,7 +27,7 @@
ce426f
 
ce426f
        .text
ce426f
 #ifdef USE_MULTIARCH
ce426f
-ENTRY(memcmp_g5)
ce426f
+ENTRY(__memcmp_g5)
ce426f
 #else
ce426f
 ENTRY(memcmp)
ce426f
 #endif
ce426f
@@ -58,7 +58,7 @@ ENTRY(memcmp)
ce426f
 .L_G5_17:
ce426f
         clc     0(1,%r3),0(%r2)
ce426f
 #ifdef USE_MULTIARCH
ce426f
-END(memcmp_g5)
ce426f
+END(__memcmp_g5)
ce426f
 #else
ce426f
 END(memcmp)
ce426f
 libc_hidden_builtin_def (memcmp)
ce426f
diff --git a/sysdeps/s390/s390-32/memcpy.S b/sysdeps/s390/s390-32/memcpy.S
ce426f
index 90cc4cb..a3b1ace 100644
ce426f
--- a/sysdeps/s390/s390-32/memcpy.S
ce426f
+++ b/sysdeps/s390/s390-32/memcpy.S
ce426f
@@ -26,7 +26,7 @@
ce426f
      %r4 = number of bytes to copy.  */
ce426f
 
ce426f
 #ifdef USE_MULTIARCH
ce426f
-ENTRY(memcpy_g5)
ce426f
+ENTRY(__memcpy_g5)
ce426f
 #else
ce426f
 ENTRY(memcpy)
ce426f
 #endif
ce426f
@@ -49,7 +49,7 @@ ENTRY(memcpy)
ce426f
         br      %r14
ce426f
 .L_G5_13:
ce426f
         chi	%r5,4096             # Switch to mvcle for copies >1MB
ce426f
-        jh	memcpy_mvcle
ce426f
+        jh	__memcpy_mvcle
ce426f
 .L_G5_12:
ce426f
         mvc     0(256,%r1),0(%r3)
ce426f
         la      %r1,256(%r1)
ce426f
@@ -60,13 +60,13 @@ ENTRY(memcpy)
ce426f
 .L_G5_17:
ce426f
         mvc     0(1,%r1),0(%r3)
ce426f
 #ifdef USE_MULTIARCH
ce426f
-END(memcpy_g5)
ce426f
+END(__memcpy_g5)
ce426f
 #else
ce426f
 END(memcpy)
ce426f
 libc_hidden_builtin_def (memcpy)
ce426f
 #endif
ce426f
 
ce426f
-ENTRY(memcpy_mvcle)
ce426f
+ENTRY(__memcpy_mvcle)
ce426f
        # Using as standalone function will result in unexpected
ce426f
        # results since the length field is incremented by 1 in order to
ce426f
        # compensate the changes already done in the functions above.
ce426f
@@ -79,4 +79,4 @@ ENTRY(memcpy_mvcle)
ce426f
        jo      .L_MVCLE_1
ce426f
        lr      %r2,%r1             # return destination address
ce426f
        br      %r14
ce426f
-END(memcpy_mvcle)
ce426f
+END(__memcpy_mvcle)
ce426f
diff --git a/sysdeps/s390/s390-32/memset.S b/sysdeps/s390/s390-32/memset.S
ce426f
index 31a70f0..a73dc6c 100644
ce426f
--- a/sysdeps/s390/s390-32/memset.S
ce426f
+++ b/sysdeps/s390/s390-32/memset.S
ce426f
@@ -28,7 +28,7 @@
ce426f
        .text
ce426f
 
ce426f
 #ifdef USE_MULTIARCH
ce426f
-ENTRY(memset_g5)
ce426f
+ENTRY(__memset_g5)
ce426f
 #else
ce426f
 ENTRY(memset)
ce426f
 #endif
ce426f
@@ -58,7 +58,7 @@ ENTRY(memset)
ce426f
 .L_G5_20:
ce426f
         mvc     1(1,%r1),0(%r1)
ce426f
 #ifdef USE_MULTIARCH
ce426f
-END(memset_g5)
ce426f
+END(__memset_g5)
ce426f
 #else
ce426f
 END(memset)
ce426f
 libc_hidden_builtin_def (memset)
ce426f
diff --git a/sysdeps/s390/s390-32/multiarch/ifunc-resolve.c b/sysdeps/s390/s390-32/multiarch/ifunc-resolve.c
ce426f
index 42ca8da..522c63c 100644
ce426f
--- a/sysdeps/s390/s390-32/multiarch/ifunc-resolve.c
ce426f
+++ b/sysdeps/s390/s390-32/multiarch/ifunc-resolve.c
ce426f
@@ -28,17 +28,17 @@
ce426f
 #define IFUNC_RESOLVE(FUNC)						\
ce426f
   asm (".globl " #FUNC "\n\t"						\
ce426f
        ".type  " #FUNC ",@gnu_indirect_function\n\t"			\
ce426f
-       ".set   " #FUNC ",resolve_" #FUNC "\n\t"				\
ce426f
+       ".set   " #FUNC ",__resolve_" #FUNC "\n\t"			\
ce426f
        ".globl __GI_" #FUNC "\n\t"					\
ce426f
        ".set   __GI_" #FUNC "," #FUNC "\n");				\
ce426f
 									\
ce426f
   /* Make the declarations of the optimized functions hidden in order
ce426f
      to prevent GOT slots being generated for them. */			\
ce426f
-  extern void *FUNC##_z196 attribute_hidden;				\
ce426f
-  extern void *FUNC##_z10 attribute_hidden;				\
ce426f
-  extern void *FUNC##_g5 attribute_hidden;				\
ce426f
+  extern void *__##FUNC##_z196 attribute_hidden;			\
ce426f
+  extern void *__##FUNC##_z10 attribute_hidden;				\
ce426f
+  extern void *__##FUNC##_g5 attribute_hidden;				\
ce426f
 									\
ce426f
-  void *resolve_##FUNC (unsigned long int dl_hwcap)			\
ce426f
+  void *__resolve_##FUNC (unsigned long int dl_hwcap)			\
ce426f
   {									\
ce426f
     if ((dl_hwcap & HWCAP_S390_STFLE)					\
ce426f
 	&& (dl_hwcap & HWCAP_S390_ZARCH)				\
ce426f
@@ -53,11 +53,11 @@
ce426f
 		     : : "cc");						\
ce426f
 									\
ce426f
 	if ((stfle_bits & (1ULL << (63 - STFLE_BITS_Z196))) != 0)	\
ce426f
-	  return &FUNC##_z196;						\
ce426f
+	  return &__##FUNC##_z196;					\
ce426f
 	else if ((stfle_bits & (1ULL << (63 - STFLE_BITS_Z10))) != 0)	\
ce426f
-	  return &FUNC##_z10;						\
ce426f
+	  return &__##FUNC##_z10;					\
ce426f
       }									\
ce426f
-    return &FUNC##_g5;							\
ce426f
+    return &__##FUNC##_g5;						\
ce426f
   }
ce426f
 
ce426f
 IFUNC_RESOLVE(memset)
ce426f
diff --git a/sysdeps/s390/s390-32/multiarch/memcmp.S b/sysdeps/s390/s390-32/multiarch/memcmp.S
ce426f
index 9ca8891..c654d19 100644
ce426f
--- a/sysdeps/s390/s390-32/multiarch/memcmp.S
ce426f
+++ b/sysdeps/s390/s390-32/multiarch/memcmp.S
ce426f
@@ -29,7 +29,7 @@
ce426f
 
ce426f
 #ifndef NOT_IN_libc
ce426f
 
ce426f
-ENTRY(memcmp_z196)
ce426f
+ENTRY(__memcmp_z196)
ce426f
 	.machine "z196"
ce426f
 	.machinemode "zarch_nohighgprs"
ce426f
         ltr     %r4,%r4
ce426f
@@ -61,9 +61,9 @@ ENTRY(memcmp_z196)
ce426f
         br      %r14
ce426f
 .L_Z196_14:
ce426f
         clc     0(1,%r3),0(%r2)
ce426f
-END(memcmp_z196)
ce426f
+END(__memcmp_z196)
ce426f
 
ce426f
-ENTRY(memcmp_z10)
ce426f
+ENTRY(__memcmp_z10)
ce426f
 	.machine "z10"
ce426f
 	.machinemode "zarch_nohighgprs"
ce426f
         ltr     %r4,%r4
ce426f
@@ -90,7 +90,7 @@ ENTRY(memcmp_z10)
ce426f
         j       .L_Z10_3
ce426f
 .L_Z10_15:
ce426f
         clc     0(1,%r3),0(%r2)
ce426f
-END(memcmp_z10)
ce426f
+END(__memcmp_z10)
ce426f
 
ce426f
 #endif
ce426f
 
ce426f
@@ -98,7 +98,7 @@ END(memcmp_z10)
ce426f
 
ce426f
 #ifdef NOT_IN_libc
ce426f
 .globl   memcmp
ce426f
-.set     memcmp,memcmp_g5
ce426f
+.set     memcmp,__memcmp_g5
ce426f
 .weak    bcmp
ce426f
-.set	 bcmp,memcmp_g5
ce426f
+.set	 bcmp,__memcmp_g5
ce426f
 #endif
ce426f
diff --git a/sysdeps/s390/s390-32/multiarch/memcpy.S b/sysdeps/s390/s390-32/multiarch/memcpy.S
ce426f
index 7b85602..5c2113f 100644
ce426f
--- a/sysdeps/s390/s390-32/multiarch/memcpy.S
ce426f
+++ b/sysdeps/s390/s390-32/multiarch/memcpy.S
ce426f
@@ -29,7 +29,7 @@
ce426f
 
ce426f
 #if defined SHARED && !defined NOT_IN_libc
ce426f
 
ce426f
-ENTRY(memcpy_z196)
ce426f
+ENTRY(__memcpy_z196)
ce426f
 	.machine "z196"
ce426f
 	.machinemode "zarch_nohighgprs"
ce426f
         llgfr   %r4,%r4
ce426f
@@ -46,7 +46,7 @@ ENTRY(memcpy_z196)
ce426f
         br      %r14
ce426f
 .L_Z196_5:
ce426f
         cgfi    %r5,262144      # Switch to mvcle for copies >64MB
ce426f
-        jh      memcpy_mvcle
ce426f
+        jh      __memcpy_mvcle
ce426f
 .L_Z196_2:
ce426f
         pfd     1,768(%r3)
ce426f
         pfd     2,768(%r1)
ce426f
@@ -58,9 +58,9 @@ ENTRY(memcpy_z196)
ce426f
         j       .L_Z196_3
ce426f
 .L_Z196_14:
ce426f
         mvc     0(1,%r1),0(%r3)
ce426f
-END(memcpy_z196)
ce426f
+END(__memcpy_z196)
ce426f
 
ce426f
-ENTRY(memcpy_z10)
ce426f
+ENTRY(__memcpy_z10)
ce426f
 	.machine "z10"
ce426f
 	.machinemode "zarch_nohighgprs"
ce426f
         llgfr   %r4,%r4
ce426f
@@ -75,7 +75,7 @@ ENTRY(memcpy_z10)
ce426f
         br      %r14
ce426f
 .L_Z10_13:
ce426f
         cgfi    %r5,65535	# Switch to mvcle for copies >16MB
ce426f
-        jh      memcpy_mvcle
ce426f
+        jh      __memcpy_mvcle
ce426f
 .L_Z10_12:
ce426f
         pfd     1,768(%r3)
ce426f
         pfd     2,768(%r1)
ce426f
@@ -86,7 +86,7 @@ ENTRY(memcpy_z10)
ce426f
         j       .L_Z10_3
ce426f
 .L_Z10_15:
ce426f
         mvc     0(1,%r1),0(%r3)
ce426f
-END(memcpy_z10)
ce426f
+END(__memcpy_z10)
ce426f
 
ce426f
 #endif
ce426f
 
ce426f
@@ -94,5 +94,5 @@ END(memcpy_z10)
ce426f
 
ce426f
 #if !defined SHARED || defined NOT_IN_libc
ce426f
 .globl   memcpy
ce426f
-.set     memcpy,memcpy_g5
ce426f
+.set     memcpy,__memcpy_g5
ce426f
 #endif
ce426f
diff --git a/sysdeps/s390/s390-32/multiarch/memset.S b/sysdeps/s390/s390-32/multiarch/memset.S
ce426f
index ba43d67..54aa028 100644
ce426f
--- a/sysdeps/s390/s390-32/multiarch/memset.S
ce426f
+++ b/sysdeps/s390/s390-32/multiarch/memset.S
ce426f
@@ -29,7 +29,7 @@
ce426f
 
ce426f
 #ifndef NOT_IN_libc
ce426f
 
ce426f
-ENTRY(memset_z196)
ce426f
+ENTRY(__memset_z196)
ce426f
 	.machine "z196"
ce426f
 	.machinemode "zarch_nohighgprs"
ce426f
         llgfr   %r4,%r4
ce426f
@@ -49,7 +49,7 @@ ENTRY(memset_z196)
ce426f
         br      %r14
ce426f
 .L_Z196_1:
ce426f
 	cgfi	%r5,1048576
ce426f
-	jh	memset_mvcle	   # Switch to mvcle for >256MB
ce426f
+	jh	__memset_mvcle	   # Switch to mvcle for >256MB
ce426f
 .L_Z196_2:
ce426f
         pfd     2,1024(%r1)
ce426f
         mvc     1(256,%r1),0(%r1)
ce426f
@@ -59,9 +59,9 @@ ENTRY(memset_z196)
ce426f
         j       .L_Z196_3
ce426f
 .L_Z196_17:
ce426f
         mvc     1(1,%r1),0(%r1)
ce426f
-END(memset_z196)
ce426f
+END(__memset_z196)
ce426f
 
ce426f
-ENTRY(memset_z10)
ce426f
+ENTRY(__memset_z10)
ce426f
 	.machine "z10"
ce426f
 	.machinemode "zarch_nohighgprs"
ce426f
         llgfr   %r4,%r4
ce426f
@@ -78,7 +78,7 @@ ENTRY(memset_z10)
ce426f
         br      %r14
ce426f
 .L_Z10_15:
ce426f
 	cgfi	%r5,163840          # Switch to mvcle for >40MB
ce426f
-	jh	memset_mvcle
ce426f
+	jh	__memset_mvcle
ce426f
 .L_Z10_14:
ce426f
         pfd     2,1024(%r1)
ce426f
         mvc     1(256,%r1),0(%r1)
ce426f
@@ -87,9 +87,9 @@ ENTRY(memset_z10)
ce426f
         j       .L_Z10_3
ce426f
 .L_Z10_18:
ce426f
         mvc     1(1,%r1),0(%r1)
ce426f
-END(memset_z10)
ce426f
+END(__memset_z10)
ce426f
 
ce426f
-ENTRY(memset_mvcle)
ce426f
+ENTRY(__memset_mvcle)
ce426f
 	ahi	%r4,2               # take back the change done by the caller
ce426f
 	lr      %r0,%r2             # save source address
ce426f
 	lr      %r1,%r3             # move pad byte to R1
ce426f
@@ -101,7 +101,7 @@ ENTRY(memset_mvcle)
ce426f
 	lr      %r2,%r0             # return value is source address
ce426f
 .L1:
ce426f
 	br      %r14
ce426f
-END(memset_mvcle)
ce426f
+END(__memset_mvcle)
ce426f
 
ce426f
 #endif
ce426f
 
ce426f
@@ -109,5 +109,5 @@ END(memset_mvcle)
ce426f
 
ce426f
 #ifdef NOT_IN_libc
ce426f
 .globl   memset
ce426f
-.set     memset,memset_g5
ce426f
+.set     memset,__memset_g5
ce426f
 #endif
ce426f
diff --git a/sysdeps/s390/s390-64/memcmp.S b/sysdeps/s390/s390-64/memcmp.S
ce426f
index 1b43440..eb5370f 100644
ce426f
--- a/sysdeps/s390/s390-64/memcmp.S
ce426f
+++ b/sysdeps/s390/s390-64/memcmp.S
ce426f
@@ -27,7 +27,7 @@
ce426f
 
ce426f
        .text
ce426f
 #ifdef USE_MULTIARCH
ce426f
-ENTRY(memcmp_z900)
ce426f
+ENTRY(__memcmp_z900)
ce426f
 #else
ce426f
 ENTRY(memcmp)
ce426f
 #endif
ce426f
@@ -56,7 +56,7 @@ ENTRY(memcmp)
ce426f
 .L_Z900_15:
ce426f
         clc     0(1,%r3),0(%r2)
ce426f
 #ifdef USE_MULTIARCH
ce426f
-END(memcmp_z900)
ce426f
+END(__memcmp_z900)
ce426f
 #else
ce426f
 END(memcmp)
ce426f
 libc_hidden_builtin_def (memcmp)
ce426f
diff --git a/sysdeps/s390/s390-64/memcpy.S b/sysdeps/s390/s390-64/memcpy.S
ce426f
index bae8836..61fca0b 100644
ce426f
--- a/sysdeps/s390/s390-64/memcpy.S
ce426f
+++ b/sysdeps/s390/s390-64/memcpy.S
ce426f
@@ -29,7 +29,7 @@
ce426f
        .text
ce426f
 
ce426f
 #ifdef USE_MULTIARCH
ce426f
-ENTRY(memcpy_z900)
ce426f
+ENTRY(__memcpy_z900)
ce426f
 #else
ce426f
 ENTRY(memcpy)
ce426f
 #endif
ce426f
@@ -48,7 +48,7 @@ ENTRY(memcpy)
ce426f
         br      %r14
ce426f
 .L_Z900_13:
ce426f
         chi	%r5,4096             # Switch to mvcle for copies >1MB
ce426f
-        jh      memcpy_mvcle
ce426f
+        jh      __memcpy_mvcle
ce426f
 .L_Z900_12:
ce426f
         mvc     0(256,%r1),0(%r3)
ce426f
         la      %r1,256(%r1)
ce426f
@@ -59,13 +59,13 @@ ENTRY(memcpy)
ce426f
         mvc     0(1,%r1),0(%r3)
ce426f
 
ce426f
 #ifdef USE_MULTIARCH
ce426f
-END(memcpy_z900)
ce426f
+END(__memcpy_z900)
ce426f
 #else
ce426f
 END(memcpy)
ce426f
 libc_hidden_builtin_def (memcpy)
ce426f
 #endif
ce426f
 
ce426f
-ENTRY(memcpy_mvcle)
ce426f
+ENTRY(__memcpy_mvcle)
ce426f
        # Using as standalone function will result in unexpected
ce426f
        # results since the length field is incremented by 1 in order to
ce426f
        # compensate the changes already done in the functions above.
ce426f
@@ -78,4 +78,4 @@ ENTRY(memcpy_mvcle)
ce426f
        jo      .L_MVCLE_1
ce426f
        lgr     %r2,%r1             # return destination address
ce426f
        br      %r14
ce426f
-END(memcpy_mvcle)
ce426f
+END(__memcpy_mvcle)
ce426f
diff --git a/sysdeps/s390/s390-64/memset.S b/sysdeps/s390/s390-64/memset.S
ce426f
index 4edfb4e..8185e94 100644
ce426f
--- a/sysdeps/s390/s390-64/memset.S
ce426f
+++ b/sysdeps/s390/s390-64/memset.S
ce426f
@@ -29,7 +29,7 @@
ce426f
        .text
ce426f
 
ce426f
 #ifdef USE_MULTIARCH
ce426f
-ENTRY(memset_z900)
ce426f
+ENTRY(__memset_z900)
ce426f
 #else
ce426f
 ENTRY(memset)
ce426f
 #endif
ce426f
@@ -57,7 +57,7 @@ ENTRY(memset)
ce426f
 .L_Z900_18:
ce426f
         mvc     1(1,%r1),0(%r1)
ce426f
 #ifdef USE_MULTIARCH
ce426f
-END(memset_z900)
ce426f
+END(__memset_z900)
ce426f
 #else
ce426f
 END(memset)
ce426f
 libc_hidden_builtin_def (memset)
ce426f
diff --git a/sysdeps/s390/s390-64/multiarch/ifunc-resolve.c b/sysdeps/s390/s390-64/multiarch/ifunc-resolve.c
ce426f
index 8db2c38..b6be970 100644
ce426f
--- a/sysdeps/s390/s390-64/multiarch/ifunc-resolve.c
ce426f
+++ b/sysdeps/s390/s390-64/multiarch/ifunc-resolve.c
ce426f
@@ -28,17 +28,17 @@
ce426f
 #define IFUNC_RESOLVE(FUNC)						\
ce426f
   asm (".globl " #FUNC "\n\t"						\
ce426f
        ".type  " #FUNC ",@gnu_indirect_function\n\t"			\
ce426f
-       ".set   " #FUNC ",resolve_" #FUNC "\n\t"				\
ce426f
+       ".set   " #FUNC ",__resolve_" #FUNC "\n\t"			\
ce426f
        ".globl __GI_" #FUNC "\n\t"					\
ce426f
        ".set   __GI_" #FUNC "," #FUNC "\n");				\
ce426f
 									\
ce426f
   /* Make the declarations of the optimized functions hidden in order
ce426f
      to prevent GOT slots being generated for them. */			\
ce426f
-  extern void *FUNC##_z196 attribute_hidden;				\
ce426f
-  extern void *FUNC##_z10 attribute_hidden;				\
ce426f
-  extern void *FUNC##_z900 attribute_hidden;				\
ce426f
+  extern void *__##FUNC##_z196 attribute_hidden;			\
ce426f
+  extern void *__##FUNC##_z10 attribute_hidden;				\
ce426f
+  extern void *__##FUNC##_z900 attribute_hidden;			\
ce426f
 									\
ce426f
-  void *resolve_##FUNC (unsigned long int dl_hwcap)			\
ce426f
+  void *__resolve_##FUNC (unsigned long int dl_hwcap)			\
ce426f
   {									\
ce426f
     if (dl_hwcap & HWCAP_S390_STFLE)					\
ce426f
       {									\
ce426f
@@ -54,14 +54,14 @@
ce426f
 		     : : "cc");						\
ce426f
 									\
ce426f
 	if ((stfle_bits & (1UL << (63 - STFLE_BITS_Z196))) != 0)	\
ce426f
-	  return &FUNC##_z196;						\
ce426f
+	  return &__##FUNC##_z196;					\
ce426f
 	else if ((stfle_bits & (1UL << (63 - STFLE_BITS_Z10))) != 0)	\
ce426f
-	  return &FUNC##_z10;						\
ce426f
+	  return &__##FUNC##_z10;					\
ce426f
 	else								\
ce426f
-	  return &FUNC##_z900;						\
ce426f
+	  return &__##FUNC##_z900;					\
ce426f
       }									\
ce426f
     else								\
ce426f
-      return &FUNC##_z900;						\
ce426f
+      return &__##FUNC##_z900;						\
ce426f
   }
ce426f
 
ce426f
 IFUNC_RESOLVE(memset)
ce426f
diff --git a/sysdeps/s390/s390-64/multiarch/memcmp.S b/sysdeps/s390/s390-64/multiarch/memcmp.S
ce426f
index f40a3c1..9a8cba8 100644
ce426f
--- a/sysdeps/s390/s390-64/multiarch/memcmp.S
ce426f
+++ b/sysdeps/s390/s390-64/multiarch/memcmp.S
ce426f
@@ -29,7 +29,7 @@
ce426f
 
ce426f
 #ifndef NOT_IN_libc
ce426f
 
ce426f
-ENTRY(memcmp_z196)
ce426f
+ENTRY(__memcmp_z196)
ce426f
 	.machine "z196"
ce426f
         ltgr    %r4,%r4
ce426f
         je      .L_Z196_4
ce426f
@@ -60,9 +60,9 @@ ENTRY(memcmp_z196)
ce426f
         br      %r14
ce426f
 .L_Z196_14:
ce426f
         clc     0(1,%r3),0(%r2)
ce426f
-END(memcmp_z196)
ce426f
+END(__memcmp_z196)
ce426f
 
ce426f
-ENTRY(memcmp_z10)
ce426f
+ENTRY(__memcmp_z10)
ce426f
 	.machine "z10"
ce426f
         ltgr    %r4,%r4
ce426f
         je      .L_Z10_4
ce426f
@@ -87,7 +87,7 @@ ENTRY(memcmp_z10)
ce426f
         j       .L_Z10_3
ce426f
 .L_Z10_15:
ce426f
         clc     0(1,%r3),0(%r2)
ce426f
-END(memcmp_z10)
ce426f
+END(__memcmp_z10)
ce426f
 
ce426f
 #endif
ce426f
 
ce426f
@@ -95,7 +95,7 @@ END(memcmp_z10)
ce426f
 
ce426f
 #ifdef NOT_IN_libc
ce426f
 .globl   memcmp
ce426f
-.set     memcmp,memcmp_z900
ce426f
+.set     memcmp,__memcmp_z900
ce426f
 .weak    bcmp
ce426f
-.set	 bcmp,memcmp_z900
ce426f
+.set	 bcmp,__memcmp_z900
ce426f
 #endif
ce426f
diff --git a/sysdeps/s390/s390-64/multiarch/memcpy.S b/sysdeps/s390/s390-64/multiarch/memcpy.S
ce426f
index b00ffc1..525588f 100644
ce426f
--- a/sysdeps/s390/s390-64/multiarch/memcpy.S
ce426f
+++ b/sysdeps/s390/s390-64/multiarch/memcpy.S
ce426f
@@ -29,7 +29,7 @@
ce426f
 
ce426f
 #if defined SHARED && !defined NOT_IN_libc
ce426f
 
ce426f
-ENTRY(memcpy_z196)
ce426f
+ENTRY(__memcpy_z196)
ce426f
         .machine "z196"
ce426f
         ltgr    %r4,%r4
ce426f
         je      .L_Z196_4
ce426f
@@ -44,7 +44,7 @@ ENTRY(memcpy_z196)
ce426f
         br      %r14
ce426f
 .L_Z196_5:
ce426f
         cgfi    %r5,262144      # Switch to mvcle for copies >64MB
ce426f
-        jh      memcpy_mvcle
ce426f
+        jh      __memcpy_mvcle
ce426f
 .L_Z196_2:
ce426f
         pfd     1,768(%r3)
ce426f
         pfd     2,768(%r1)
ce426f
@@ -56,9 +56,9 @@ ENTRY(memcpy_z196)
ce426f
         j       .L_Z196_3
ce426f
 .L_Z196_14:
ce426f
         mvc     0(1,%r1),0(%r3)
ce426f
-END(memcpy_z196)
ce426f
+END(__memcpy_z196)
ce426f
 
ce426f
-ENTRY(memcpy_z10)
ce426f
+ENTRY(__memcpy_z10)
ce426f
 	.machine "z10"
ce426f
         cgije   %r4,0,.L_Z10_4
ce426f
         aghi    %r4,-1
ce426f
@@ -71,7 +71,7 @@ ENTRY(memcpy_z10)
ce426f
         br      %r14
ce426f
 .L_Z10_13:
ce426f
         cgfi    %r5,65535	# Switch to mvcle for copies >16MB
ce426f
-        jh      memcpy_mvcle
ce426f
+        jh      __memcpy_mvcle
ce426f
 .L_Z10_12:
ce426f
         pfd     1,768(%r3)
ce426f
         pfd     2,768(%r1)
ce426f
@@ -82,7 +82,7 @@ ENTRY(memcpy_z10)
ce426f
         j       .L_Z10_3
ce426f
 .L_Z10_15:
ce426f
         mvc     0(1,%r1),0(%r3)
ce426f
-END(memcpy_z10)
ce426f
+END(__memcpy_z10)
ce426f
 
ce426f
 #endif
ce426f
 
ce426f
@@ -90,5 +90,5 @@ END(memcpy_z10)
ce426f
 
ce426f
 #if !defined SHARED || defined NOT_IN_libc
ce426f
 .globl   memcpy
ce426f
-.set     memcpy,memcpy_z900
ce426f
+.set     memcpy,__memcpy_z900
ce426f
 #endif
ce426f
diff --git a/sysdeps/s390/s390-64/multiarch/memset.S b/sysdeps/s390/s390-64/multiarch/memset.S
ce426f
index 1f9064d..8dbb3cb 100644
ce426f
--- a/sysdeps/s390/s390-64/multiarch/memset.S
ce426f
+++ b/sysdeps/s390/s390-64/multiarch/memset.S
ce426f
@@ -29,7 +29,7 @@
ce426f
 
ce426f
 #ifndef NOT_IN_libc
ce426f
 
ce426f
-ENTRY(memset_z196)
ce426f
+ENTRY(__memset_z196)
ce426f
 	.machine "z196"
ce426f
         ltgr    %r4,%r4
ce426f
         je      .L_Z196_4
ce426f
@@ -47,7 +47,7 @@ ENTRY(memset_z196)
ce426f
         br      %r14
ce426f
 .L_Z196_1:
ce426f
 	cgfi	%r5,1048576
ce426f
-	jh	memset_mvcle	   # Switch to mvcle for >256MB
ce426f
+	jh	__memset_mvcle	   # Switch to mvcle for >256MB
ce426f
 .L_Z196_2:
ce426f
         pfd     2,1024(%r1)
ce426f
         mvc     1(256,%r1),0(%r1)
ce426f
@@ -57,9 +57,9 @@ ENTRY(memset_z196)
ce426f
         j       .L_Z196_3
ce426f
 .L_Z196_17:
ce426f
         mvc     1(1,%r1),0(%r1)
ce426f
-END(memset_z196)
ce426f
+END(__memset_z196)
ce426f
 
ce426f
-ENTRY(memset_z10)
ce426f
+ENTRY(__memset_z10)
ce426f
 	.machine "z10"
ce426f
         cgije   %r4,0,.L_Z10_4
ce426f
         stc     %r3,0(%r2)
ce426f
@@ -74,7 +74,7 @@ ENTRY(memset_z10)
ce426f
         br      %r14
ce426f
 .L_Z10_15:
ce426f
 	cgfi	%r5,163840          # Switch to mvcle for >40MB
ce426f
-	jh	memset_mvcle
ce426f
+	jh	__memset_mvcle
ce426f
 .L_Z10_14:
ce426f
         pfd     2,1024(%r1)
ce426f
         mvc     1(256,%r1),0(%r1)
ce426f
@@ -83,9 +83,9 @@ ENTRY(memset_z10)
ce426f
         j       .L_Z10_3
ce426f
 .L_Z10_18:
ce426f
         mvc     1(1,%r1),0(%r1)
ce426f
-END(memset_z10)
ce426f
+END(__memset_z10)
ce426f
 
ce426f
-ENTRY(memset_mvcle)
ce426f
+ENTRY(__memset_mvcle)
ce426f
 	aghi	%r4,2               # take back the change done by the caller
ce426f
 	lgr	%r0,%r2		    # save source address
ce426f
 	lgr	%r1,%r3		    # move pad byte to R1
ce426f
@@ -97,7 +97,7 @@ ENTRY(memset_mvcle)
ce426f
 	lgr	%r2,%r0		    # return value is source address
ce426f
 .L1:
ce426f
 	br	%r14
ce426f
-END(memset_mvcle)
ce426f
+END(__memset_mvcle)
ce426f
 
ce426f
 #endif
ce426f
 
ce426f
@@ -105,5 +105,5 @@ END(memset_mvcle)
ce426f
 
ce426f
 #ifdef NOT_IN_libc
ce426f
 .globl   memset
ce426f
-.set     memset,memset_z900
ce426f
+.set     memset,__memset_z900
ce426f
 #endif
ce426f
-- 
ce426f
2.3.0
ce426f