diff --git a/include/string.h b/include/string.h
index 81dab39891..21f641a413 100644
--- a/include/string.h
+++ b/include/string.h
@@ -112,6 +112,7 @@ extern char *__strsep_g (char **__stringp, const char *__delim);
 libc_hidden_proto (__strsep_g)
 libc_hidden_proto (strnlen)
 libc_hidden_proto (__strnlen)
+libc_hidden_proto (__memcmpeq)
 libc_hidden_proto (memmem)
 extern __typeof (memmem) __memmem;
 libc_hidden_proto (__memmem)
diff --git a/string/memcmp.c b/string/memcmp.c
index 5020be00e0..ecffc1d34a 100644
--- a/string/memcmp.c
+++ b/string/memcmp.c
@@ -360,4 +360,5 @@ libc_hidden_builtin_def(memcmp)
 weak_alias (memcmp, bcmp)
 # undef __memcmpeq
 weak_alias (memcmp, __memcmpeq)
+libc_hidden_def (__memcmpeq)
 #endif
diff --git a/sysdeps/aarch64/memcmp.S b/sysdeps/aarch64/memcmp.S
index bc932eff2a..318124a4fd 100644
--- a/sysdeps/aarch64/memcmp.S
+++ b/sysdeps/aarch64/memcmp.S
@@ -180,3 +180,4 @@ weak_alias (memcmp, bcmp)
 #undef __memcmpeq
 weak_alias (memcmp, __memcmpeq)
 libc_hidden_builtin_def (memcmp)
+libc_hidden_def (__memcmpeq)
diff --git a/sysdeps/csky/abiv2/memcmp.S b/sysdeps/csky/abiv2/memcmp.S
index d61fca0f29..f4179769d2 100644
--- a/sysdeps/csky/abiv2/memcmp.S
+++ b/sysdeps/csky/abiv2/memcmp.S
@@ -140,4 +140,5 @@ END (memcmp)
 weak_alias (memcmp, bcmp)
 weak_alias (memcmp, __memcmpeq)
 libc_hidden_def (memcmp)
+libc_hidden_def (__memcmpeq)    
 .weak memcmp
diff --git a/sysdeps/i386/i686/memcmp.S b/sysdeps/i386/i686/memcmp.S
index 0194f8deab..b61fba2be1 100644
--- a/sysdeps/i386/i686/memcmp.S
+++ b/sysdeps/i386/i686/memcmp.S
@@ -408,3 +408,4 @@ weak_alias (memcmp, bcmp)
 #undef __memcmpeq
 weak_alias (memcmp, __memcmpeq)
 libc_hidden_builtin_def (memcmp)
+libc_hidden_def (__memcmpeq)
diff --git a/sysdeps/i386/i686/multiarch/memcmp.c b/sysdeps/i386/i686/multiarch/memcmp.c
index 956fc8e601..575471f1ec 100644
--- a/sysdeps/i386/i686/multiarch/memcmp.c
+++ b/sysdeps/i386/i686/multiarch/memcmp.c
@@ -30,4 +30,5 @@ libc_ifunc_redirected (__redirect_memcmp, memcmp, IFUNC_SELECTOR ());
 
 weak_alias (memcmp, bcmp)
 weak_alias (memcmp, __memcmpeq)
+libc_hidden_def (__memcmpeq)
 #endif
diff --git a/sysdeps/i386/memcmp.S b/sysdeps/i386/memcmp.S
index 18e225f963..2802da7833 100644
--- a/sysdeps/i386/memcmp.S
+++ b/sysdeps/i386/memcmp.S
@@ -73,3 +73,4 @@ weak_alias (memcmp, bcmp)
 #undef __memcmpeq
 weak_alias (memcmp, __memcmpeq)
 libc_hidden_builtin_def (memcmp)
