diff mbox series

string: Add support for __memsetzero on all targets

Message ID 20220209001922.2182948-1-hjl.tools@gmail.com
State New
Headers show
Series string: Add support for __memsetzero on all targets | expand

Commit Message

H.J. Lu Feb. 9, 2022, 12:19 a.m. UTC
On x86-64, memset is faster than bzero before glibc 2.36 since bzero was
an alias of SSE2 memset while memset is optimized for AVX2 and AVX512.
To optimize for data erase, add

void __memsetzero (void *s, size_t n);

which is an alias of bzero.  If __memsetzero is available, compilers can
generate call to __memsetzero to erases data, instead of memset or bzero.

Tested with build-many-glibcs.py and natively on x86-64, x32 and i686.
---
 string/Makefile                               |  1 +
 string/Versions                               |  3 +++
 string/bzero.c                                |  4 +++
 string/string.h                               |  3 +++
 string/test-memset.c                          | 25 ++++++++++++-------
 string/test-memsetzero.c                      | 19 ++++++++++++++
 sysdeps/alpha/bzero.S                         |  4 +++
 sysdeps/i386/bzero.S                          |  4 +++
 sysdeps/i386/i586/bzero.S                     |  4 +++
 sysdeps/i386/i686/bzero.S                     |  4 +++
 sysdeps/i386/i686/multiarch/bzero-ia32.S      |  3 +++
 sysdeps/i386/i686/multiarch/bzero.c           |  4 +++
 sysdeps/ia64/bzero.S                          | 10 ++++++--
 sysdeps/mach/hurd/i386/libc.abilist           |  1 +
 sysdeps/powerpc/powerpc32/bzero.S             |  4 +++
 .../powerpc32/power4/multiarch/bzero.c        |  4 +++
 sysdeps/powerpc/powerpc64/le/power10/memset.S |  3 +++
 sysdeps/powerpc/powerpc64/memset.S            |  3 +++
 sysdeps/powerpc/powerpc64/multiarch/bzero.c   |  4 +++
 sysdeps/powerpc/powerpc64/power4/memset.S     |  3 +++
 sysdeps/powerpc/powerpc64/power6/memset.S     |  3 +++
 sysdeps/powerpc/powerpc64/power7/memset.S     |  3 +++
 sysdeps/powerpc/powerpc64/power8/memset.S     |  3 +++
 sysdeps/s390/bzero.c                          |  4 +++
 sysdeps/sparc/sparc32/memset.S                |  3 +++
 .../sparc32/sparcv9/multiarch/memset-ultra1.S |  2 ++
 sysdeps/sparc/sparc64/memset.S                |  3 +++
 sysdeps/sparc/sparc64/multiarch/bzero.c       |  3 +++
 .../sparc/sparc64/multiarch/memset-ultra1.S   |  2 ++
 sysdeps/unix/sysv/linux/aarch64/libc.abilist  |  1 +
 sysdeps/unix/sysv/linux/alpha/libc.abilist    |  1 +
 sysdeps/unix/sysv/linux/arc/libc.abilist      |  1 +
 sysdeps/unix/sysv/linux/arm/be/libc.abilist   |  1 +
 sysdeps/unix/sysv/linux/arm/le/libc.abilist   |  1 +
 sysdeps/unix/sysv/linux/csky/libc.abilist     |  1 +
 sysdeps/unix/sysv/linux/hppa/libc.abilist     |  1 +
 sysdeps/unix/sysv/linux/i386/libc.abilist     |  1 +
 sysdeps/unix/sysv/linux/ia64/libc.abilist     |  1 +
 .../sysv/linux/m68k/coldfire/libc.abilist     |  1 +
 .../unix/sysv/linux/m68k/m680x0/libc.abilist  |  1 +
 .../sysv/linux/microblaze/be/libc.abilist     |  1 +
 .../sysv/linux/microblaze/le/libc.abilist     |  1 +
 .../sysv/linux/mips/mips32/fpu/libc.abilist   |  1 +
 .../sysv/linux/mips/mips32/nofpu/libc.abilist |  1 +
 .../sysv/linux/mips/mips64/n32/libc.abilist   |  1 +
 .../sysv/linux/mips/mips64/n64/libc.abilist   |  1 +
 sysdeps/unix/sysv/linux/nios2/libc.abilist    |  1 +
 sysdeps/unix/sysv/linux/or1k/libc.abilist     |  1 +
 .../linux/powerpc/powerpc32/fpu/libc.abilist  |  1 +
 .../powerpc/powerpc32/nofpu/libc.abilist      |  1 +
 .../linux/powerpc/powerpc64/be/libc.abilist   |  1 +
 .../linux/powerpc/powerpc64/le/libc.abilist   |  1 +
 .../unix/sysv/linux/riscv/rv32/libc.abilist   |  1 +
 .../unix/sysv/linux/riscv/rv64/libc.abilist   |  1 +
 .../unix/sysv/linux/s390/s390-32/libc.abilist |  1 +
 .../unix/sysv/linux/s390/s390-64/libc.abilist |  1 +
 sysdeps/unix/sysv/linux/sh/be/libc.abilist    |  1 +
 sysdeps/unix/sysv/linux/sh/le/libc.abilist    |  1 +
 .../sysv/linux/sparc/sparc32/libc.abilist     |  1 +
 .../sysv/linux/sparc/sparc64/libc.abilist     |  1 +
 .../unix/sysv/linux/x86_64/64/libc.abilist    |  1 +
 .../unix/sysv/linux/x86_64/x32/libc.abilist   |  1 +
 sysdeps/x86_64/memset.S                       |  2 ++
 sysdeps/x86_64/multiarch/bzero.c              |  8 ++++++
 64 files changed, 168 insertions(+), 11 deletions(-)
 create mode 100644 string/test-memsetzero.c

