diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index faea02bd1b..6fe358cecc 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -116,7 +116,7 @@ tests += tst-clone tst-clone2 tst-clone3 tst-fanotify tst-personality \
 	 tst-tgkill tst-sysvsem-linux tst-sysvmsg-linux tst-sysvshm-linux \
 	 tst-timerfd tst-ppoll \
 	 tst-clock_adjtime tst-adjtimex tst-ntp_adjtime tst-ntp_gettime \
-	 tst-ntp_gettimex tst-sigtimedwait tst-misalign-clone
+	 tst-ntp_gettimex tst-sigtimedwait tst-misalign-clone tst-prctl
 
 # Test for the symbol version of fcntl that was replaced in glibc 2.28.
 ifeq ($(have-GLIBC_2.27)$(build-shared),yesyes)
@@ -134,6 +134,8 @@ tests-time64 += \
   tst-ppoll-time64 \
   tst-sigtimedwait-time64 \
   tst-timerfd-time64 \
+  tst-prctl-time64 \
+  # tests-time64
 
 CFLAGS-tst-sigcontext-get_pc.c = -fasynchronous-unwind-tables
 
diff --git a/sysdeps/unix/sysv/linux/Versions b/sysdeps/unix/sysv/linux/Versions
index c12ee647ae..97e1e81801 100644
--- a/sysdeps/unix/sysv/linux/Versions
+++ b/sysdeps/unix/sysv/linux/Versions
@@ -245,6 +245,7 @@ libc {
     __ntp_gettime64;
     __ntp_gettimex64;
     __ppoll64;
+    __prctl_time64;
     __pselec64;
     __pselect64;
     __pthread_clockjoin_np64;
diff --git a/sysdeps/unix/sysv/linux/arm/be/libc.abilist b/sysdeps/unix/sysv/linux/arm/be/libc.abilist
index 1243e62e45..06deef986f 100644
--- a/sysdeps/unix/sysv/linux/arm/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arm/be/libc.abilist
@@ -240,6 +240,7 @@ GLIBC_2.34 __nftw64_time64 F
 GLIBC_2.34 __ntp_gettime64 F
 GLIBC_2.34 __ntp_gettimex64 F
 GLIBC_2.34 __ppoll64 F
+GLIBC_2.34 __prctl_time64 F
 GLIBC_2.34 __pselect64 F
 GLIBC_2.34 __pthread_cleanup_routine F
 GLIBC_2.34 __pthread_clockjoin_np64 F
diff --git a/sysdeps/unix/sysv/linux/arm/le/libc.abilist b/sysdeps/unix/sysv/linux/arm/le/libc.abilist
index 4750d5db49..cb5a95ebb9 100644
--- a/sysdeps/unix/sysv/linux/arm/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arm/le/libc.abilist
@@ -237,6 +237,7 @@ GLIBC_2.34 __nftw64_time64 F
 GLIBC_2.34 __ntp_gettime64 F
 GLIBC_2.34 __ntp_gettimex64 F
 GLIBC_2.34 __ppoll64 F
+GLIBC_2.34 __prctl_time64 F
 GLIBC_2.34 __pselect64 F
 GLIBC_2.34 __pthread_cleanup_routine F
 GLIBC_2.34 __pthread_clockjoin_np64 F
diff --git a/sysdeps/unix/sysv/linux/csky/libc.abilist b/sysdeps/unix/sysv/linux/csky/libc.abilist
index 6e3263d2fd..76a1898218 100644
--- a/sysdeps/unix/sysv/linux/csky/libc.abilist
+++ b/sysdeps/unix/sysv/linux/csky/libc.abilist
@@ -2372,6 +2372,7 @@ GLIBC_2.34 __nftw64_time64 F
 GLIBC_2.34 __ntp_gettime64 F
 GLIBC_2.34 __ntp_gettimex64 F
 GLIBC_2.34 __ppoll64 F
+GLIBC_2.34 __prctl_time64 F
 GLIBC_2.34 __pselect64 F
 GLIBC_2.34 __pthread_cleanup_routine F
 GLIBC_2.34 __pthread_clockjoin_np64 F
diff --git a/sysdeps/unix/sysv/linux/hppa/libc.abilist b/sysdeps/unix/sysv/linux/hppa/libc.abilist
index d21cefe909..cb135fe6ca 100644
--- a/sysdeps/unix/sysv/linux/hppa/libc.abilist
+++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist
@@ -2325,6 +2325,7 @@ GLIBC_2.34 __nftw64_time64 F
 GLIBC_2.34 __ntp_gettime64 F
 GLIBC_2.34 __ntp_gettimex64 F
 GLIBC_2.34 __ppoll64 F
+GLIBC_2.34 __prctl_time64 F
 GLIBC_2.34 __pselect64 F
 GLIBC_2.34 __pthread_cleanup_routine F
 GLIBC_2.34 __pthread_clockjoin_np64 F
diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist
index f10f233bf6..8941056337 100644
--- a/sysdeps/unix/sysv/linux/i386/libc.abilist
+++ b/sysdeps/unix/sysv/linux/i386/libc.abilist
@@ -2509,6 +2509,7 @@ GLIBC_2.34 __nftw64_time64 F
 GLIBC_2.34 __ntp_gettime64 F
 GLIBC_2.34 __ntp_gettimex64 F
 GLIBC_2.34 __ppoll64 F
+GLIBC_2.34 __prctl_time64 F
 GLIBC_2.34 __pselect64 F
 GLIBC_2.34 __pthread_cleanup_routine F
 GLIBC_2.34 __pthread_clockjoin_np64 F
diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
index 577f5f171d..7cec07ea16 100644
--- a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
@@ -241,6 +241,7 @@ GLIBC_2.34 __nftw64_time64 F
 GLIBC_2.34 __ntp_gettime64 F
 GLIBC_2.34 __ntp_gettimex64 F
 GLIBC_2.34 __ppoll64 F
+GLIBC_2.34 __prctl_time64 F
 GLIBC_2.34 __pselect64 F
 GLIBC_2.34 __pthread_cleanup_routine F
 GLIBC_2.34 __pthread_clockjoin_np64 F
diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
index af68a21c02..edc488fe98 100644
--- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
@@ -2452,6 +2452,7 @@ GLIBC_2.34 __nftw64_time64 F
 GLIBC_2.34 __ntp_gettime64 F
 GLIBC_2.34 __ntp_gettimex64 F
 GLIBC_2.34 __ppoll64 F
+GLIBC_2.34 __prctl_time64 F
 GLIBC_2.34 __pselect64 F
 GLIBC_2.34 __pthread_cleanup_routine F
 GLIBC_2.34 __pthread_clockjoin_np64 F
diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
index c875c87f93..b382d9b268 100644
--- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
@@ -2423,6 +2423,7 @@ GLIBC_2.34 __nftw64_time64 F
 GLIBC_2.34 __ntp_gettime64 F
 GLIBC_2.34 __ntp_gettimex64 F
 GLIBC_2.34 __ppoll64 F
+GLIBC_2.34 __prctl_time64 F
 GLIBC_2.34 __pselect64 F
 GLIBC_2.34 __pthread_cleanup_routine F
 GLIBC_2.34 __pthread_clockjoin_np64 F
diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
index 23835351e3..75752d1400 100644
--- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
@@ -2420,6 +2420,7 @@ GLIBC_2.34 __nftw64_time64 F
 GLIBC_2.34 __ntp_gettime64 F
 GLIBC_2.34 __ntp_gettimex64 F
 GLIBC_2.34 __ppoll64 F
+GLIBC_2.34 __prctl_time64 F
 GLIBC_2.34 __pselect64 F
 GLIBC_2.34 __pthread_cleanup_routine F
 GLIBC_2.34 __pthread_clockjoin_np64 F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
index 08a16d9140..e362490afb 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
@@ -2417,6 +2417,7 @@ GLIBC_2.34 __nftw64_time64 F
 GLIBC_2.34 __ntp_gettime64 F
 GLIBC_2.34 __ntp_gettimex64 F
 GLIBC_2.34 __ppoll64 F
+GLIBC_2.34 __prctl_time64 F
 GLIBC_2.34 __pselect64 F
 GLIBC_2.34 __pthread_cleanup_routine F
 GLIBC_2.34 __pthread_clockjoin_np64 F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
index 88a739586c..d2eba312a7 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
@@ -2415,6 +2415,7 @@ GLIBC_2.34 __nftw64_time64 F
 GLIBC_2.34 __ntp_gettime64 F
 GLIBC_2.34 __ntp_gettimex64 F
 GLIBC_2.34 __ppoll64 F
+GLIBC_2.34 __prctl_time64 F
 GLIBC_2.34 __pselect64 F
 GLIBC_2.34 __pthread_cleanup_routine F
 GLIBC_2.34 __pthread_clockjoin_np64 F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
index a7f8058932..ec5d956d0c 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
@@ -2423,6 +2423,7 @@ GLIBC_2.34 __nftw64_time64 F
 GLIBC_2.34 __ntp_gettime64 F
 GLIBC_2.34 __ntp_gettimex64 F
 GLIBC_2.34 __ppoll64 F
+GLIBC_2.34 __prctl_time64 F
 GLIBC_2.34 __pselect64 F
 GLIBC_2.34 __pthread_cleanup_routine F
 GLIBC_2.34 __pthread_clockjoin_np64 F
diff --git a/sysdeps/unix/sysv/linux/nios2/libc.abilist b/sysdeps/unix/sysv/linux/nios2/libc.abilist
index 00242d3e83..5ffbab4d4c 100644
--- a/sysdeps/unix/sysv/linux/nios2/libc.abilist
+++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist
@@ -2462,6 +2462,7 @@ GLIBC_2.34 __nftw64_time64 F
 GLIBC_2.34 __ntp_gettime64 F
 GLIBC_2.34 __ntp_gettimex64 F
 GLIBC_2.34 __ppoll64 F
+GLIBC_2.34 __prctl_time64 F
 GLIBC_2.34 __pselect64 F
 GLIBC_2.34 __pthread_cleanup_routine F
 GLIBC_2.34 __pthread_clockjoin_np64 F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
index 2589b685d6..d4ba30a441 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
@@ -2479,6 +2479,7 @@ GLIBC_2.34 __nftw64_time64 F
 GLIBC_2.34 __ntp_gettime64 F
 GLIBC_2.34 __ntp_gettimex64 F
 GLIBC_2.34 __ppoll64 F
+GLIBC_2.34 __prctl_time64 F
 GLIBC_2.34 __pselect64 F
 GLIBC_2.34 __pthread_cleanup_routine F
 GLIBC_2.34 __pthread_clockjoin_np64 F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
index e4b172a6e0..8eb206d36e 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
@@ -2512,6 +2512,7 @@ GLIBC_2.34 __nftw64_time64 F
 GLIBC_2.34 __ntp_gettime64 F
 GLIBC_2.34 __ntp_gettimex64 F
 GLIBC_2.34 __ppoll64 F
+GLIBC_2.34 __prctl_time64 F
 GLIBC_2.34 __pselect64 F
 GLIBC_2.34 __pthread_cleanup_routine F
 GLIBC_2.34 __pthread_clockjoin_np64 F
diff --git a/sysdeps/unix/sysv/linux/prctl.c b/sysdeps/unix/sysv/linux/prctl.c
index 85ad4cdd83..2af7b307ef 100644
--- a/sysdeps/unix/sysv/linux/prctl.c
+++ b/sysdeps/unix/sysv/linux/prctl.c
@@ -40,3 +40,6 @@ __prctl (int option, ...)
 
 libc_hidden_def (__prctl)
 weak_alias (__prctl, prctl)
+#if __TIMESIZE != 64
+weak_alias (__prctl, __prctl_time64)
+#endif
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
index be2908b27a..a3c80bc9ba 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
@@ -2477,6 +2477,7 @@ GLIBC_2.34 __nftw64_time64 F
 GLIBC_2.34 __ntp_gettime64 F
 GLIBC_2.34 __ntp_gettimex64 F
 GLIBC_2.34 __ppoll64 F
+GLIBC_2.34 __prctl_time64 F
 GLIBC_2.34 __pselect64 F
 GLIBC_2.34 __pthread_cleanup_routine F
 GLIBC_2.34 __pthread_clockjoin_np64 F
diff --git a/sysdeps/unix/sysv/linux/sh/be/libc.abilist b/sysdeps/unix/sysv/linux/sh/be/libc.abilist
index 4797150a1c..6692749dac 100644
--- a/sysdeps/unix/sysv/linux/sh/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/be/libc.abilist
@@ -2332,6 +2332,7 @@ GLIBC_2.34 __nftw64_time64 F
 GLIBC_2.34 __ntp_gettime64 F
 GLIBC_2.34 __ntp_gettimex64 F
 GLIBC_2.34 __ppoll64 F
+GLIBC_2.34 __prctl_time64 F
 GLIBC_2.34 __pselect64 F
 GLIBC_2.34 __pthread_cleanup_routine F
 GLIBC_2.34 __pthread_clockjoin_np64 F
diff --git a/sysdeps/unix/sysv/linux/sh/le/libc.abilist b/sysdeps/unix/sysv/linux/sh/le/libc.abilist
index 4d38657618..2207e3811c 100644
--- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist
@@ -2329,6 +2329,7 @@ GLIBC_2.34 __nftw64_time64 F
 GLIBC_2.34 __ntp_gettime64 F
 GLIBC_2.34 __ntp_gettimex64 F
 GLIBC_2.34 __ppoll64 F
+GLIBC_2.34 __prctl_time64 F
 GLIBC_2.34 __pselect64 F
 GLIBC_2.34 __pthread_cleanup_routine F
 GLIBC_2.34 __pthread_clockjoin_np64 F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
index fe026eb19e..16099127e5 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
@@ -2472,6 +2472,7 @@ GLIBC_2.34 __nftw64_time64 F
 GLIBC_2.34 __ntp_gettime64 F
 GLIBC_2.34 __ntp_gettimex64 F
 GLIBC_2.34 __ppoll64 F
+GLIBC_2.34 __prctl_time64 F
 GLIBC_2.34 __pselect64 F
 GLIBC_2.34 __pthread_cleanup_routine F
 GLIBC_2.34 __pthread_clockjoin_np64 F
diff --git a/sysdeps/unix/sysv/linux/sys/prctl.h b/sysdeps/unix/sysv/linux/sys/prctl.h
index c9048c7cdb..db88938b3a 100644
--- a/sysdeps/unix/sysv/linux/sys/prctl.h
+++ b/sysdeps/unix/sysv/linux/sys/prctl.h
@@ -38,7 +38,17 @@
 __BEGIN_DECLS
 
 /* Control process execution.  */
+#ifndef __USE_TIME_BITS64
 extern int prctl (int __option, ...) __THROW;
+#else
+# ifdef __REDIRECT
+extern int __REDIRECT (prctl, (int __option, ...), __prctl_time64) __THROW;
+# else
+extern int __prctl_time64 (int __option,d ...) __THROW;
+#  define ioctl __prctl_time64
+# endif
+#endif
+
 
 __END_DECLS
 
diff --git a/sysdeps/unix/sysv/linux/tst-prctl-time64.c b/sysdeps/unix/sysv/linux/tst-prctl-time64.c
new file mode 100644
index 0000000000..d233e12bf4
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/tst-prctl-time64.c
@@ -0,0 +1 @@
+#include "tst-prctl.c"
diff --git a/sysdeps/unix/sysv/linux/tst-prctl.c b/sysdeps/unix/sysv/linux/tst-prctl.c
new file mode 100644
index 0000000000..a9dd1dcd85
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/tst-prctl.c
@@ -0,0 +1,33 @@
+/* Smoke test for prctl.
+   Copyright (C) 2021 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 <sys/prctl.h>
+#include <support/check.h>
+
+static int
+do_test (void)
+{
+  TEST_COMPARE (prctl (PR_SET_NAME, "thread name", 0, 0, 0), 0);
+  char buffer[16] = { 0, };
+  TEST_COMPARE (prctl (PR_GET_NAME, buffer, 0, 0, 0), 0);
+  char expected[16] = "thread name";
+  TEST_COMPARE_BLOB (buffer, sizeof (buffer), expected, sizeof (expected));
+  return 0;
+}
+
+#include <support/test-driver.c>