+libc_hidden_def (__memcmpeq)
diff --git a/sysdeps/ia64/memcmp.S b/sysdeps/ia64/memcmp.S
index 4488e0eba4..ae4be49a64 100644
--- a/sysdeps/ia64/memcmp.S
+++ b/sysdeps/ia64/memcmp.S
@@ -162,3 +162,4 @@ END(memcmp)
 weak_alias (memcmp, bcmp)
 weak_alias (memcmp, __memcmpeq)
 libc_hidden_builtin_def (memcmp)
+libc_hidden_def (__memcmpeq)
diff --git a/sysdeps/powerpc/powerpc32/405/memcmp.S b/sysdeps/powerpc/powerpc32/405/memcmp.S
index e8b1b6c9bd..61949db62f 100644
--- a/sysdeps/powerpc/powerpc32/405/memcmp.S
+++ b/sysdeps/powerpc/powerpc32/405/memcmp.S
@@ -127,3 +127,4 @@ END (memcmp)
 libc_hidden_builtin_def (memcmp)
 weak_alias (memcmp,bcmp)
 weak_alias (memcmp, __memcmpeq)
+libc_hidden_def (__memcmpeq)
diff --git a/sysdeps/powerpc/powerpc32/power4/memcmp.S b/sysdeps/powerpc/powerpc32/power4/memcmp.S
index e4dde875bb..e7e2ab13b5 100644
--- a/sysdeps/powerpc/powerpc32/power4/memcmp.S
+++ b/sysdeps/powerpc/powerpc32/power4/memcmp.S
@@ -1374,3 +1374,4 @@ END (memcmp)
 libc_hidden_builtin_def (memcmp)
 weak_alias (memcmp, bcmp)
 weak_alias (memcmp, __memcmpeq)
+libc_hidden_def (__memcmpeq)
diff --git a/sysdeps/powerpc/powerpc32/power7/memcmp.S b/sysdeps/powerpc/powerpc32/power7/memcmp.S
index e60a62fc86..2047f70e82 100644
--- a/sysdeps/powerpc/powerpc32/power7/memcmp.S
+++ b/sysdeps/powerpc/powerpc32/power7/memcmp.S
@@ -1374,3 +1374,4 @@ END (memcmp)
 libc_hidden_builtin_def (memcmp)
 weak_alias (memcmp, bcmp)
 weak_alias (memcmp, __memcmpeq)
+libc_hidden_def (__memcmpeq)
diff --git a/sysdeps/powerpc/powerpc64/le/power10/memcmp.S b/sysdeps/powerpc/powerpc64/le/power10/memcmp.S
index c7fe8047ca..ed682a6303 100644
--- a/sysdeps/powerpc/powerpc64/le/power10/memcmp.S
+++ b/sysdeps/powerpc/powerpc64/le/power10/memcmp.S
@@ -178,3 +178,4 @@ END (MEMCMP)
 libc_hidden_builtin_def (memcmp)
 weak_alias (memcmp, bcmp)
 weak_alias (memcmp, __memcmpeq)
+libc_hidden_def (__memcmpeq)
diff --git a/sysdeps/powerpc/powerpc64/power4/memcmp.S b/sysdeps/powerpc/powerpc64/power4/memcmp.S
index 4ab4a90496..01cbed80df 100644
--- a/sysdeps/powerpc/powerpc64/power4/memcmp.S
+++ b/sysdeps/powerpc/powerpc64/power4/memcmp.S
@@ -1375,3 +1375,4 @@ END (MEMCMP)
 libc_hidden_builtin_def (memcmp)
 weak_alias (memcmp, bcmp)
 weak_alias (memcmp, __memcmpeq)
+libc_hidden_def (__memcmpeq)
diff --git a/sysdeps/powerpc/powerpc64/power7/memcmp.S b/sysdeps/powerpc/powerpc64/power7/memcmp.S
index b541978b5f..aaf1a36263 100644
--- a/sysdeps/powerpc/powerpc64/power7/memcmp.S
+++ b/sysdeps/powerpc/powerpc64/power7/memcmp.S
@@ -1060,3 +1060,4 @@ END (MEMCMP)
 libc_hidden_builtin_def (memcmp)
 weak_alias (memcmp, bcmp)
 weak_alias (memcmp, __memcmpeq)