Comments

Joseph Myers Feb. 9, 2022, 4 p.m. UTC | #1
This should have a NEWS entry.
H.J. Lu Feb. 9, 2022, 4:11 p.m. UTC | #2
On Wed, Feb 9, 2022 at 8:00 AM Joseph Myers <joseph@codesourcery.com> wrote:
>
> This should have a NEWS entry.
>

Fixed in the v2 patch.

Thanks.
diff mbox series

Patch

diff --git a/string/Makefile b/string/Makefile
index 641e062bbb..ee0b6a4890 100644
--- a/string/Makefile
+++ b/string/Makefile
@@ -145,6 +145,7 @@  tests := \
   test-mempcpy \
   test-memrchr \
   test-memset \
+  test-memsetzero \
   test-rawmemchr \
   test-sig_np \
   test-stpcpy \
diff --git a/string/Versions b/string/Versions
index 864c4cf7a4..0abd7262c5 100644
--- a/string/Versions
+++ b/string/Versions
@@ -92,4 +92,7 @@  libc {
   GLIBC_2.35 {
     __memcmpeq;
   }
+  GLIBC_2.36 {
+    __memsetzero;
+  }
 }
diff --git a/string/bzero.c b/string/bzero.c
index eb2af49e9e..7cbd5b340b 100644
--- a/string/bzero.c
+++ b/string/bzero.c
@@ -26,3 +26,7 @@  __bzero (void *s, size_t len)
   memset (s, '\0', len);
 }
 weak_alias (__bzero, bzero)
+
+#undef __memsetzero
+strong_alias (__bzero, __memsetzero)
+libc_hidden_def (__memsetzero)
diff --git a/string/string.h b/string/string.h
index d494a1d5f9..01bb018b3d 100644
--- a/string/string.h
+++ b/string/string.h
@@ -60,6 +60,9 @@  extern void *memccpy (void *__restrict __dest, const void *__restrict __src,
 /* Set N bytes of S to C.  */
 extern void *memset (void *__s, int __c, size_t __n) __THROW __nonnull ((1));
 
+/* Set N bytes of S to 0.  */
+extern void __memsetzero (void *__s, size_t __n) __THROW __nonnull ((1));
+
 /* Compare N bytes of S1 and S2.  */
 extern int memcmp (const void *__s1, const void *__s2, size_t __n)
      __THROW __attribute_pure__ __nonnull ((1, 2));
diff --git a/string/test-memset.c b/string/test-memset.c
index 8498b1bc97..7da2ce835d 100644
--- a/string/test-memset.c
+++ b/string/test-memset.c
@@ -23,7 +23,9 @@ 
 # else
 #  define TEST_NAME "bzero"
 # endif
-#else
+#elif defined TEST_MEMSETZERO
+# define TEST_NAME "__memsetzero"
+#else /* !TEST_MEMSETZERO */
 # ifndef WIDE
 #  define TEST_NAME "memset"
 # else
@@ -52,8 +54,13 @@ 
 
 CHAR *SIMPLE_MEMSET (CHAR *, int, size_t);
 
-#ifdef TEST_BZERO
+#if defined TEST_BZERO || defined TEST_MEMSETZERO
 typedef void (*proto_t) (char *, size_t);
+# ifdef TEST_MEMSETZERO
+#  define bzero __memsetzero
+#  define simple_bzero simple_memsetzero
+#  define builtin_bzero builtin_memsetzero
+# endif
 void simple_bzero (char *, size_t);
 void builtin_bzero (char *, size_t);
 
@@ -93,7 +100,7 @@  builtin_memset (char *s, int c, size_t n)
   return __builtin_memset (s, c, n);
 }
 # endif /* !WIDE */
-#endif /* !TEST_BZERO */
+#endif /* !TEST_BZERO && !TEST_MEMSETZERO */
 
 CHAR *
 inhibit_loop_to_libcall
@@ -113,7 +120,7 @@  do_one_test (impl_t *impl, CHAR *s, int c __attribute ((unused)), size_t n)
   CHAR sentinel = c - 1;
   buf[0] = sentinel;
   buf[n + 1] = sentinel;
-#ifdef TEST_BZERO
+#if defined TEST_BZERO || defined TEST_MEMSETZERO
   simple_bzero (tstbuf, n);
   CALL (impl, s, n);
   if (memcmp (s, tstbuf, n) != 0
@@ -126,7 +133,7 @@  do_one_test (impl_t *impl, CHAR *s, int c __attribute ((unused)), size_t n)
       || MEMCMP (s, tstbuf, n) != 0
       || buf[0] != sentinel
       || buf[n + 1] != sentinel)
-#endif /* !TEST_BZERO */
+#endif /* !TEST_BZERO && !TEST_MEMSETZERO */
     {
       error (0, 0, "Wrong result in function %s", impl->name);
       ret = 1;
@@ -145,7 +152,7 @@  do_test (size_t align, int c, size_t len)
     do_one_test (impl, (CHAR *) (buf1) + align, c, len);
 }
 
