[PATCH 20/20] alpha: add multiarch IFUNC dispatchers
Matt Turner
mattst88@gmail.com
Wed Aug 12 01:19:57 GMT 2026
Dispatch at runtime between the generic implementations and the
EV6/EV67-optimized ones for twelve functions:
memset: generic (EV4/EV5) vs EV6 assembly (dispatch on implver)
memcpy: generic (C) vs EV6 assembly (dispatch on implver)
memcmp: generic (C) vs EV6 assembly (dispatch on implver)
memmove: generic (C) vs EV6 assembly (dispatch on implver)
mempcpy: generic (C) vs EV6 assembly (dispatch on implver)
strlen: generic vs EV67 CIX assembly (dispatch on amask CIX)
stpcpy: generic vs EV67 CIX assembly
stpncpy: generic vs EV67 CIX assembly
strcat: generic vs EV67 CIX assembly
strchr: generic vs EV67 CIX assembly
rawmemchr: generic vs EV67 CIX assembly
strncat: generic vs EV67 CIX assembly
Each function gets a resolver in a .c file and two assembly wrappers
(_ev5/_ev6 or _ev5/_ev67) that include the original source with renamed
entry points. The mem* functions have no generic alpha assembly, so they
use C generic wrappers for EV4/EV5; the EV6 mempcpy wrapper includes
alphaev6/memcpy.S with USE_AS_MEMPCPY.
The internal aliases are defined in the dispatchers, against the redirected
type, so that calls from inside libc go through the IFUNC too. Defining
them in the _ev5 variants instead, as the assembly they include does, would
point __GI_strlen and the rest at the ev5 implementation and every caller
inside libc would get that one whatever the CPU.
string.h needs care in these files. It defines __mempcpy and __stpcpy as
macros calling the corresponding builtin and, in the static library,
redirects those builtins back to the __ names, which collides with the
redirection the multiarch files set up; they define __NO_STRING_INLINES and
NO_MEMPCPY_STPCPY_REDIRECT first, as the x86_64 and s390 versions do.
mempcpy_generic.c names its function by setting MEMPCPY rather than by
defining __mempcpy, which string/mempcpy.c undefines.
__memcmpeq is aliased to the IFUNC alongside memcmp and bcmp.
string/memcmp.c defines it as an alias of memcmp, but memcmp_generic.c
neutralizes strong_alias so that the generic implementation does not bring
the public names with it, and without the alias here the symbol would
disappear from libc: an ABI break, since it is in the abilist, and a link
failure for the tests that use it.
With --enable-multi-arch a single binary selects the implementation the
processor wants at load time.
memcmp_ev6.S turns off strong_alias and libc_hidden_def as well as weak_alias,
because the assembly it includes now defines the __memcmpeq alias and memcmp.c
defines it for the dispatcher; without this both land in libc_pic.a and the
link fails with a multiple definition of __memcmpeq.
---
sysdeps/alpha/multiarch/Makefile | 8 +++
.../alpha/multiarch/dl-symbol-redir-ifunc.h | 12 ++++
sysdeps/alpha/multiarch/ifunc-impl-list.c | 16 +++++
sysdeps/alpha/multiarch/memcmp.c | 60 ++++++++++++++++++
sysdeps/alpha/multiarch/memcmp_ev6.S | 41 ++++++++++++
sysdeps/alpha/multiarch/memcmp_generic.c | 35 +++++++++++
sysdeps/alpha/multiarch/memcpy.c | 49 +++++++++++++++
sysdeps/alpha/multiarch/memcpy_ev6.S | 32 ++++++++++
sysdeps/alpha/multiarch/memcpy_generic.c | 26 ++++++++
sysdeps/alpha/multiarch/memmove.c | 49 +++++++++++++++
sysdeps/alpha/multiarch/memmove_ev6.S | 32 ++++++++++
sysdeps/alpha/multiarch/memmove_generic.c | 26 ++++++++
sysdeps/alpha/multiarch/mempcpy.c | 61 ++++++++++++++++++
sysdeps/alpha/multiarch/mempcpy_ev6.S | 39 ++++++++++++
sysdeps/alpha/multiarch/mempcpy_generic.c | 39 ++++++++++++
sysdeps/alpha/multiarch/memset.c | 49 +++++++++++++++
sysdeps/alpha/multiarch/memset_ev5.S | 33 ++++++++++
sysdeps/alpha/multiarch/memset_ev6.S | 32 ++++++++++
sysdeps/alpha/multiarch/rawmemchr.c | 55 ++++++++++++++++
sysdeps/alpha/multiarch/rawmemchr_ev5.S | 36 +++++++++++
sysdeps/alpha/multiarch/rawmemchr_ev67.S | 35 +++++++++++
sysdeps/alpha/multiarch/stpcpy.c | 62 +++++++++++++++++++
sysdeps/alpha/multiarch/stpcpy_ev5.S | 39 ++++++++++++
sysdeps/alpha/multiarch/stpcpy_ev67.S | 38 ++++++++++++
sysdeps/alpha/multiarch/stpncpy.c | 55 ++++++++++++++++
sysdeps/alpha/multiarch/stpncpy_ev5.S | 36 +++++++++++
sysdeps/alpha/multiarch/stpncpy_ev67.S | 35 +++++++++++
sysdeps/alpha/multiarch/strcat.c | 49 +++++++++++++++
sysdeps/alpha/multiarch/strcat_ev5.S | 33 ++++++++++
sysdeps/alpha/multiarch/strcat_ev67.S | 32 ++++++++++
sysdeps/alpha/multiarch/strchr.c | 50 +++++++++++++++
sysdeps/alpha/multiarch/strchr_ev5.S | 36 +++++++++++
sysdeps/alpha/multiarch/strchr_ev67.S | 35 +++++++++++
sysdeps/alpha/multiarch/strlen.c | 49 +++++++++++++++
sysdeps/alpha/multiarch/strlen_ev5.S | 33 ++++++++++
sysdeps/alpha/multiarch/strlen_ev67.S | 32 ++++++++++
sysdeps/alpha/multiarch/strncat.c | 49 +++++++++++++++
sysdeps/alpha/multiarch/strncat_ev5.S | 30 +++++++++
sysdeps/alpha/multiarch/strncat_ev67.S | 29 +++++++++
39 files changed, 1487 insertions(+)
create mode 100644 sysdeps/alpha/multiarch/memcmp.c
create mode 100644 sysdeps/alpha/multiarch/memcmp_ev6.S
create mode 100644 sysdeps/alpha/multiarch/memcmp_generic.c
create mode 100644 sysdeps/alpha/multiarch/memcpy.c
create mode 100644 sysdeps/alpha/multiarch/memcpy_ev6.S
create mode 100644 sysdeps/alpha/multiarch/memcpy_generic.c
create mode 100644 sysdeps/alpha/multiarch/memmove.c
create mode 100644 sysdeps/alpha/multiarch/memmove_ev6.S
create mode 100644 sysdeps/alpha/multiarch/memmove_generic.c
create mode 100644 sysdeps/alpha/multiarch/mempcpy.c
create mode 100644 sysdeps/alpha/multiarch/mempcpy_ev6.S
create mode 100644 sysdeps/alpha/multiarch/mempcpy_generic.c
create mode 100644 sysdeps/alpha/multiarch/memset.c
create mode 100644 sysdeps/alpha/multiarch/memset_ev5.S
create mode 100644 sysdeps/alpha/multiarch/memset_ev6.S
create mode 100644 sysdeps/alpha/multiarch/rawmemchr.c
create mode 100644 sysdeps/alpha/multiarch/rawmemchr_ev5.S
create mode 100644 sysdeps/alpha/multiarch/rawmemchr_ev67.S
create mode 100644 sysdeps/alpha/multiarch/stpcpy.c
create mode 100644 sysdeps/alpha/multiarch/stpcpy_ev5.S
create mode 100644 sysdeps/alpha/multiarch/stpcpy_ev67.S
create mode 100644 sysdeps/alpha/multiarch/stpncpy.c
create mode 100644 sysdeps/alpha/multiarch/stpncpy_ev5.S
create mode 100644 sysdeps/alpha/multiarch/stpncpy_ev67.S
create mode 100644 sysdeps/alpha/multiarch/strcat.c
create mode 100644 sysdeps/alpha/multiarch/strcat_ev5.S
create mode 100644 sysdeps/alpha/multiarch/strcat_ev67.S
create mode 100644 sysdeps/alpha/multiarch/strchr.c
create mode 100644 sysdeps/alpha/multiarch/strchr_ev5.S
create mode 100644 sysdeps/alpha/multiarch/strchr_ev67.S
create mode 100644 sysdeps/alpha/multiarch/strlen.c
create mode 100644 sysdeps/alpha/multiarch/strlen_ev5.S
create mode 100644 sysdeps/alpha/multiarch/strlen_ev67.S
create mode 100644 sysdeps/alpha/multiarch/strncat.c
create mode 100644 sysdeps/alpha/multiarch/strncat_ev5.S
create mode 100644 sysdeps/alpha/multiarch/strncat_ev67.S
diff --git ./sysdeps/alpha/multiarch/Makefile ./sysdeps/alpha/multiarch/Makefile
index 87b08ec50d..09acc02716 100644
--- ./sysdeps/alpha/multiarch/Makefile
+++ ./sysdeps/alpha/multiarch/Makefile
@@ -1,5 +1,13 @@
ifeq ($(subdir),string)
sysdep_routines += \
+ memcmp_ev6 \
+ memcmp_generic \
+ memcpy_ev6 \
+ memcpy_generic \
+ memmove_ev6 \
+ memmove_generic \
+ mempcpy_ev6 \
+ mempcpy_generic \
memset_ev5 \
memset_ev6 \
rawmemchr_ev5 \
diff --git ./sysdeps/alpha/multiarch/dl-symbol-redir-ifunc.h ./sysdeps/alpha/multiarch/dl-symbol-redir-ifunc.h
index 9b7f1e258e..f15675748b 100644
--- ./sysdeps/alpha/multiarch/dl-symbol-redir-ifunc.h
+++ ./sysdeps/alpha/multiarch/dl-symbol-redir-ifunc.h
@@ -19,7 +19,19 @@
#ifndef _DL_IFUNC_GENERIC_H
#define _DL_IFUNC_GENERIC_H
+/* Only the static dynamic linker needs these. The shared one already has
+ its own copies of these functions, and redirecting them here would
+ refer to the multiarch variants, which are not linked into it. */
+#ifndef SHARED
+
+asm ("memcmp = __memcmp_generic");
+asm ("memcpy = __memcpy_generic");
+asm ("memmove = __memmove_generic");
+asm ("mempcpy = ___mempcpy_generic");
+asm ("__mempcpy = ___mempcpy_generic");
asm ("memset = __memset_ev5");
asm ("strlen = __strlen_ev5");
+#endif /* !SHARED */
+
#endif
diff --git ./sysdeps/alpha/multiarch/ifunc-impl-list.c ./sysdeps/alpha/multiarch/ifunc-impl-list.c
index cede63d975..2df1eaf413 100644
--- ./sysdeps/alpha/multiarch/ifunc-impl-list.c
+++ ./sysdeps/alpha/multiarch/ifunc-impl-list.c
@@ -28,6 +28,22 @@ __libc_ifunc_impl_list (const char *name, struct libc_ifunc_impl *array,
{
size_t i = max;
+ IFUNC_IMPL (i, name, memcmp,
+ IFUNC_IMPL_ADD (array, i, memcmp, IS_EV6_OR_LATER, __memcmp_ev6)
+ IFUNC_IMPL_ADD (array, i, memcmp, 1, __memcmp_generic));
+
+ IFUNC_IMPL (i, name, memcpy,
+ IFUNC_IMPL_ADD (array, i, memcpy, IS_EV6_OR_LATER, __memcpy_ev6)
+ IFUNC_IMPL_ADD (array, i, memcpy, 1, __memcpy_generic));
+
+ IFUNC_IMPL (i, name, memmove,
+ IFUNC_IMPL_ADD (array, i, memmove, IS_EV6_OR_LATER, __memmove_ev6)
+ IFUNC_IMPL_ADD (array, i, memmove, 1, __memmove_generic));
+
+ IFUNC_IMPL (i, name, mempcpy,
+ IFUNC_IMPL_ADD (array, i, mempcpy, IS_EV6_OR_LATER, ___mempcpy_ev6)
+ IFUNC_IMPL_ADD (array, i, mempcpy, 1, ___mempcpy_generic));
+
IFUNC_IMPL (i, name, memset,
IFUNC_IMPL_ADD (array, i, memset, IS_EV6_OR_LATER, __memset_ev6)
IFUNC_IMPL_ADD (array, i, memset, 1, __memset_ev5));
diff --git ./sysdeps/alpha/multiarch/memcmp.c ./sysdeps/alpha/multiarch/memcmp.c
new file mode 100644
index 0000000000..458b61eef9
--- /dev/null
+++ ./sysdeps/alpha/multiarch/memcmp.c
@@ -0,0 +1,60 @@
+/* Multiple versions of memcmp. Alpha version.
+ Copyright (C) 2026 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#if IS_IN (libc)
+# undef memcmp
+# define memcmp __redirect_memcmp
+# undef __memcmpeq
+# define __memcmpeq __redirect___memcmpeq
+# include <string.h>
+# include <init-arch.h>
+
+extern __typeof (__redirect_memcmp) __libc_memcmp;
+
+extern __typeof (__redirect_memcmp) __memcmp_generic attribute_hidden;
+extern __typeof (__redirect_memcmp) __memcmp_ev6 attribute_hidden;
+
+static inline __typeof (__redirect_memcmp) *
+select_memcmp_ifunc (void)
+{
+ if (IS_EV6_OR_LATER)
+ return __memcmp_ev6;
+
+ return __memcmp_generic;
+}
+
+libc_ifunc (__libc_memcmp, select_memcmp_ifunc ());
+
+# undef memcmp
+# undef __memcmpeq
+strong_alias (__libc_memcmp, memcmp);
+weak_alias (memcmp, bcmp);
+/* string/memcmp.c aliases __memcmpeq to memcmp, but memcmp_generic.c turns
+ strong_alias off, so nothing would define it here. */
+strong_alias (__libc_memcmp, __memcmpeq);
+# ifdef SHARED
+__hidden_ver1 (__memcmpeq, __GI___memcmpeq, __redirect___memcmpeq)
+ __attribute__ ((visibility ("hidden"))) __attribute_copy__ (memcmp);
+# endif
+/* Internal callers use __GI_memcmp, which libc_hidden_builtin_def would
+ normally define; the name is redirected here, so define it by hand. */
+# ifdef SHARED
+__hidden_ver1 (__libc_memcmp, __GI_memcmp, __redirect_memcmp)
+ __attribute__ ((visibility ("hidden"))) __attribute_copy__ (memcmp);
+# endif
+#endif
diff --git ./sysdeps/alpha/multiarch/memcmp_ev6.S ./sysdeps/alpha/multiarch/memcmp_ev6.S
new file mode 100644
index 0000000000..23ca99fd7f
--- /dev/null
+++ ./sysdeps/alpha/multiarch/memcmp_ev6.S
@@ -0,0 +1,41 @@
+/* memcmp for Alpha, EV6 version for multiarch dispatch.
+ Copyright (C) 2026 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#include <sysdep.h>
+
+#if IS_IN (libc)
+# define memcmp __memcmp_ev6
+
+# undef weak_alias
+# define weak_alias(a, b)
+
+/* memcmp.c defines the bcmp and __memcmpeq aliases for the dispatcher. */
+# undef strong_alias
+# define strong_alias(a, b)
+
+# undef libc_hidden_builtin_def
+# define libc_hidden_builtin_def(name)
+# undef libc_hidden_def
+# define libc_hidden_def(name)
+#endif
+
+#include <sysdeps/alpha/alphaev6/memcmp.S>
+
+#if IS_IN (rtld)
+strong_alias (memcmp, __memcmp_ev6)
+#endif
diff --git ./sysdeps/alpha/multiarch/memcmp_generic.c ./sysdeps/alpha/multiarch/memcmp_generic.c
new file mode 100644
index 0000000000..65a17313f3
--- /dev/null
+++ ./sysdeps/alpha/multiarch/memcmp_generic.c
@@ -0,0 +1,35 @@
+/* memcmp for Alpha, generic C version for multiarch dispatch.
+ Copyright (C) 2026 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#if IS_IN (libc)
+# define MEMCMP __memcmp_generic
+
+# undef libc_hidden_builtin_def
+# define libc_hidden_builtin_def(name)
+
+# undef weak_alias
+# define weak_alias(a, b)
+
+# undef strong_alias
+# define strong_alias(a, b)
+
+# undef libc_hidden_def
+# define libc_hidden_def(name)
+#endif
+
+#include <string/memcmp.c>
diff --git ./sysdeps/alpha/multiarch/memcpy.c ./sysdeps/alpha/multiarch/memcpy.c
new file mode 100644
index 0000000000..2592706ede
--- /dev/null
+++ ./sysdeps/alpha/multiarch/memcpy.c
@@ -0,0 +1,49 @@
+/* Multiple versions of memcpy. Alpha version.
+ Copyright (C) 2026 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#if IS_IN (libc)
+# undef memcpy
+# define memcpy __redirect_memcpy
+# include <string.h>
+# include <init-arch.h>
+
+extern __typeof (__redirect_memcpy) __libc_memcpy;
+
+extern __typeof (__redirect_memcpy) __memcpy_generic attribute_hidden;
+extern __typeof (__redirect_memcpy) __memcpy_ev6 attribute_hidden;
+
+static inline __typeof (__redirect_memcpy) *
+select_memcpy_ifunc (void)
+{
+ if (IS_EV6_OR_LATER)
+ return __memcpy_ev6;
+
+ return __memcpy_generic;
+}
+
+libc_ifunc (__libc_memcpy, select_memcpy_ifunc ());
+
+# undef memcpy
+strong_alias (__libc_memcpy, memcpy);
+/* Internal callers use __GI_memcpy, which libc_hidden_builtin_def would
+ normally define; the name is redirected here, so define it by hand. */
+# ifdef SHARED
+__hidden_ver1 (__libc_memcpy, __GI_memcpy, __redirect_memcpy)
+ __attribute__ ((visibility ("hidden"))) __attribute_copy__ (memcpy);
+# endif
+#endif
diff --git ./sysdeps/alpha/multiarch/memcpy_ev6.S ./sysdeps/alpha/multiarch/memcpy_ev6.S
new file mode 100644
index 0000000000..0f254e402c
--- /dev/null
+++ ./sysdeps/alpha/multiarch/memcpy_ev6.S
@@ -0,0 +1,32 @@
+/* memcpy for Alpha, EV6 version for multiarch dispatch.
+ Copyright (C) 2026 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#include <sysdep.h>
+
+#if IS_IN (libc)
+# define memcpy __memcpy_ev6
+
+# undef libc_hidden_builtin_def
+# define libc_hidden_builtin_def(name)
+#endif
+
+#include <sysdeps/alpha/alphaev6/memcpy.S>
+
+#if IS_IN (rtld)
+strong_alias (memcpy, __memcpy_ev6)
+#endif
diff --git ./sysdeps/alpha/multiarch/memcpy_generic.c ./sysdeps/alpha/multiarch/memcpy_generic.c
new file mode 100644
index 0000000000..1c5e3a96ee
--- /dev/null
+++ ./sysdeps/alpha/multiarch/memcpy_generic.c
@@ -0,0 +1,26 @@
+/* memcpy for Alpha, generic C version for multiarch dispatch.
+ Copyright (C) 2026 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#if IS_IN (libc)
+# define MEMCPY __memcpy_generic
+
+# undef libc_hidden_builtin_def
+# define libc_hidden_builtin_def(name)
+#endif
+
+#include <string/memcpy.c>
diff --git ./sysdeps/alpha/multiarch/memmove.c ./sysdeps/alpha/multiarch/memmove.c
new file mode 100644
index 0000000000..10b9f38b5e
--- /dev/null
+++ ./sysdeps/alpha/multiarch/memmove.c
@@ -0,0 +1,49 @@
+/* Multiple versions of memmove. Alpha version.
+ Copyright (C) 2026 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#if IS_IN (libc)
+# undef memmove
+# define memmove __redirect_memmove
+# include <string.h>
+# include <init-arch.h>
+
+extern __typeof (__redirect_memmove) __libc_memmove;
+
+extern __typeof (__redirect_memmove) __memmove_generic attribute_hidden;
+extern __typeof (__redirect_memmove) __memmove_ev6 attribute_hidden;
+
+static inline __typeof (__redirect_memmove) *
+select_memmove_ifunc (void)
+{
+ if (IS_EV6_OR_LATER)
+ return __memmove_ev6;
+
+ return __memmove_generic;
+}
+
+libc_ifunc (__libc_memmove, select_memmove_ifunc ());
+
+# undef memmove
+strong_alias (__libc_memmove, memmove);
+/* Internal callers use __GI_memmove, which libc_hidden_builtin_def would
+ normally define; the name is redirected here, so define it by hand. */
+# ifdef SHARED
+__hidden_ver1 (__libc_memmove, __GI_memmove, __redirect_memmove)
+ __attribute__ ((visibility ("hidden"))) __attribute_copy__ (memmove);
+# endif
+#endif
diff --git ./sysdeps/alpha/multiarch/memmove_ev6.S ./sysdeps/alpha/multiarch/memmove_ev6.S
new file mode 100644
index 0000000000..2130f8fb24
--- /dev/null
+++ ./sysdeps/alpha/multiarch/memmove_ev6.S
@@ -0,0 +1,32 @@
+/* memmove for Alpha, EV6 version for multiarch dispatch.
+ Copyright (C) 2026 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#include <sysdep.h>
+
+#if IS_IN (libc)
+# define memmove __memmove_ev6
+
+# undef libc_hidden_builtin_def
+# define libc_hidden_builtin_def(name)
+#endif
+
+#include <sysdeps/alpha/alphaev6/memmove.S>
+
+#if IS_IN (rtld)
+strong_alias (memmove, __memmove_ev6)
+#endif
diff --git ./sysdeps/alpha/multiarch/memmove_generic.c ./sysdeps/alpha/multiarch/memmove_generic.c
new file mode 100644
index 0000000000..cf5c962868
--- /dev/null
+++ ./sysdeps/alpha/multiarch/memmove_generic.c
@@ -0,0 +1,26 @@
+/* memmove for Alpha, generic C version for multiarch dispatch.
+ Copyright (C) 2026 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#if IS_IN (libc)
+# define MEMMOVE __memmove_generic
+
+# undef libc_hidden_builtin_def
+# define libc_hidden_builtin_def(name)
+#endif
+
+#include <string/memmove.c>
diff --git ./sysdeps/alpha/multiarch/mempcpy.c ./sysdeps/alpha/multiarch/mempcpy.c
new file mode 100644
index 0000000000..a68b08730b
--- /dev/null
+++ ./sysdeps/alpha/multiarch/mempcpy.c
@@ -0,0 +1,61 @@
+/* Multiple versions of mempcpy. Alpha version.
+ Copyright (C) 2026 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#if IS_IN (libc)
+# undef mempcpy
+# define mempcpy __redirect_mempcpy
+# undef __mempcpy
+# define __mempcpy __redirect___mempcpy
+/* string.h defines __mempcpy as a macro calling __builtin_mempcpy, and
+ redirects __builtin_mempcpy back to __mempcpy in the static library;
+ both get in the way of redirecting the name here. */
+# define __NO_STRING_INLINES
+# define NO_MEMPCPY_STPCPY_REDIRECT
+# include <string.h>
+# include <init-arch.h>
+
+extern __typeof (__redirect___mempcpy) __libc___mempcpy;
+
+extern __typeof (__redirect___mempcpy) ___mempcpy_generic attribute_hidden;
+extern __typeof (__redirect___mempcpy) ___mempcpy_ev6 attribute_hidden;
+
+static inline __typeof (__redirect___mempcpy) *
+select_mempcpy_ifunc (void)
+{
+ if (IS_EV6_OR_LATER)
+ return ___mempcpy_ev6;
+
+ return ___mempcpy_generic;
+}
+
+libc_ifunc (__libc___mempcpy, select_mempcpy_ifunc ());
+
+# undef mempcpy
+# undef __mempcpy
+strong_alias (__libc___mempcpy, __mempcpy);
+weak_alias (__mempcpy, mempcpy);
+/* string.h declared the hidden prototype under the redirected name, so
+ libc_hidden_def would alias to a __GI_ symbol that is never defined.
+ Define it here against the redirected type instead. */
+# ifdef SHARED
+__hidden_ver1 (__mempcpy, __GI___mempcpy, __redirect___mempcpy)
+ __attribute__ ((visibility ("hidden"))) __attribute_copy__ (mempcpy);
+__hidden_ver1 (__mempcpy, __GI_mempcpy, __redirect_mempcpy)
+ __attribute__ ((visibility ("hidden"))) __attribute_copy__ (mempcpy);
+# endif
+#endif
diff --git ./sysdeps/alpha/multiarch/mempcpy_ev6.S ./sysdeps/alpha/multiarch/mempcpy_ev6.S
new file mode 100644
index 0000000000..6e58e9caad
--- /dev/null
+++ ./sysdeps/alpha/multiarch/mempcpy_ev6.S
@@ -0,0 +1,39 @@
+/* mempcpy for Alpha, EV6 version for multiarch dispatch.
+ Copyright (C) 2026 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#include <sysdep.h>
+
+#if IS_IN (libc)
+# define USE_AS_MEMPCPY
+# define memcpy ___mempcpy_ev6
+
+# undef libc_hidden_def
+# define libc_hidden_def(name)
+
+# undef weak_alias
+# define weak_alias(a, b)
+
+# undef libc_hidden_builtin_def
+# define libc_hidden_builtin_def(name)
+#endif
+
+#include <sysdeps/alpha/alphaev6/memcpy.S>
+
+#if IS_IN (rtld)
+strong_alias (__mempcpy, ___mempcpy_ev6)
+#endif
diff --git ./sysdeps/alpha/multiarch/mempcpy_generic.c ./sysdeps/alpha/multiarch/mempcpy_generic.c
new file mode 100644
index 0000000000..de34752af8
--- /dev/null
+++ ./sysdeps/alpha/multiarch/mempcpy_generic.c
@@ -0,0 +1,39 @@
+/* mempcpy for Alpha, generic C version for multiarch dispatch.
+ Copyright (C) 2026 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#if IS_IN (libc)
+/* Name the function through MEMPCPY rather than by defining __mempcpy:
+ string/mempcpy.c includes string.h, which defines __mempcpy as a macro
+ of its own, and then undefines it. */
+# define MEMPCPY ___mempcpy_generic
+
+# undef libc_hidden_def
+# define libc_hidden_def(name)
+
+# undef weak_alias
+# define weak_alias(a, b)
+
+/* The aliases below name __mempcpy, which this file does not define. */
+# undef static_weak_alias
+# define static_weak_alias(a, b)
+
+# undef libc_hidden_builtin_def
+# define libc_hidden_builtin_def(name)
+#endif
+
+#include <string/mempcpy.c>
diff --git ./sysdeps/alpha/multiarch/memset.c ./sysdeps/alpha/multiarch/memset.c
new file mode 100644
index 0000000000..7dc4c3f52f
--- /dev/null
+++ ./sysdeps/alpha/multiarch/memset.c
@@ -0,0 +1,49 @@
+/* Multiple versions of memset. Alpha version.
+ Copyright (C) 2026 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#if IS_IN (libc)
+# undef memset
+# define memset __redirect_memset
+# include <string.h>
+# include <init-arch.h>
+
+extern __typeof (__redirect_memset) __libc_memset;
+
+extern __typeof (__redirect_memset) __memset_ev5 attribute_hidden;
+extern __typeof (__redirect_memset) __memset_ev6 attribute_hidden;
+
+static inline __typeof (__redirect_memset) *
+select_memset_ifunc (void)
+{
+ if (IS_EV6_OR_LATER)
+ return __memset_ev6;
+
+ return __memset_ev5;
+}
+
+libc_ifunc (__libc_memset, select_memset_ifunc ());
+
+# undef memset
+strong_alias (__libc_memset, memset);
+/* Internal callers reach this through __GI_memset. Alias it to the IFUNC
+ so that they get the implementation chosen for this CPU too. */
+# ifdef SHARED
+__hidden_ver1 (__libc_memset, __GI_memset, __redirect_memset)
+ __attribute__ ((visibility ("hidden"))) __attribute_copy__ (memset);
+# endif
+#endif
diff --git ./sysdeps/alpha/multiarch/memset_ev5.S ./sysdeps/alpha/multiarch/memset_ev5.S
new file mode 100644
index 0000000000..d6844d086a
--- /dev/null
+++ ./sysdeps/alpha/multiarch/memset_ev5.S
@@ -0,0 +1,33 @@
+/* memset for Alpha, EV4/EV5 version for multiarch dispatch.
+ Copyright (C) 2026 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#include <sysdep.h>
+
+#if IS_IN (libc)
+# define memset __memset_ev5
+
+# undef libc_hidden_builtin_def
+# define libc_hidden_builtin_def(name)
+
+#endif
+
+#include <sysdeps/alpha/memset.S>
+
+#if IS_IN (rtld)
+strong_alias (memset, __memset_ev5)
+#endif
diff --git ./sysdeps/alpha/multiarch/memset_ev6.S ./sysdeps/alpha/multiarch/memset_ev6.S
new file mode 100644
index 0000000000..62550ea2cc
--- /dev/null
+++ ./sysdeps/alpha/multiarch/memset_ev6.S
@@ -0,0 +1,32 @@
+/* memset for Alpha, EV6 version for multiarch dispatch.
+ Copyright (C) 2026 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#include <sysdep.h>
+
+#if IS_IN (libc)
+# define memset __memset_ev6
+
+# undef libc_hidden_builtin_def
+# define libc_hidden_builtin_def(name)
+#endif
+
+#include <sysdeps/alpha/alphaev6/memset.S>
+
+#if IS_IN (rtld)
+strong_alias (memset, __memset_ev6)
+#endif
diff --git ./sysdeps/alpha/multiarch/rawmemchr.c ./sysdeps/alpha/multiarch/rawmemchr.c
new file mode 100644
index 0000000000..0235d5c7c3
--- /dev/null
+++ ./sysdeps/alpha/multiarch/rawmemchr.c
@@ -0,0 +1,55 @@
+/* Multiple versions of rawmemchr. Alpha version.
+ Copyright (C) 2026 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#if IS_IN (libc)
+# undef rawmemchr
+# define rawmemchr __redirect_rawmemchr
+# undef __rawmemchr
+# define __rawmemchr __redirect___rawmemchr
+# include <string.h>
+# include <init-arch.h>
+
+extern __typeof (__redirect___rawmemchr) __libc___rawmemchr;
+
+extern __typeof (__redirect___rawmemchr) ___rawmemchr_ev5 attribute_hidden;
+extern __typeof (__redirect___rawmemchr) ___rawmemchr_ev67 attribute_hidden;
+
+static inline __typeof (__redirect___rawmemchr) *
+select_rawmemchr_ifunc (void)
+{
+ if (HAS_CIX)
+ return ___rawmemchr_ev67;
+
+ return ___rawmemchr_ev5;
+}
+
+libc_ifunc (__libc___rawmemchr, select_rawmemchr_ifunc ());
+
+# undef rawmemchr
+# undef __rawmemchr
+strong_alias (__libc___rawmemchr, __rawmemchr);
+weak_alias (__rawmemchr, rawmemchr);
+/* Not libc_hidden_def: string.h declared the hidden prototype under the
+ redirected name, so that would alias to a __GI_ symbol nothing defines.
+ Alias it to the IFUNC so internal callers also get the implementation
+ chosen for this CPU. */
+# ifdef SHARED
+__hidden_ver1 (__rawmemchr, __GI___rawmemchr, __redirect___rawmemchr)
+ __attribute__ ((visibility ("hidden"))) __attribute_copy__ (rawmemchr);
+# endif
+#endif
diff --git ./sysdeps/alpha/multiarch/rawmemchr_ev5.S ./sysdeps/alpha/multiarch/rawmemchr_ev5.S
new file mode 100644
index 0000000000..8bbc83a525
--- /dev/null
+++ ./sysdeps/alpha/multiarch/rawmemchr_ev5.S
@@ -0,0 +1,36 @@
+/* rawmemchr for Alpha, generic version for multiarch dispatch.
+ Copyright (C) 2026 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#include <sysdep.h>
+
+#if IS_IN (libc)
+# define __rawmemchr ___rawmemchr_ev5
+
+# undef weak_alias
+# define weak_alias(a, b)
+
+# undef libc_hidden_def
+# define libc_hidden_def(name)
+
+#endif
+
+#include <sysdeps/alpha/rawmemchr.S>
+
+#if IS_IN (rtld)
+strong_alias (__rawmemchr, ___rawmemchr_ev5)
+#endif
diff --git ./sysdeps/alpha/multiarch/rawmemchr_ev67.S ./sysdeps/alpha/multiarch/rawmemchr_ev67.S
new file mode 100644
index 0000000000..eb73d77712
--- /dev/null
+++ ./sysdeps/alpha/multiarch/rawmemchr_ev67.S
@@ -0,0 +1,35 @@
+/* rawmemchr for Alpha, EV67 version for multiarch dispatch.
+ Copyright (C) 2026 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#include <sysdep.h>
+
+#if IS_IN (libc)
+# define __rawmemchr ___rawmemchr_ev67
+
+# undef weak_alias
+# define weak_alias(a, b)
+
+# undef libc_hidden_def
+# define libc_hidden_def(name)
+#endif
+
+#include <sysdeps/alpha/alphaev67/rawmemchr.S>
+
+#if IS_IN (rtld)
+strong_alias (__rawmemchr, ___rawmemchr_ev67)
+#endif
diff --git ./sysdeps/alpha/multiarch/stpcpy.c ./sysdeps/alpha/multiarch/stpcpy.c
new file mode 100644
index 0000000000..de4c3ee38b
--- /dev/null
+++ ./sysdeps/alpha/multiarch/stpcpy.c
@@ -0,0 +1,62 @@
+/* Multiple versions of stpcpy. Alpha version.
+ Copyright (C) 2026 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#if IS_IN (libc)
+# undef stpcpy
+# define stpcpy __redirect_stpcpy
+# undef __stpcpy
+# define __stpcpy __redirect___stpcpy
+/* string.h defines __stpcpy as a macro calling __builtin_stpcpy, and
+ redirects __builtin_stpcpy back to __stpcpy in the static library;
+ both get in the way of redirecting the name here. */
+# define __NO_STRING_INLINES
+# define NO_MEMPCPY_STPCPY_REDIRECT
+# include <string.h>
+# include <init-arch.h>
+
+extern __typeof (__redirect___stpcpy) __libc___stpcpy;
+
+extern __typeof (__redirect___stpcpy) ___stpcpy_ev5 attribute_hidden;
+extern __typeof (__redirect___stpcpy) ___stpcpy_ev67 attribute_hidden;
+
+static inline __typeof (__redirect___stpcpy) *
+select_stpcpy_ifunc (void)
+{
+ if (HAS_CIX)
+ return ___stpcpy_ev67;
+
+ return ___stpcpy_ev5;
+}
+
+libc_ifunc (__libc___stpcpy, select_stpcpy_ifunc ());
+
+# undef stpcpy
+# undef __stpcpy
+strong_alias (__libc___stpcpy, __stpcpy);
+weak_alias (__stpcpy, stpcpy);
+/* Not libc_hidden_def: string.h declared the hidden prototype under the
+ redirected name, so that would alias to a __GI_ symbol nothing defines.
+ Alias both internal names to the IFUNC so internal callers also get the
+ implementation chosen for this CPU. */
+# ifdef SHARED
+__hidden_ver1 (__stpcpy, __GI___stpcpy, __redirect___stpcpy)
+ __attribute__ ((visibility ("hidden"))) __attribute_copy__ (stpcpy);
+__hidden_ver1 (__stpcpy, __GI_stpcpy, __redirect_stpcpy)
+ __attribute__ ((visibility ("hidden"))) __attribute_copy__ (stpcpy);
+# endif
+#endif
diff --git ./sysdeps/alpha/multiarch/stpcpy_ev5.S ./sysdeps/alpha/multiarch/stpcpy_ev5.S
new file mode 100644
index 0000000000..9525d46a8d
--- /dev/null
+++ ./sysdeps/alpha/multiarch/stpcpy_ev5.S
@@ -0,0 +1,39 @@
+/* stpcpy for Alpha, generic version for multiarch dispatch.
+ Copyright (C) 2026 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#include <sysdep.h>
+
+#if IS_IN (libc)
+# define __stpcpy ___stpcpy_ev5
+
+# undef weak_alias
+# define weak_alias(a, b)
+
+# undef libc_hidden_def
+# define libc_hidden_def(name)
+
+# undef libc_hidden_builtin_def
+# define libc_hidden_builtin_def(name)
+
+#endif
+
+#include <sysdeps/alpha/stpcpy.S>
+
+#if IS_IN (rtld)
+strong_alias (__stpcpy, ___stpcpy_ev5)
+#endif
diff --git ./sysdeps/alpha/multiarch/stpcpy_ev67.S ./sysdeps/alpha/multiarch/stpcpy_ev67.S
new file mode 100644
index 0000000000..fd145d3264
--- /dev/null
+++ ./sysdeps/alpha/multiarch/stpcpy_ev67.S
@@ -0,0 +1,38 @@
+/* stpcpy for Alpha, EV67 version for multiarch dispatch.
+ Copyright (C) 2026 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#include <sysdep.h>
+
+#if IS_IN (libc)
+# define __stpcpy ___stpcpy_ev67
+
+# undef weak_alias
+# define weak_alias(a, b)
+
+# undef libc_hidden_def
+# define libc_hidden_def(name)
+
+# undef libc_hidden_builtin_def
+# define libc_hidden_builtin_def(name)
+#endif
+
+#include <sysdeps/alpha/alphaev67/stpcpy.S>
+
+#if IS_IN (rtld)
+strong_alias (__stpcpy, ___stpcpy_ev67)
+#endif
diff --git ./sysdeps/alpha/multiarch/stpncpy.c ./sysdeps/alpha/multiarch/stpncpy.c
new file mode 100644
index 0000000000..e6d58a4754
--- /dev/null
+++ ./sysdeps/alpha/multiarch/stpncpy.c
@@ -0,0 +1,55 @@
+/* Multiple versions of stpncpy. Alpha version.
+ Copyright (C) 2026 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#if IS_IN (libc)
+# undef stpncpy
+# define stpncpy __redirect_stpncpy
+# undef __stpncpy
+# define __stpncpy __redirect___stpncpy
+# include <string.h>
+# include <init-arch.h>
+
+extern __typeof (__redirect___stpncpy) __libc___stpncpy;
+
+extern __typeof (__redirect___stpncpy) ___stpncpy_ev5 attribute_hidden;
+extern __typeof (__redirect___stpncpy) ___stpncpy_ev67 attribute_hidden;
+
+static inline __typeof (__redirect___stpncpy) *
+select_stpncpy_ifunc (void)
+{
+ if (HAS_CIX)
+ return ___stpncpy_ev67;
+
+ return ___stpncpy_ev5;
+}
+
+libc_ifunc (__libc___stpncpy, select_stpncpy_ifunc ());
+
+# undef stpncpy
+# undef __stpncpy
+strong_alias (__libc___stpncpy, __stpncpy);
+weak_alias (__stpncpy, stpncpy);
+/* Not libc_hidden_def: string.h declared the hidden prototype under the
+ redirected name, so that would alias to a __GI_ symbol nothing defines.
+ Alias it to the IFUNC so internal callers also get the implementation
+ chosen for this CPU. */
+# ifdef SHARED
+__hidden_ver1 (__stpncpy, __GI___stpncpy, __redirect___stpncpy)
+ __attribute__ ((visibility ("hidden"))) __attribute_copy__ (stpncpy);
+# endif
+#endif
diff --git ./sysdeps/alpha/multiarch/stpncpy_ev5.S ./sysdeps/alpha/multiarch/stpncpy_ev5.S
new file mode 100644
index 0000000000..e9995a517e
--- /dev/null
+++ ./sysdeps/alpha/multiarch/stpncpy_ev5.S
@@ -0,0 +1,36 @@
+/* stpncpy for Alpha, generic version for multiarch dispatch.
+ Copyright (C) 2026 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#include <sysdep.h>
+
+#if IS_IN (libc)
+# define __stpncpy ___stpncpy_ev5
+
+# undef weak_alias
+# define weak_alias(a, b)
+
+# undef libc_hidden_def
+# define libc_hidden_def(name)
+
+#endif
+
+#include <sysdeps/alpha/stpncpy.S>
+
+#if IS_IN (rtld)
+strong_alias (__stpncpy, ___stpncpy_ev5)
+#endif
diff --git ./sysdeps/alpha/multiarch/stpncpy_ev67.S ./sysdeps/alpha/multiarch/stpncpy_ev67.S
new file mode 100644
index 0000000000..bb5ff45d6a
--- /dev/null
+++ ./sysdeps/alpha/multiarch/stpncpy_ev67.S
@@ -0,0 +1,35 @@
+/* stpncpy for Alpha, EV67 version for multiarch dispatch.
+ Copyright (C) 2026 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#include <sysdep.h>
+
+#if IS_IN (libc)
+# define __stpncpy ___stpncpy_ev67
+
+# undef weak_alias
+# define weak_alias(a, b)
+
+# undef libc_hidden_def
+# define libc_hidden_def(name)
+#endif
+
+#include <sysdeps/alpha/alphaev67/stpncpy.S>
+
+#if IS_IN (rtld)
+strong_alias (__stpncpy, ___stpncpy_ev67)
+#endif
diff --git ./sysdeps/alpha/multiarch/strcat.c ./sysdeps/alpha/multiarch/strcat.c
new file mode 100644
index 0000000000..bbba7bfa33
--- /dev/null
+++ ./sysdeps/alpha/multiarch/strcat.c
@@ -0,0 +1,49 @@
+/* Multiple versions of strcat. Alpha version.
+ Copyright (C) 2026 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#if IS_IN (libc)
+# undef strcat
+# define strcat __redirect_strcat
+# include <string.h>
+# include <init-arch.h>
+
+extern __typeof (__redirect_strcat) __libc_strcat;
+
+extern __typeof (__redirect_strcat) __strcat_ev5 attribute_hidden;
+extern __typeof (__redirect_strcat) __strcat_ev67 attribute_hidden;
+
+static inline __typeof (__redirect_strcat) *
+select_strcat_ifunc (void)
+{
+ if (HAS_CIX)
+ return __strcat_ev67;
+
+ return __strcat_ev5;
+}
+
+libc_ifunc (__libc_strcat, select_strcat_ifunc ());
+
+# undef strcat
+strong_alias (__libc_strcat, strcat);
+/* Internal callers reach this through __GI_strcat. Alias it to the IFUNC
+ so that they get the implementation chosen for this CPU too. */
+# ifdef SHARED
+__hidden_ver1 (__libc_strcat, __GI_strcat, __redirect_strcat)
+ __attribute__ ((visibility ("hidden"))) __attribute_copy__ (strcat);
+# endif
+#endif
diff --git ./sysdeps/alpha/multiarch/strcat_ev5.S ./sysdeps/alpha/multiarch/strcat_ev5.S
new file mode 100644
index 0000000000..5b0c421381
--- /dev/null
+++ ./sysdeps/alpha/multiarch/strcat_ev5.S
@@ -0,0 +1,33 @@
+/* strcat for Alpha, generic version for multiarch dispatch.
+ Copyright (C) 2026 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#include <sysdep.h>
+
+#if IS_IN (libc)
+# define strcat __strcat_ev5
+
+# undef libc_hidden_builtin_def
+# define libc_hidden_builtin_def(name)
+
+#endif
+
+#include <sysdeps/alpha/strcat.S>
+
+#if IS_IN (rtld)
+strong_alias (strcat, __strcat_ev5)
+#endif
diff --git ./sysdeps/alpha/multiarch/strcat_ev67.S ./sysdeps/alpha/multiarch/strcat_ev67.S
new file mode 100644
index 0000000000..fbb4296336
--- /dev/null
+++ ./sysdeps/alpha/multiarch/strcat_ev67.S
@@ -0,0 +1,32 @@
+/* strcat for Alpha, EV67 version for multiarch dispatch.
+ Copyright (C) 2026 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#include <sysdep.h>
+
+#if IS_IN (libc)
+# define strcat __strcat_ev67
+
+# undef libc_hidden_builtin_def
+# define libc_hidden_builtin_def(name)
+#endif
+
+#include <sysdeps/alpha/alphaev67/strcat.S>
+
+#if IS_IN (rtld)
+strong_alias (strcat, __strcat_ev67)
+#endif
diff --git ./sysdeps/alpha/multiarch/strchr.c ./sysdeps/alpha/multiarch/strchr.c
new file mode 100644
index 0000000000..57ca43ab81
--- /dev/null
+++ ./sysdeps/alpha/multiarch/strchr.c
@@ -0,0 +1,50 @@
+/* Multiple versions of strchr. Alpha version.
+ Copyright (C) 2026 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#if IS_IN (libc)
+# undef strchr
+# define strchr __redirect_strchr
+# include <string.h>
+# include <init-arch.h>
+
+extern __typeof (__redirect_strchr) __libc_strchr;
+
+extern __typeof (__redirect_strchr) __strchr_ev5 attribute_hidden;
+extern __typeof (__redirect_strchr) __strchr_ev67 attribute_hidden;
+
+static inline __typeof (__redirect_strchr) *
+select_strchr_ifunc (void)
+{
+ if (HAS_CIX)
+ return __strchr_ev67;
+
+ return __strchr_ev5;
+}
+
+libc_ifunc (__libc_strchr, select_strchr_ifunc ());
+
+# undef strchr
+strong_alias (__libc_strchr, strchr);
+weak_alias (strchr, index);
+/* Internal callers reach this through __GI_strchr. Alias it to the IFUNC
+ so that they get the implementation chosen for this CPU too. */
+# ifdef SHARED
+__hidden_ver1 (__libc_strchr, __GI_strchr, __redirect_strchr)
+ __attribute__ ((visibility ("hidden"))) __attribute_copy__ (strchr);
+# endif
+#endif
diff --git ./sysdeps/alpha/multiarch/strchr_ev5.S ./sysdeps/alpha/multiarch/strchr_ev5.S
new file mode 100644
index 0000000000..2bed0a475f
--- /dev/null
+++ ./sysdeps/alpha/multiarch/strchr_ev5.S
@@ -0,0 +1,36 @@
+/* strchr for Alpha, generic version for multiarch dispatch.
+ Copyright (C) 2026 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#include <sysdep.h>
+
+#if IS_IN (libc)
+# define strchr __strchr_ev5
+
+# undef weak_alias
+# define weak_alias(a, b)
+
+# undef libc_hidden_builtin_def
+# define libc_hidden_builtin_def(name)
+
+#endif
+
+#include <sysdeps/alpha/strchr.S>
+
+#if IS_IN (rtld)
+strong_alias (strchr, __strchr_ev5)
+#endif
diff --git ./sysdeps/alpha/multiarch/strchr_ev67.S ./sysdeps/alpha/multiarch/strchr_ev67.S
new file mode 100644
index 0000000000..22dcd12ef2
--- /dev/null
+++ ./sysdeps/alpha/multiarch/strchr_ev67.S
@@ -0,0 +1,35 @@
+/* strchr for Alpha, EV67 version for multiarch dispatch.
+ Copyright (C) 2026 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#include <sysdep.h>
+
+#if IS_IN (libc)
+# define strchr __strchr_ev67
+
+# undef weak_alias
+# define weak_alias(a, b)
+
+# undef libc_hidden_builtin_def
+# define libc_hidden_builtin_def(name)
+#endif
+
+#include <sysdeps/alpha/alphaev67/strchr.S>
+
+#if IS_IN (rtld)
+strong_alias (strchr, __strchr_ev67)
+#endif
diff --git ./sysdeps/alpha/multiarch/strlen.c ./sysdeps/alpha/multiarch/strlen.c
new file mode 100644
index 0000000000..7c9bda3e67
--- /dev/null
+++ ./sysdeps/alpha/multiarch/strlen.c
@@ -0,0 +1,49 @@
+/* Multiple versions of strlen. Alpha version.
+ Copyright (C) 2026 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#if IS_IN (libc)
+# undef strlen
+# define strlen __redirect_strlen
+# include <string.h>
+# include <init-arch.h>
+
+extern __typeof (__redirect_strlen) __libc_strlen;
+
+extern __typeof (__redirect_strlen) __strlen_ev5 attribute_hidden;
+extern __typeof (__redirect_strlen) __strlen_ev67 attribute_hidden;
+
+static inline __typeof (__redirect_strlen) *
+select_strlen_ifunc (void)
+{
+ if (HAS_CIX)
+ return __strlen_ev67;
+
+ return __strlen_ev5;
+}
+
+libc_ifunc (__libc_strlen, select_strlen_ifunc ());
+
+# undef strlen
+strong_alias (__libc_strlen, strlen);
+/* Internal callers reach this through __GI_strlen. Alias it to the IFUNC
+ so that they get the implementation chosen for this CPU too. */
+# ifdef SHARED
+__hidden_ver1 (__libc_strlen, __GI_strlen, __redirect_strlen)
+ __attribute__ ((visibility ("hidden"))) __attribute_copy__ (strlen);
+# endif
+#endif
diff --git ./sysdeps/alpha/multiarch/strlen_ev5.S ./sysdeps/alpha/multiarch/strlen_ev5.S
new file mode 100644
index 0000000000..8894b77486
--- /dev/null
+++ ./sysdeps/alpha/multiarch/strlen_ev5.S
@@ -0,0 +1,33 @@
+/* strlen for Alpha, generic version for multiarch dispatch.
+ Copyright (C) 2026 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#include <sysdep.h>
+
+#if IS_IN (libc)
+# define strlen __strlen_ev5
+
+# undef libc_hidden_builtin_def
+# define libc_hidden_builtin_def(name)
+
+#endif
+
+#include <sysdeps/alpha/strlen.S>
+
+#if IS_IN (rtld)
+strong_alias (strlen, __strlen_ev5)
+#endif
diff --git ./sysdeps/alpha/multiarch/strlen_ev67.S ./sysdeps/alpha/multiarch/strlen_ev67.S
new file mode 100644
index 0000000000..1de4775802
--- /dev/null
+++ ./sysdeps/alpha/multiarch/strlen_ev67.S
@@ -0,0 +1,32 @@
+/* strlen for Alpha, EV67 version for multiarch dispatch.
+ Copyright (C) 2026 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#include <sysdep.h>
+
+#if IS_IN (libc)
+# define strlen __strlen_ev67
+
+# undef libc_hidden_builtin_def
+# define libc_hidden_builtin_def(name)
+#endif
+
+#include <sysdeps/alpha/alphaev67/strlen.S>
+
+#if IS_IN (rtld)
+strong_alias (strlen, __strlen_ev67)
+#endif
diff --git ./sysdeps/alpha/multiarch/strncat.c ./sysdeps/alpha/multiarch/strncat.c
new file mode 100644
index 0000000000..b844518d1a
--- /dev/null
+++ ./sysdeps/alpha/multiarch/strncat.c
@@ -0,0 +1,49 @@
+/* Multiple versions of strncat. Alpha version.
+ Copyright (C) 2026 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#if IS_IN (libc)
+# undef strncat
+# define strncat __redirect_strncat
+# include <string.h>
+# include <init-arch.h>
+
+extern __typeof (__redirect_strncat) __libc_strncat;
+
+extern __typeof (__redirect_strncat) __strncat_ev5 attribute_hidden;
+extern __typeof (__redirect_strncat) __strncat_ev67 attribute_hidden;
+
+static inline __typeof (__redirect_strncat) *
+select_strncat_ifunc (void)
+{
+ if (HAS_CIX)
+ return __strncat_ev67;
+
+ return __strncat_ev5;
+}
+
+libc_ifunc (__libc_strncat, select_strncat_ifunc ());
+
+# undef strncat
+strong_alias (__libc_strncat, strncat);
+/* Internal callers reach this through __GI_strncat. Alias it to the IFUNC
+ so that they get the implementation chosen for this CPU too. */
+# ifdef SHARED
+__hidden_ver1 (__libc_strncat, __GI_strncat, __redirect_strncat)
+ __attribute__ ((visibility ("hidden"))) __attribute_copy__ (strncat);
+# endif
+#endif
diff --git ./sysdeps/alpha/multiarch/strncat_ev5.S ./sysdeps/alpha/multiarch/strncat_ev5.S
new file mode 100644
index 0000000000..591ac9173d
--- /dev/null
+++ ./sysdeps/alpha/multiarch/strncat_ev5.S
@@ -0,0 +1,30 @@
+/* strncat for Alpha, generic version for multiarch dispatch.
+ Copyright (C) 2026 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#include <sysdep.h>
+
+#if IS_IN (libc)
+# define strncat __strncat_ev5
+
+#endif
+
+#include <sysdeps/alpha/strncat.S>
+
+#if IS_IN (rtld)
+strong_alias (strncat, __strncat_ev5)
+#endif
diff --git ./sysdeps/alpha/multiarch/strncat_ev67.S ./sysdeps/alpha/multiarch/strncat_ev67.S
new file mode 100644
index 0000000000..3b878d3618
--- /dev/null
+++ ./sysdeps/alpha/multiarch/strncat_ev67.S
@@ -0,0 +1,29 @@
+/* strncat for Alpha, EV67 version for multiarch dispatch.
+ Copyright (C) 2026 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#include <sysdep.h>
+
+#if IS_IN (libc)
+# define strncat __strncat_ev67
+#endif
+
+#include <sysdeps/alpha/alphaev67/strncat.S>
+
+#if IS_IN (rtld)
+strong_alias (strncat, __strncat_ev67)
+#endif
--
2.54.0
More information about the Libc-alpha
mailing list