+libc_hidden_def (__memcmpeq)
diff --git a/sysdeps/powerpc/powerpc64/power8/memcmp.S b/sysdeps/powerpc/powerpc64/power8/memcmp.S
index d4f84a5b6f..520c31a6b1 100644
--- a/sysdeps/powerpc/powerpc64/power8/memcmp.S
+++ b/sysdeps/powerpc/powerpc64/power8/memcmp.S
@@ -1443,3 +1443,4 @@ END (MEMCMP)
 libc_hidden_builtin_def (memcmp)
 weak_alias (memcmp, bcmp)
 weak_alias (memcmp, __memcmpeq)
+libc_hidden_def (__memcmpeq)
diff --git a/sysdeps/s390/memcmp-z900.S b/sysdeps/s390/memcmp-z900.S
index 0942d32814..c10fdb27fa 100644
--- a/sysdeps/s390/memcmp-z900.S
+++ b/sysdeps/s390/memcmp-z900.S
@@ -165,6 +165,7 @@ END(MEMCMP_Z196)
 strong_alias (MEMCMP_DEFAULT, memcmp)
 weak_alias (memcmp, bcmp)
 weak_alias (memcmp, __memcmpeq)
+libc_hidden_def (__memcmpeq)
 #endif
 
 #if defined SHARED && IS_IN (libc)
diff --git a/sysdeps/s390/memcmp.c b/sysdeps/s390/memcmp.c
index 475fc45d3a..c381e038e2 100644
--- a/sysdeps/s390/memcmp.c
+++ b/sysdeps/s390/memcmp.c
@@ -47,4 +47,5 @@ s390_libc_ifunc_expr (__redirect_memcmp, memcmp,
 		      )
 weak_alias (memcmp, bcmp);
 weak_alias (memcmp, __memcmpeq)
+libc_hidden_def (__memcmpeq)
 #endif
diff --git a/sysdeps/sparc/sparc64/memcmp.S b/sysdeps/sparc/sparc64/memcmp.S
index edcc19915a..7ecee3281f 100644
--- a/sysdeps/sparc/sparc64/memcmp.S
+++ b/sysdeps/sparc/sparc64/memcmp.S
@@ -140,3 +140,4 @@ weak_alias (memcmp, bcmp)
 #undef __memcmpeq
 weak_alias (memcmp, __memcmpeq)
 libc_hidden_builtin_def (memcmp)
+libc_hidden_def (__memcmpeq)
diff --git a/sysdeps/x86_64/memcmp.S b/sysdeps/x86_64/memcmp.S
index f41ae48006..5f4a09d5a4 100644
--- a/sysdeps/x86_64/memcmp.S
+++ b/sysdeps/x86_64/memcmp.S
@@ -361,3 +361,4 @@ weak_alias (memcmp, bcmp)
 #undef __memcmpeq
 weak_alias (memcmp, __memcmpeq)
 libc_hidden_builtin_def (memcmp)
+libc_hidden_def (__memcmpeq)
diff --git a/sysdeps/x86_64/multiarch/memcmp.c b/sysdeps/x86_64/multiarch/memcmp.c
index fe125e0904..427a1a9ede 100644
--- a/sysdeps/x86_64/multiarch/memcmp.c
+++ b/sysdeps/x86_64/multiarch/memcmp.c
@@ -31,6 +31,7 @@ libc_ifunc_redirected (__redirect_memcmp, memcmp, IFUNC_SELECTOR ());
 weak_alias (memcmp, bcmp)
 # undef __memcmpeq
 weak_alias (memcmp, __memcmpeq)
+libc_hidden_def (__memcmpeq)
 
 # ifdef SHARED
 __hidden_ver1 (memcmp, __GI_memcmp, __redirect_memcmp)