-#ifndef TEST_BZERO
+#if !defined TEST_BZERO && !defined TEST_MEMSETZERO
 static void
 do_random_tests (void)
 {
@@ -231,7 +238,7 @@  do_random_tests (void)
 	}
     }
 }
-#endif /* !TEST_BZERO */
+#endif /* !TEST_BZERO && !TEST_MEMSETZERO */
 
 int
 test_main (void)
@@ -246,7 +253,7 @@  test_main (void)
     printf ("\t%s", impl->name);
   putchar ('\n');
 
-#ifndef TEST_BZERO
+#if !defined TEST_BZERO && !defined TEST_MEMSETZERO
   for (c = -65; c <= 130; c += 65)
 #endif
     {
@@ -266,7 +273,7 @@  test_main (void)
       do_test (2, c, 25);
     }
 
-#ifndef TEST_BZERO
+#if !defined TEST_BZERO && !defined TEST_MEMSETZERO
   do_random_tests ();
 #endif
 
diff --git a/string/test-memsetzero.c b/string/test-memsetzero.c
new file mode 100644
index 0000000000..85160efe67
--- /dev/null
+++ b/string/test-memsetzero.c
@@ -0,0 +1,19 @@ 
+/* Test and measure bzero functions.
+   Copyright (C) 2012-2022 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/>.  */
+#define TEST_MEMSETZERO
+#include "test-memset.c"
diff --git a/sysdeps/alpha/bzero.S b/sysdeps/alpha/bzero.S
index 4821778622..62d2055c44 100644
--- a/sysdeps/alpha/bzero.S
+++ b/sysdeps/alpha/bzero.S
@@ -107,3 +107,7 @@  $done:	ret
 
 	cfi_endproc
 weak_alias (__bzero, bzero)
+
+#undef __memsetzero
+strong_alias (__bzero, __memsetzero)
+libc_hidden_def (__memsetzero)
diff --git a/sysdeps/i386/bzero.S b/sysdeps/i386/bzero.S
index c8dd47b4da..9f6ecc9dbd 100644
--- a/sysdeps/i386/bzero.S
+++ b/sysdeps/i386/bzero.S
@@ -3,3 +3,7 @@ 
 #include "memset.S"
 
 weak_alias (__bzero, bzero)
+
+#undef __memsetzero
+strong_alias (__bzero, __memsetzero)
+libc_hidden_def (__memsetzero)
diff --git a/sysdeps/i386/i586/bzero.S b/sysdeps/i386/i586/bzero.S
index 2a106719a4..776a34f604 100644
--- a/sysdeps/i386/i586/bzero.S
+++ b/sysdeps/i386/i586/bzero.S
@@ -2,3 +2,7 @@ 
 #define memset __bzero
 #include <sysdeps/i386/i586/memset.S>
 weak_alias (__bzero, bzero)
+
+#undef __memsetzero
+strong_alias (__bzero, __memsetzero)
+libc_hidden_def (__memsetzero)
diff --git a/sysdeps/i386/i686/bzero.S b/sysdeps/i386/i686/bzero.S
index c7898f18e0..337308859d 100644
--- a/sysdeps/i386/i686/bzero.S
+++ b/sysdeps/i386/i686/bzero.S
@@ -2,3 +2,7 @@ 
 #define memset __bzero
 #include <sysdeps/i386/i686/memset.S>
 weak_alias (__bzero, bzero)
+
+#undef __memsetzero
+strong_alias (__bzero, __memsetzero)
+libc_hidden_def (__memsetzero)
diff --git a/sysdeps/i386/i686/multiarch/bzero-ia32.S b/sysdeps/i386/i686/multiarch/bzero-ia32.S
index 96afe9bad1..d4e4b77e16 100644
--- a/sysdeps/i386/i686/multiarch/bzero-ia32.S
+++ b/sysdeps/i386/i686/multiarch/bzero-ia32.S
@@ -33,5 +33,8 @@ 
 # undef weak_alias
 # define weak_alias(original, alias)
 
+# undef strong_alias
+# define strong_alias(original, alias)
+
 # include <sysdeps/i386/i686/bzero.S>
 #endif
diff --git a/sysdeps/i386/i686/multiarch/bzero.c b/sysdeps/i386/i686/multiarch/bzero.c
index 7fd0ddd576..764d3cdb94 100644
--- a/sysdeps/i386/i686/multiarch/bzero.c
+++ b/sysdeps/i386/i686/multiarch/bzero.c
@@ -29,4 +29,8 @@ 
 libc_ifunc_redirected (__redirect_bzero, __bzero, IFUNC_SELECTOR ());
 
 weak_alias (__bzero, bzero)
+
+# undef __memsetzero
+strong_alias (__bzero, __memsetzero)
+libc_hidden_def (__memsetzero)
 #endif
diff --git a/sysdeps/ia64/bzero.S b/sysdeps/ia64/bzero.S
index cd01abb436..15bbc2b8df 100644
--- a/sysdeps/ia64/bzero.S
+++ b/sysdeps/ia64/bzero.S
@@ -72,7 +72,7 @@ 
 #endif
 
 .align	64
-ENTRY(bzero)
+ENTRY(__bzero_impl)
 { .mmi
 	.prologue
 	alloc	tmp = ar.pfs, 2, 0, 0, 0
@@ -309,4 +309,10 @@  ENTRY(bzero)
 (p_y)	st1	[ptr3] = r0		// fill last byte (using ptr3)
 	br.ret.sptk.many rp
 ;; }
