]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
powerpc: Remove duplicate strchrnul and strncasecmp_l libc.a (BZ 31786)
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 22 May 2024 14:32:04 +0000 (11:32 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 23 May 2024 12:36:08 +0000 (09:36 -0300)
For powerpc64 the generic version provides a weak definition of
strchrnul, which are already provided by the ifunc resolver.  The
powerpc32 version is slight different, where for static case there
is no iFUNC support.

The strncasecmp_l is provided ifunc resolver.

Checked on powerpc-linux-gnu-power4 and powerpc64-linux-gnu.
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
sysdeps/powerpc/powerpc64/multiarch/strchrnul-power7.S
sysdeps/powerpc/powerpc64/multiarch/strchrnul-ppc64.c
sysdeps/powerpc/powerpc64/multiarch/strncase_l-power7.c

index 384edce8b948fbca91de2c7b6f2bacaba2ae3610..fc784c28566a3f8e2ea11a1a7fba6302f55af5a0 100644 (file)
@@ -18,6 +18,9 @@
 
 #define STRCHRNUL __strchrnul_power7
 
+#undef weak_alias
+#define weak_alias(a,b)
+
 #undef libc_hidden_builtin_def
 #define libc_hidden_builtin_def(name)
 
index 8e42504efe34720a3f0d044a27106ac28500edd8..712797225026189dbce930b4ddc7aef7ada0ce62 100644 (file)
    License along with the GNU C Library; if not, see
    <https://www.gnu.org/licenses/>.  */
 
-#include <sysdeps/powerpc/powerpc32/power4/multiarch/strchrnul-ppc32.c>
+#include <string.h>
+
+#if IS_IN (libc)
+# define STRCHRNUL  __strchrnul_ppc
+extern __typeof (strchrnul) __strchrnul_ppc attribute_hidden;
+
+# include <string/strchrnul.c>
+# undef __strchrnul
+weak_alias (__strchrnul_ppc, __strchrnul)
+# ifdef SHARED
+__hidden_ver1 (__strchrnul_ppc, __GI___strchrnul, __strchrnul_ppc);
+# endif
+#endif
index 1587079580087307dc90175b9440cd7b3fa57f96..664ce44345a382a776f28c10ff0ac24ed30eced0 100644 (file)
@@ -19,6 +19,9 @@
 
 #define __strncasecmp_l __strncasecmp_l_power7
 
+#undef weak_alias
+#define weak_alias(a,b)
+
 #undef libc_hidden_def
 #define libc_hidden_def(name)