summaryrefslogtreecommitdiff
path: root/sysdeps/powerpc/powerpc64/power8/strncpy.S
diff options
context:
space:
mode:
authorTulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>2016-05-30 18:00:57 -0300
committerTulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>2016-06-06 16:03:29 -0300
commitc24480ce3b5fed848243fc9642932ef2fa670109 (patch)
treebaa3e66991dd688df62c3b296016bb15d0ef1650 /sysdeps/powerpc/powerpc64/power8/strncpy.S
parentb5537473c2ccb6874985e3d2bc0a0c7e204213bd (diff)
downloadglibc-c24480ce3b5fed848243fc9642932ef2fa670109.tar.gz
powerpc: Fix --disable-multi-arch build on POWER8
Add missing symbols of stpncpy and strcasestr when multi-arch is disabled. Fix memset call from strncpy/stpncpy when multi-arch is disabled.
Diffstat (limited to 'sysdeps/powerpc/powerpc64/power8/strncpy.S')
-rw-r--r--sysdeps/powerpc/powerpc64/power8/strncpy.S16
1 files changed, 12 insertions, 4 deletions
diff --git a/sysdeps/powerpc/powerpc64/power8/strncpy.S b/sysdeps/powerpc/powerpc64/power8/strncpy.S
index 437edeb715..b7fae6d59a 100644
--- a/sysdeps/powerpc/powerpc64/power8/strncpy.S
+++ b/sysdeps/powerpc/powerpc64/power8/strncpy.S
@@ -24,6 +24,16 @@
# define FUNC_NAME strncpy
#endif
+#ifndef MEMSET
+/* For builds without IFUNC support, local calls should be made to internal
+ GLIBC symbol (created by libc_hidden_builtin_def). */
+# ifdef SHARED
+# define MEMSET __GI_memset
+# else
+# define MEMSET memset
+# endif
+#endif
+
#define FRAMESIZE (FRAME_MIN_SIZE+48)
/* Implements the function
@@ -223,7 +233,7 @@ L(zero_pad_start_1):
stdu r1,-FRAMESIZE(r1)
cfi_adjust_cfa_offset(FRAMESIZE)
- bl __memset_power8
+ bl MEMSET
nop
/* Restore the stack frame. */
@@ -442,8 +452,6 @@ L(zero_pad_start_prepare_1):
b L(zero_pad_start_1)
END (FUNC_NAME)
-#ifdef USE_AS_STPNCPY
-libc_hidden_def (__stpncpy)
-#else
+#ifndef USE_AS_STPNCPY
libc_hidden_builtin_def (strncpy)
#endif