-END(bzero)
+END(__bzero_impl)
+
+weak_alias (__bzero_impl, bzero)
+
+#undef __memsetzero
+strong_alias (__bzero_impl, __memsetzero)
+libc_hidden_def (__memsetzero)
diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist
index 4dc87e9061..9a39a5c342 100644
--- a/sysdeps/mach/hurd/i386/libc.abilist
+++ b/sysdeps/mach/hurd/i386/libc.abilist
@@ -2289,6 +2289,7 @@  GLIBC_2.35 __memcmpeq F
 GLIBC_2.35 _dl_find_object F
 GLIBC_2.35 close_range F
 GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
+GLIBC_2.36 __memsetzero F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/powerpc/powerpc32/bzero.S b/sysdeps/powerpc/powerpc32/bzero.S
index 9cc03c92df..76b0161e10 100644
--- a/sysdeps/powerpc/powerpc32/bzero.S
+++ b/sysdeps/powerpc/powerpc32/bzero.S
@@ -25,3 +25,7 @@  ENTRY (__bzero)
 	b	memset@local
 END (__bzero)
 weak_alias (__bzero, bzero)
+
+#undef __memsetzero
+strong_alias (__bzero, __memsetzero)
+libc_hidden_def (__memsetzero)
diff --git a/sysdeps/powerpc/powerpc32/power4/multiarch/bzero.c b/sysdeps/powerpc/powerpc32/power4/multiarch/bzero.c
index 5d9270289f..72ee70b99d 100644
--- a/sysdeps/powerpc/powerpc32/power4/multiarch/bzero.c
+++ b/sysdeps/powerpc/powerpc32/power4/multiarch/bzero.c
@@ -34,4 +34,8 @@  libc_ifunc (__bzero,
             : __bzero_ppc);
 
 weak_alias (__bzero, bzero)
+
+# undef __memsetzero
+strong_alias (__bzero, __memsetzero)
+libc_hidden_def (__memsetzero)
 #endif
diff --git a/sysdeps/powerpc/powerpc64/le/power10/memset.S b/sysdeps/powerpc/powerpc64/le/power10/memset.S
index bee6d8b31b..1d7504c055 100644
--- a/sysdeps/powerpc/powerpc64/le/power10/memset.S
+++ b/sysdeps/powerpc/powerpc64/le/power10/memset.S
@@ -253,4 +253,7 @@  ENTRY_TOCLESS (__bzero)
 END (__bzero)
 #ifndef __bzero
 weak_alias (__bzero, bzero)
+
+# undef __memsetzero
+strong_alias (__bzero, __memsetzero)
 #endif
diff --git a/sysdeps/powerpc/powerpc64/memset.S b/sysdeps/powerpc/powerpc64/memset.S
index 34ee8ffca4..bac3d53c5f 100644
--- a/sysdeps/powerpc/powerpc64/memset.S
+++ b/sysdeps/powerpc/powerpc64/memset.S
@@ -265,4 +265,7 @@  ENTRY (__bzero)
 END_GEN_TB (__bzero,TB_TOCLESS)
 
 weak_alias (__bzero, bzero)
+
+#undef __memsetzero
+strong_alias (__bzero, __memsetzero)
 #endif
diff --git a/sysdeps/powerpc/powerpc64/multiarch/bzero.c b/sysdeps/powerpc/powerpc64/multiarch/bzero.c
index f83d6da55b..fb36089e10 100644
--- a/sysdeps/powerpc/powerpc64/multiarch/bzero.c
+++ b/sysdeps/powerpc/powerpc64/multiarch/bzero.c
@@ -51,4 +51,8 @@  libc_ifunc (__bzero,
             : __bzero_ppc);
 
 weak_alias (__bzero, bzero)
+
+# undef __memsetzero
+strong_alias (__bzero, __memsetzero)
+libc_hidden_def (__memsetzero)
 #endif
diff --git a/sysdeps/powerpc/powerpc64/power4/memset.S b/sysdeps/powerpc/powerpc64/power4/memset.S
index dfc136261b..3a62ad3fbf 100644
--- a/sysdeps/powerpc/powerpc64/power4/memset.S
+++ b/sysdeps/powerpc/powerpc64/power4/memset.S
@@ -248,4 +248,7 @@  ENTRY_TOCLESS (__bzero)
 END (__bzero)
 #ifndef __bzero
 weak_alias (__bzero, bzero)
+
+# undef __memsetzero
+strong_alias (__bzero, __memsetzero)
 #endif
diff --git a/sysdeps/powerpc/powerpc64/power6/memset.S b/sysdeps/powerpc/powerpc64/power6/memset.S
index 7ad82c38e6..6cb3202848 100644
--- a/sysdeps/powerpc/powerpc64/power6/memset.S
+++ b/sysdeps/powerpc/powerpc64/power6/memset.S
@@ -392,4 +392,7 @@  ENTRY_TOCLESS (__bzero)
 END (__bzero)
 #ifndef __bzero
 weak_alias (__bzero, bzero)
+
+# undef __memsetzero
+strong_alias (__bzero, __memsetzero)
 #endif
