PowerPC: Fix bzero definition for static libc for PPC32
Commit Message
This patch fixes an issue for powerpc32 static build where __bzero
is not defined. This patch adds an IFUNC implementation for the symbol
in static build and correct a wrong calling for a non-existing
__memset_ppc in default __bzero_ppc.
Fixes BZ#16689 and this patch is against the previous to fix bzero for PPC64
https://sourceware.org/ml/libc-alpha/2014-03/msg00211.html. If no one opposes
I will push it tomorrow.
Tested on powerpc32-fpu build with --with-cpu=power4 and --with-cpu=power7.
--
2014-03-11 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
[BZ #16689]
* sysdeps/powerpc/powerpc32/power4/multiarch/bzero-ppc32.S
(__bzero_ppc): Call memset@local instead of __memset_ppc@local.
Define it for static builds as well.
* sysdeps/powerpc/powerpc32/power4/multiarch/bzero.c: Build IFUNC
selector for static builds.
---
@@ -10,7 +10,7 @@ Version 2.20
* The following bugs are resolved with this release:
15347, 15804, 15894, 16447, 16532, 16545, 16574, 16600, 16609, 16610,
- 16611, 16613, 16623, 16632, 16639, 16670, 16674, 16683.
+ 16611, 16613, 16623, 16632, 16639, 16670, 16674, 16683, 16689.
* The am33 port, which had not worked for several years, has been removed
from ports.
@@ -22,5 +22,5 @@
ENTRY (__bzero_ppc)
mr r5,r4
li r4,0
- b __memset_ppc@local
+ b memset@local
END (__bzero_ppc)
@@ -17,7 +17,7 @@
<http://www.gnu.org/licenses/>. */
/* Define multiple versions only for definition in libc. */
-#if defined SHARED && !defined NOT_IN_libc
+#ifndef NOT_IN_libc
# include <string.h>
# include <strings.h>
# include "init-arch.h"