diff --git a/sysdeps/powerpc/powerpc64/power7/memset.S b/sysdeps/powerpc/powerpc64/power7/memset.S
index 31aa0f91cf..8146fd2755 100644
--- a/sysdeps/powerpc/powerpc64/power7/memset.S
+++ b/sysdeps/powerpc/powerpc64/power7/memset.S
@@ -395,4 +395,7 @@  ENTRY_TOCLESS (__bzero)
 END (__bzero)
 #ifndef __bzero
 weak_alias (__bzero, bzero)
+
+# undef __memsetzero
+strong_alias (__bzero, __memsetzero)
 #endif
diff --git a/sysdeps/powerpc/powerpc64/power8/memset.S b/sysdeps/powerpc/powerpc64/power8/memset.S
index 9ecb6f3067..7de395d341 100644
--- a/sysdeps/powerpc/powerpc64/power8/memset.S
+++ b/sysdeps/powerpc/powerpc64/power8/memset.S
@@ -515,4 +515,7 @@  ENTRY_TOCLESS (__bzero)
 END (__bzero)
 #ifndef __bzero
 weak_alias (__bzero, bzero)
+
+# undef __memsetzero
+strong_alias (__bzero, __memsetzero)
 #endif
diff --git a/sysdeps/s390/bzero.c b/sysdeps/s390/bzero.c
index 1f0a03e2ed..8f76614be2 100644
--- a/sysdeps/s390/bzero.c
+++ b/sysdeps/s390/bzero.c
@@ -44,4 +44,8 @@  s390_libc_ifunc_expr (__bzero, __bzero,
 		      })
 		      )
 weak_alias (__bzero, bzero)
+
+# undef __memsetzero
+strong_alias (__bzero, __memsetzero)
+libc_hidden_def (__memsetzero)
 #endif
diff --git a/sysdeps/sparc/sparc32/memset.S b/sysdeps/sparc/sparc32/memset.S
index d222fa7506..8f4a80898d 100644
--- a/sysdeps/sparc/sparc32/memset.S
+++ b/sysdeps/sparc/sparc32/memset.S
@@ -150,3 +150,6 @@  END(memset)
 libc_hidden_builtin_def (memset)
 
 weak_alias (__bzero, bzero)
+
+#undef __memsetzero
+strong_alias (__bzero, __memsetzero)
diff --git a/sysdeps/sparc/sparc32/sparcv9/multiarch/memset-ultra1.S b/sysdeps/sparc/sparc32/sparcv9/multiarch/memset-ultra1.S
index 6038611134..ca2b650842 100644
--- a/sysdeps/sparc/sparc32/sparcv9/multiarch/memset-ultra1.S
+++ b/sysdeps/sparc/sparc32/sparcv9/multiarch/memset-ultra1.S
@@ -23,6 +23,8 @@ 
 # define libc_hidden_builtin_def(name)
 # undef weak_alias
 # define weak_alias(x, y)
+# undef strong_alias
+# define strong_alias(x, y)
 
 # define memset  __memset_ultra1
 # define __bzero __bzero_ultra1
diff --git a/sysdeps/sparc/sparc64/memset.S b/sysdeps/sparc/sparc64/memset.S
index a7f8361fa3..c93e3171e8 100644
--- a/sysdeps/sparc/sparc64/memset.S
+++ b/sysdeps/sparc/sparc64/memset.S
@@ -310,3 +310,6 @@  ENTRY(__bzero)
 END(__bzero)
 
 weak_alias (__bzero, bzero)
+
+#undef __memsetzero
+strong_alias (__bzero, __memsetzero)
diff --git a/sysdeps/sparc/sparc64/multiarch/bzero.c b/sysdeps/sparc/sparc64/multiarch/bzero.c
index 409d66a864..dbababa795 100644
--- a/sysdeps/sparc/sparc64/multiarch/bzero.c
+++ b/sysdeps/sparc/sparc64/multiarch/bzero.c
@@ -30,4 +30,7 @@ 
 sparc_libc_ifunc_redirected (__redirect_bzero, __bzero, IFUNC_SELECTOR)
 weak_alias (__bzero, bzero)
 
+# undef __memsetzero
+strong_alias (__bzero, __memsetzero)
+libc_hidden_def (__memsetzero)
 #endif
diff --git a/sysdeps/sparc/sparc64/multiarch/memset-ultra1.S b/sysdeps/sparc/sparc64/multiarch/memset-ultra1.S
index e0d3424307..e4893db425 100644
--- a/sysdeps/sparc/sparc64/multiarch/memset-ultra1.S
+++ b/sysdeps/sparc/sparc64/multiarch/memset-ultra1.S
@@ -23,6 +23,8 @@ 
 # define libc_hidden_builtin_def(name)
 # undef weak_alias
 # define weak_alias(x, y)
+# undef strong_alias
+# define strong_alias(x, y)
 
 # define memset  __memset_ultra1
 # define __bzero __bzero_ultra1
diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
index 1b63d9e447..68b86b22c9 100644
--- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
@@ -2616,3 +2616,4 @@  GLIBC_2.35 __memcmpeq F
 GLIBC_2.35 _dl_find_object F
 GLIBC_2.35 epoll_pwait2 F
 GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
+GLIBC_2.36 __memsetzero F
diff --git a/sysdeps/unix/sysv/linux/alpha/libc.abilist b/sysdeps/unix/sysv/linux/alpha/libc.abilist
index e7e4cf7d2a..1714ca23fe 100644
--- a/sysdeps/unix/sysv/linux/alpha/libc.abilist
+++ b/sysdeps/unix/sysv/linux/alpha/libc.abilist
@@ -2713,6 +2713,7 @@  GLIBC_2.35 __memcmpeq F
 GLIBC_2.35 _dl_find_object F
 GLIBC_2.35 epoll_pwait2 F
 GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
+GLIBC_2.36 __memsetzero F
 GLIBC_2.4 _IO_fprintf F
 GLIBC_2.4 _IO_printf F
 GLIBC_2.4 _IO_sprintf F
diff --git a/sysdeps/unix/sysv/linux/arc/libc.abilist b/sysdeps/unix/sysv/linux/arc/libc.abilist
index bc3d228e31..8891587282 100644
--- a/sysdeps/unix/sysv/linux/arc/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arc/libc.abilist
@@ -2377,3 +2377,4 @@  GLIBC_2.35 __memcmpeq F
 GLIBC_2.35 _dl_find_object F
 GLIBC_2.35 epoll_pwait2 F
 GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
+GLIBC_2.36 __memsetzero F
diff --git a/sysdeps/unix/sysv/linux/arm/be/libc.abilist b/sysdeps/unix/sysv/linux/arm/be/libc.abilist
index db7039c4ab..4adeec6ca6 100644
--- a/sysdeps/unix/sysv/linux/arm/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arm/be/libc.abilist
@@ -496,6 +496,7 @@  GLIBC_2.35 __memcmpeq F
 GLIBC_2.35 _dl_find_object F
 GLIBC_2.35 epoll_pwait2 F
 GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
+GLIBC_2.36 __memsetzero F
 GLIBC_2.4 _Exit F
 GLIBC_2.4 _IO_2_1_stderr_ D 0xa0
 GLIBC_2.4 _IO_2_1_stdin_ D 0xa0
diff --git a/sysdeps/unix/sysv/linux/arm/le/libc.abilist b/sysdeps/unix/sysv/linux/arm/le/libc.abilist
index d2add4fb49..1b2573e690 100644
--- a/sysdeps/unix/sysv/linux/arm/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arm/le/libc.abilist
@@ -493,6 +493,7 @@  GLIBC_2.35 __memcmpeq F
 GLIBC_2.35 _dl_find_object F
 GLIBC_2.35 epoll_pwait2 F
 GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
+GLIBC_2.36 __memsetzero F
 GLIBC_2.4 _Exit F
 GLIBC_2.4 _IO_2_1_stderr_ D 0xa0
 GLIBC_2.4 _IO_2_1_stdin_ D 0xa0
diff --git a/sysdeps/unix/sysv/linux/csky/libc.abilist b/sysdeps/unix/sysv/linux/csky/libc.abilist
index 355d72a30c..f3dab9746f 100644
--- a/sysdeps/unix/sysv/linux/csky/libc.abilist
+++ b/sysdeps/unix/sysv/linux/csky/libc.abilist
@@ -2652,3 +2652,4 @@  GLIBC_2.35 __memcmpeq F
 GLIBC_2.35 _dl_find_object F
 GLIBC_2.35 epoll_pwait2 F
 GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
+GLIBC_2.36 __memsetzero F
diff --git a/sysdeps/unix/sysv/linux/hppa/libc.abilist b/sysdeps/unix/sysv/linux/hppa/libc.abilist
index 3df39bb28c..21e22081fe 100644
--- a/sysdeps/unix/sysv/linux/hppa/libc.abilist
+++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist
@@ -2601,6 +2601,7 @@  GLIBC_2.35 __memcmpeq F
 GLIBC_2.35 _dl_find_object F
 GLIBC_2.35 epoll_pwait2 F
 GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
+GLIBC_2.36 __memsetzero F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist
index c4da358f80..43b37f2ef1 100644
--- a/sysdeps/unix/sysv/linux/i386/libc.abilist
+++ b/sysdeps/unix/sysv/linux/i386/libc.abilist
@@ -2785,6 +2785,7 @@  GLIBC_2.35 __memcmpeq F
 GLIBC_2.35 _dl_find_object F
 GLIBC_2.35 epoll_pwait2 F
 GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
+GLIBC_2.36 __memsetzero F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/ia64/libc.abilist b/sysdeps/unix/sysv/linux/ia64/libc.abilist
index 241bac70ea..2ee6184fab 100644
--- a/sysdeps/unix/sysv/linux/ia64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/ia64/libc.abilist
@@ -2551,6 +2551,7 @@  GLIBC_2.35 __memcmpeq F
 GLIBC_2.35 _dl_find_object F
 GLIBC_2.35 epoll_pwait2 F
 GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
+GLIBC_2.36 __memsetzero F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
index 78bf372b72..fc43c9d49c 100644
--- a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
@@ -497,6 +497,7 @@  GLIBC_2.35 __memcmpeq F
 GLIBC_2.35 _dl_find_object F
 GLIBC_2.35 epoll_pwait2 F
 GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
+GLIBC_2.36 __memsetzero F
 GLIBC_2.4 _Exit F
 GLIBC_2.4 _IO_2_1_stderr_ D 0x98
 GLIBC_2.4 _IO_2_1_stdin_ D 0x98
diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
index 00df5c901f..f0e94f92bd 100644
--- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
@@ -2728,6 +2728,7 @@  GLIBC_2.35 __memcmpeq F
 GLIBC_2.35 _dl_find_object F
 GLIBC_2.35 epoll_pwait2 F
 GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
+GLIBC_2.36 __memsetzero F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
index e8118569c3..7b309378da 100644
--- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
@@ -2701,3 +2701,4 @@  GLIBC_2.35 __memcmpeq F
 GLIBC_2.35 _dl_find_object F
 GLIBC_2.35 epoll_pwait2 F
 GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
+GLIBC_2.36 __memsetzero F
diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
index c0d2373e64..6d414b32dc 100644
--- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
@@ -2698,3 +2698,4 @@  GLIBC_2.35 __memcmpeq F
 GLIBC_2.35 _dl_find_object F
 GLIBC_2.35 epoll_pwait2 F
 GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
+GLIBC_2.36 __memsetzero F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
index 2d0fd04f54..0c12abffa1 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
@@ -2693,6 +2693,7 @@  GLIBC_2.35 __memcmpeq F
 GLIBC_2.35 _dl_find_object F
 GLIBC_2.35 epoll_pwait2 F
 GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
+GLIBC_2.36 __memsetzero F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
index e39ccfb312..1876d86269 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
@@ -2691,6 +2691,7 @@  GLIBC_2.35 __memcmpeq F
 GLIBC_2.35 _dl_find_object F
 GLIBC_2.35 epoll_pwait2 F
 GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
+GLIBC_2.36 __memsetzero F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
index 1e900f86e4..301941d0cc 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
@@ -2699,6 +2699,7 @@  GLIBC_2.35 __memcmpeq F
 GLIBC_2.35 _dl_find_object F
 GLIBC_2.35 epoll_pwait2 F
 GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
+GLIBC_2.36 __memsetzero F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
index 9145ba7931..906491a531 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
@@ -2602,6 +2602,7 @@  GLIBC_2.35 __memcmpeq F
 GLIBC_2.35 _dl_find_object F
 GLIBC_2.35 epoll_pwait2 F
 GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
+GLIBC_2.36 __memsetzero F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/nios2/libc.abilist b/sysdeps/unix/sysv/linux/nios2/libc.abilist
index e95d60d926..13b9299c87 100644
--- a/sysdeps/unix/sysv/linux/nios2/libc.abilist
+++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist
@@ -2740,3 +2740,4 @@  GLIBC_2.35 __memcmpeq F
 GLIBC_2.35 _dl_find_object F
 GLIBC_2.35 epoll_pwait2 F
 GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
+GLIBC_2.36 __memsetzero F
diff --git a/sysdeps/unix/sysv/linux/or1k/libc.abilist b/sysdeps/unix/sysv/linux/or1k/libc.abilist
index ca934e374b..3cc2db60a5 100644
--- a/sysdeps/unix/sysv/linux/or1k/libc.abilist
+++ b/sysdeps/unix/sysv/linux/or1k/libc.abilist
@@ -2123,3 +2123,4 @@  GLIBC_2.35 wprintf F
 GLIBC_2.35 write F
 GLIBC_2.35 writev F
 GLIBC_2.35 wscanf F
+GLIBC_2.36 __memsetzero F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
index 3820b9f235..fab9acf53f 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
@@ -2755,6 +2755,7 @@  GLIBC_2.35 __memcmpeq F
 GLIBC_2.35 _dl_find_object F
 GLIBC_2.35 epoll_pwait2 F
 GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
+GLIBC_2.36 __memsetzero F
 GLIBC_2.4 _IO_fprintf F
 GLIBC_2.4 _IO_printf F
 GLIBC_2.4 _IO_sprintf F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
index 464dc27fcd..fd2d98b1e6 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
@@ -2788,6 +2788,7 @@  GLIBC_2.35 __memcmpeq F
 GLIBC_2.35 _dl_find_object F
 GLIBC_2.35 epoll_pwait2 F
 GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
+GLIBC_2.36 __memsetzero F
 GLIBC_2.4 _IO_fprintf F
 GLIBC_2.4 _IO_printf F
 GLIBC_2.4 _IO_sprintf F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
index 2f7e58747f..24b8f2ad81 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
@@ -2510,6 +2510,7 @@  GLIBC_2.35 __memcmpeq F
 GLIBC_2.35 _dl_find_object F
 GLIBC_2.35 epoll_pwait2 F
 GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
+GLIBC_2.36 __memsetzero F
 GLIBC_2.4 _IO_fprintf F
 GLIBC_2.4 _IO_printf F
 GLIBC_2.4 _IO_sprintf F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
index 4f3043d913..50a36c4e52 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
@@ -2812,3 +2812,4 @@  GLIBC_2.35 __memcmpeq F
 GLIBC_2.35 _dl_find_object F
 GLIBC_2.35 epoll_pwait2 F
 GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
+GLIBC_2.36 __memsetzero F
diff --git a/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist b/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
index 84b6ac815a..da5f3f83e0 100644
--- a/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
@@ -2379,3 +2379,4 @@  GLIBC_2.35 __memcmpeq F
 GLIBC_2.35 _dl_find_object F
 GLIBC_2.35 epoll_pwait2 F
 GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
+GLIBC_2.36 __memsetzero F
diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist b/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
index 4d5c19c56a..f8477073b2 100644
--- a/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
@@ -2579,3 +2579,4 @@  GLIBC_2.35 __memcmpeq F
 GLIBC_2.35 _dl_find_object F
 GLIBC_2.35 epoll_pwait2 F
 GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
+GLIBC_2.36 __memsetzero F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
index 7c5ee8d569..92a70e2473 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
@@ -2753,6 +2753,7 @@  GLIBC_2.35 __memcmpeq F
 GLIBC_2.35 _dl_find_object F
 GLIBC_2.35 epoll_pwait2 F
 GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
+GLIBC_2.36 __memsetzero F
 GLIBC_2.4 _IO_fprintf F
 GLIBC_2.4 _IO_printf F
 GLIBC_2.4 _IO_sprintf F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
index 50de0b46cf..8dfb6ccdc5 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
@@ -2547,6 +2547,7 @@  GLIBC_2.35 __memcmpeq F
 GLIBC_2.35 _dl_find_object F
 GLIBC_2.35 epoll_pwait2 F
 GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
+GLIBC_2.36 __memsetzero F
 GLIBC_2.4 _IO_fprintf F
 GLIBC_2.4 _IO_printf F
 GLIBC_2.4 _IO_sprintf F
diff --git a/sysdeps/unix/sysv/linux/sh/be/libc.abilist b/sysdeps/unix/sysv/linux/sh/be/libc.abilist
index 66fba013ca..3c7c4b79d6 100644
--- a/sysdeps/unix/sysv/linux/sh/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/be/libc.abilist
@@ -2608,6 +2608,7 @@  GLIBC_2.35 __memcmpeq F
 GLIBC_2.35 _dl_find_object F
 GLIBC_2.35 epoll_pwait2 F
 GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
+GLIBC_2.36 __memsetzero F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/sh/le/libc.abilist b/sysdeps/unix/sysv/linux/sh/le/libc.abilist
index 38703f8aa0..48b4993fb6 100644
--- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist
@@ -2605,6 +2605,7 @@  GLIBC_2.35 __memcmpeq F
 GLIBC_2.35 _dl_find_object F
 GLIBC_2.35 epoll_pwait2 F
 GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
+GLIBC_2.36 __memsetzero F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
index 6df55eb765..011b7cda7e 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
@@ -2748,6 +2748,7 @@  GLIBC_2.35 __memcmpeq F
 GLIBC_2.35 _dl_find_object F
 GLIBC_2.35 epoll_pwait2 F
 GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
+GLIBC_2.36 __memsetzero F
 GLIBC_2.4 _IO_fprintf F
 GLIBC_2.4 _IO_printf F
 GLIBC_2.4 _IO_sprintf F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
index b90569d881..b1156d801e 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
@@ -2574,6 +2574,7 @@  GLIBC_2.35 __memcmpeq F
 GLIBC_2.35 _dl_find_object F
 GLIBC_2.35 epoll_pwait2 F
 GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
+GLIBC_2.36 __memsetzero F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
index e88b0f101f..d7c7667768 100644
--- a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
@@ -2525,6 +2525,7 @@  GLIBC_2.35 __memcmpeq F
 GLIBC_2.35 _dl_find_object F
 GLIBC_2.35 epoll_pwait2 F
 GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
+GLIBC_2.36 __memsetzero F
 GLIBC_2.4 __confstr_chk F
 GLIBC_2.4 __fgets_chk F
 GLIBC_2.4 __fgets_unlocked_chk F
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
index e0755272eb..67619a0d9a 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
@@ -2631,3 +2631,4 @@  GLIBC_2.35 __memcmpeq F
 GLIBC_2.35 _dl_find_object F
 GLIBC_2.35 epoll_pwait2 F
 GLIBC_2.35 posix_spawn_file_actions_addtcsetpgrp_np F
+GLIBC_2.36 __memsetzero F
diff --git a/sysdeps/x86_64/memset.S b/sysdeps/x86_64/memset.S
index af26e9cedc..ffcafbeeaa 100644
--- a/sysdeps/x86_64/memset.S
+++ b/sysdeps/x86_64/memset.S
@@ -68,6 +68,8 @@ 
 #include "multiarch/memset-vec-unaligned-erms.S"
 
 libc_hidden_builtin_def (memset)
+strong_alias (__bzero, __memsetzero)
+libc_hidden_def (__memsetzero)
 
 #if IS_IN (libc)
 weak_alias (__bzero, bzero)
diff --git a/sysdeps/x86_64/multiarch/bzero.c b/sysdeps/x86_64/multiarch/bzero.c
index 58a14b2c33..1ef287df23 100644
--- a/sysdeps/x86_64/multiarch/bzero.c
+++ b/sysdeps/x86_64/multiarch/bzero.c
@@ -20,8 +20,10 @@ 
 /* Define multiple versions only for the definition in libc.  */
 #if IS_IN (libc)
 # define __bzero __redirect___bzero
+# define __memsetzero __redirect___memsetzero
 # include <string.h>
 # undef __bzero
+# undef __memsetzero
 
 # define SYMBOL_NAME __bzero
 # include <init-arch.h>
@@ -103,4 +105,10 @@  IFUNC_SELECTOR (void)
 libc_ifunc_redirected (__redirect___bzero, __bzero, IFUNC_SELECTOR ());
 
 weak_alias (__bzero, bzero)
+strong_alias (__bzero, __memsetzero)
+
+# ifdef SHARED
+__hidden_ver1 (__bzero, __GI___memsetzero, __redirect___bzero)
+  __attribute__ ((visibility ("hidden"))) __attribute_copy__ (__bzero);
+# endif
 #endif