diff --git a/include/time.h b/include/time.h
index 4372bfbd96..92a81b858f 100644
--- a/include/time.h
+++ b/include/time.h
@@ -218,7 +218,11 @@ libc_hidden_proto (__futimens64);
 #else
 extern int __timer_gettime64 (timer_t timerid, struct __itimerspec64 *value);
 extern int __timerfd_gettime64 (int fd, struct __itimerspec64 *value);
-librt_hidden_proto (__timer_gettime64);
+# if PTHREAD_IN_LIBC
+libc_hidden_proto (__timer_gettime64)
+# else
+librt_hidden_proto (__timer_gettime64)
+# endif
 libc_hidden_proto (__timerfd_gettime64);
 #endif
 
diff --git a/rt/Makefile b/rt/Makefile
index 2c386da431..3d168f9dc0 100644
--- a/rt/Makefile
+++ b/rt/Makefile
@@ -30,7 +30,6 @@ routines = \
 
 librt-routines = \
   librt-compat \
-  timer_gettime \
   timer_settime \
 
 librt-shared-only-routines = librt-compat
@@ -63,6 +62,7 @@ $(librt-routines-var) += \
   timer_create \
   timer_delete \
   timer_getoverr \
+  timer_gettime \
 
 tests := tst-shm tst-timer tst-timer2 \
 	 tst-aio tst-aio64 tst-aio2 tst-aio3 tst-aio4 tst-aio5 tst-aio6 \
diff --git a/rt/Versions b/rt/Versions
index de78be15dc..d1f05af013 100644
--- a/rt/Versions
+++ b/rt/Versions
@@ -25,6 +25,7 @@ libc {
     timer_create;
     timer_delete;
     timer_getoverrun;
+    timer_gettime;
 %endif
     shm_open;
     shm_unlink;
@@ -87,6 +88,7 @@ libc {
     timer_create;
     timer_delete;
     timer_getoverrun;
+    timer_gettime;
 %endif
     shm_open;
     shm_unlink;
@@ -134,8 +136,8 @@ librt {
     timer_create;
     timer_delete;
     timer_getoverrun;
-%endif
     timer_gettime;
+%endif
     timer_settime;
   }
   GLIBC_2.3.4 {
diff --git a/sysdeps/unix/sysv/linux/Versions b/sysdeps/unix/sysv/linux/Versions
index af1cd38302..27b4b9ec5b 100644
--- a/sysdeps/unix/sysv/linux/Versions
+++ b/sysdeps/unix/sysv/linux/Versions
@@ -125,6 +125,7 @@ libc {
     timer_create;
     timer_delete;
     timer_getoverrun;
+    timer_gettime;
   }
   GLIBC_2.3.4 {
     sched_getaffinity; sched_setaffinity;
diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
index 07e7aa7cb7..132bc7fc1f 100644
--- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
@@ -2009,6 +2009,7 @@ GLIBC_2.17 timelocal F
 GLIBC_2.17 timer_create F
 GLIBC_2.17 timer_delete F
 GLIBC_2.17 timer_getoverrun F
+GLIBC_2.17 timer_gettime F
 GLIBC_2.17 timerfd_create F
 GLIBC_2.17 timerfd_gettime F
 GLIBC_2.17 timerfd_settime F
@@ -2533,6 +2534,7 @@ GLIBC_2.34 thrd_join F
 GLIBC_2.34 timer_create F
 GLIBC_2.34 timer_delete F
 GLIBC_2.34 timer_getoverrun F
+GLIBC_2.34 timer_gettime F
 GLIBC_2.34 timespec_getres F
 GLIBC_2.34 tss_create F
 GLIBC_2.34 tss_delete F
diff --git a/sysdeps/unix/sysv/linux/aarch64/librt.abilist b/sysdeps/unix/sysv/linux/aarch64/librt.abilist
index 493768f440..2cb1369ddb 100644
--- a/sysdeps/unix/sysv/linux/aarch64/librt.abilist
+++ b/sysdeps/unix/sysv/linux/aarch64/librt.abilist
@@ -1,2 +1 @@
-GLIBC_2.17 timer_gettime F
 GLIBC_2.17 timer_settime F
diff --git a/sysdeps/unix/sysv/linux/alpha/Versions b/sysdeps/unix/sysv/linux/alpha/Versions
index dd5b365d77..0359822d6d 100644
--- a/sysdeps/unix/sysv/linux/alpha/Versions
+++ b/sysdeps/unix/sysv/linux/alpha/Versions
@@ -104,7 +104,6 @@ librt {
   }
   GLIBC_2.3.3 {
     # Changed timer_t.
-    timer_gettime;
     timer_settime;
   }
 }
diff --git a/sysdeps/unix/sysv/linux/alpha/libc.abilist b/sysdeps/unix/sysv/linux/alpha/libc.abilist
index 44dfa719d1..6dfefb451f 100644
--- a/sysdeps/unix/sysv/linux/alpha/libc.abilist
+++ b/sysdeps/unix/sysv/linux/alpha/libc.abilist
@@ -2096,6 +2096,7 @@ GLIBC_2.2 swscanf F
 GLIBC_2.2 timer_create F
 GLIBC_2.2 timer_delete F
 GLIBC_2.2 timer_getoverrun F
+GLIBC_2.2 timer_gettime F
 GLIBC_2.2 ungetwc F
 GLIBC_2.2 vfwprintf F
 GLIBC_2.2 vfwscanf F
@@ -2359,6 +2360,7 @@ GLIBC_2.3.3 sys_siglist D 0x208
 GLIBC_2.3.3 timer_create F
 GLIBC_2.3.3 timer_delete F
 GLIBC_2.3.3 timer_getoverrun F
+GLIBC_2.3.3 timer_gettime F
 GLIBC_2.3.4 _OtsAddX F
 GLIBC_2.3.4 _OtsConvertFloatTX F
 GLIBC_2.3.4 _OtsConvertFloatXT F
@@ -2630,6 +2632,7 @@ GLIBC_2.34 thrd_join F
 GLIBC_2.34 timer_create F
 GLIBC_2.34 timer_delete F
 GLIBC_2.34 timer_getoverrun F
+GLIBC_2.34 timer_gettime F
 GLIBC_2.34 timespec_getres F
 GLIBC_2.34 tss_create F
 GLIBC_2.34 tss_delete F
diff --git a/sysdeps/unix/sysv/linux/alpha/librt.abilist b/sysdeps/unix/sysv/linux/alpha/librt.abilist
index 34d42d122b..a2de1ecd94 100644
--- a/sysdeps/unix/sysv/linux/alpha/librt.abilist
+++ b/sysdeps/unix/sysv/linux/alpha/librt.abilist
@@ -1,8 +1,6 @@
 GLIBC_2.1 __librt_version_placeholder F
-GLIBC_2.2 timer_gettime F
 GLIBC_2.2 timer_settime F
 GLIBC_2.3 __librt_version_placeholder F
-GLIBC_2.3.3 timer_gettime F
 GLIBC_2.3.3 timer_settime F
 GLIBC_2.3.4 __librt_version_placeholder F
 GLIBC_2.4 __librt_version_placeholder F
diff --git a/sysdeps/unix/sysv/linux/alpha/timer_gettime.c b/sysdeps/unix/sysv/linux/alpha/timer_gettime.c
deleted file mode 100644
index cea524bae5..0000000000
--- a/sysdeps/unix/sysv/linux/alpha/timer_gettime.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/x86_64/timer_gettime.c>
diff --git a/sysdeps/unix/sysv/linux/arc/libc.abilist b/sysdeps/unix/sysv/linux/arc/libc.abilist
index af6b26565d..bd33035c3e 100644
--- a/sysdeps/unix/sysv/linux/arc/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arc/libc.abilist
@@ -1943,6 +1943,7 @@ GLIBC_2.32 timelocal F
 GLIBC_2.32 timer_create F
 GLIBC_2.32 timer_delete F
 GLIBC_2.32 timer_getoverrun F
+GLIBC_2.32 timer_gettime F
 GLIBC_2.32 timerfd_create F
 GLIBC_2.32 timerfd_gettime F
 GLIBC_2.32 timerfd_settime F
@@ -2292,6 +2293,7 @@ GLIBC_2.34 thrd_join F
 GLIBC_2.34 timer_create F
 GLIBC_2.34 timer_delete F
 GLIBC_2.34 timer_getoverrun F
+GLIBC_2.34 timer_gettime F
 GLIBC_2.34 timespec_getres F
 GLIBC_2.34 tss_create F
 GLIBC_2.34 tss_delete F
diff --git a/sysdeps/unix/sysv/linux/arc/librt.abilist b/sysdeps/unix/sysv/linux/arc/librt.abilist
index 14ae3d7c65..0023244be6 100644
--- a/sysdeps/unix/sysv/linux/arc/librt.abilist
+++ b/sysdeps/unix/sysv/linux/arc/librt.abilist
@@ -1,2 +1 @@
-GLIBC_2.32 timer_gettime F
 GLIBC_2.32 timer_settime F
diff --git a/sysdeps/unix/sysv/linux/arm/be/libc.abilist b/sysdeps/unix/sysv/linux/arm/be/libc.abilist
index 0792cf7e31..a94a299962 100644
--- a/sysdeps/unix/sysv/linux/arm/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arm/be/libc.abilist
@@ -356,6 +356,7 @@ GLIBC_2.34 thrd_join F
 GLIBC_2.34 timer_create F
 GLIBC_2.34 timer_delete F
 GLIBC_2.34 timer_getoverrun F
+GLIBC_2.34 timer_gettime F
 GLIBC_2.34 timespec_getres F
 GLIBC_2.34 tss_create F
 GLIBC_2.34 tss_delete F
@@ -2275,6 +2276,7 @@ GLIBC_2.4 timelocal F
 GLIBC_2.4 timer_create F
 GLIBC_2.4 timer_delete F
 GLIBC_2.4 timer_getoverrun F
+GLIBC_2.4 timer_gettime F
 GLIBC_2.4 times F
 GLIBC_2.4 timezone D 0x4
 GLIBC_2.4 tmpfile F
diff --git a/sysdeps/unix/sysv/linux/arm/be/librt.abilist b/sysdeps/unix/sysv/linux/arm/be/librt.abilist
index b4895847aa..b0906ea08a 100644
--- a/sysdeps/unix/sysv/linux/arm/be/librt.abilist
+++ b/sysdeps/unix/sysv/linux/arm/be/librt.abilist
@@ -1,3 +1,2 @@
-GLIBC_2.4 timer_gettime F
 GLIBC_2.4 timer_settime F
 GLIBC_2.7 __librt_version_placeholder F
diff --git a/sysdeps/unix/sysv/linux/arm/le/libc.abilist b/sysdeps/unix/sysv/linux/arm/le/libc.abilist
index efface2982..c6718d3a74 100644
--- a/sysdeps/unix/sysv/linux/arm/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arm/le/libc.abilist
@@ -353,6 +353,7 @@ GLIBC_2.34 thrd_join F
 GLIBC_2.34 timer_create F
 GLIBC_2.34 timer_delete F
 GLIBC_2.34 timer_getoverrun F
+GLIBC_2.34 timer_gettime F
 GLIBC_2.34 timespec_getres F
 GLIBC_2.34 tss_create F
 GLIBC_2.34 tss_delete F
@@ -2272,6 +2273,7 @@ GLIBC_2.4 timelocal F
 GLIBC_2.4 timer_create F
 GLIBC_2.4 timer_delete F
 GLIBC_2.4 timer_getoverrun F
+GLIBC_2.4 timer_gettime F
 GLIBC_2.4 times F
 GLIBC_2.4 timezone D 0x4
 GLIBC_2.4 tmpfile F
diff --git a/sysdeps/unix/sysv/linux/arm/le/librt.abilist b/sysdeps/unix/sysv/linux/arm/le/librt.abilist
index b4895847aa..b0906ea08a 100644
--- a/sysdeps/unix/sysv/linux/arm/le/librt.abilist
+++ b/sysdeps/unix/sysv/linux/arm/le/librt.abilist
@@ -1,3 +1,2 @@
-GLIBC_2.4 timer_gettime F
 GLIBC_2.4 timer_settime F
 GLIBC_2.7 __librt_version_placeholder F
diff --git a/sysdeps/unix/sysv/linux/csky/libc.abilist b/sysdeps/unix/sysv/linux/csky/libc.abilist
index bc37dc3577..dc7aadc27b 100644
--- a/sysdeps/unix/sysv/linux/csky/libc.abilist
+++ b/sysdeps/unix/sysv/linux/csky/libc.abilist
@@ -2033,6 +2033,7 @@ GLIBC_2.29 timelocal F
 GLIBC_2.29 timer_create F
 GLIBC_2.29 timer_delete F
 GLIBC_2.29 timer_getoverrun F
+GLIBC_2.29 timer_gettime F
 GLIBC_2.29 timerfd_create F
 GLIBC_2.29 timerfd_gettime F
 GLIBC_2.29 timerfd_settime F
@@ -2476,6 +2477,7 @@ GLIBC_2.34 thrd_join F
 GLIBC_2.34 timer_create F
 GLIBC_2.34 timer_delete F
 GLIBC_2.34 timer_getoverrun F
+GLIBC_2.34 timer_gettime F
 GLIBC_2.34 timespec_getres F
 GLIBC_2.34 tss_create F
 GLIBC_2.34 tss_delete F
diff --git a/sysdeps/unix/sysv/linux/csky/librt.abilist b/sysdeps/unix/sysv/linux/csky/librt.abilist
index e1fdee6b16..c3573b2d9e 100644
--- a/sysdeps/unix/sysv/linux/csky/librt.abilist
+++ b/sysdeps/unix/sysv/linux/csky/librt.abilist
@@ -1,2 +1 @@
-GLIBC_2.29 timer_gettime F
 GLIBC_2.29 timer_settime F
diff --git a/sysdeps/unix/sysv/linux/hppa/libc.abilist b/sysdeps/unix/sysv/linux/hppa/libc.abilist
index fddc79b9c5..55ed375cf6 100644
--- a/sysdeps/unix/sysv/linux/hppa/libc.abilist
+++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist
@@ -1747,6 +1747,7 @@ GLIBC_2.2 timelocal F
 GLIBC_2.2 timer_create F
 GLIBC_2.2 timer_delete F
 GLIBC_2.2 timer_getoverrun F
+GLIBC_2.2 timer_gettime F
 GLIBC_2.2 times F
 GLIBC_2.2 timezone D 0x4
 GLIBC_2.2 tmpfile F
@@ -2429,6 +2430,7 @@ GLIBC_2.34 thrd_join F
 GLIBC_2.34 timer_create F
 GLIBC_2.34 timer_delete F
 GLIBC_2.34 timer_getoverrun F
+GLIBC_2.34 timer_gettime F
 GLIBC_2.34 timespec_getres F
 GLIBC_2.34 tss_create F
 GLIBC_2.34 tss_delete F
diff --git a/sysdeps/unix/sysv/linux/hppa/librt.abilist b/sysdeps/unix/sysv/linux/hppa/librt.abilist
index 22e5dd0ec9..57ce681936 100644
--- a/sysdeps/unix/sysv/linux/hppa/librt.abilist
+++ b/sysdeps/unix/sysv/linux/hppa/librt.abilist
@@ -1,5 +1,4 @@
 GLIBC_2.1 __librt_version_placeholder F
-GLIBC_2.2 timer_gettime F
 GLIBC_2.2 timer_settime F
 GLIBC_2.3.4 __librt_version_placeholder F
 GLIBC_2.4 __librt_version_placeholder F
diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist
index 8db3a38d21..8299b919d7 100644
--- a/sysdeps/unix/sysv/linux/i386/libc.abilist
+++ b/sysdeps/unix/sysv/linux/i386/libc.abilist
@@ -2109,6 +2109,7 @@ GLIBC_2.2 swscanf F
 GLIBC_2.2 timer_create F
 GLIBC_2.2 timer_delete F
 GLIBC_2.2 timer_getoverrun F
+GLIBC_2.2 timer_gettime F
 GLIBC_2.2 ungetwc F
 GLIBC_2.2 versionsort64 F
 GLIBC_2.2 vfwprintf F
@@ -2613,6 +2614,7 @@ GLIBC_2.34 thrd_join F
 GLIBC_2.34 timer_create F
 GLIBC_2.34 timer_delete F
 GLIBC_2.34 timer_getoverrun F
+GLIBC_2.34 timer_gettime F
 GLIBC_2.34 timespec_getres F
 GLIBC_2.34 tss_create F
 GLIBC_2.34 tss_delete F
diff --git a/sysdeps/unix/sysv/linux/i386/librt.abilist b/sysdeps/unix/sysv/linux/i386/librt.abilist
index 22e5dd0ec9..57ce681936 100644
--- a/sysdeps/unix/sysv/linux/i386/librt.abilist
+++ b/sysdeps/unix/sysv/linux/i386/librt.abilist
@@ -1,5 +1,4 @@
 GLIBC_2.1 __librt_version_placeholder F
-GLIBC_2.2 timer_gettime F
 GLIBC_2.2 timer_settime F
 GLIBC_2.3.4 __librt_version_placeholder F
 GLIBC_2.4 __librt_version_placeholder F
diff --git a/sysdeps/unix/sysv/linux/ia64/Versions b/sysdeps/unix/sysv/linux/ia64/Versions
index 1d09fca7e3..9a7faf067a 100644
--- a/sysdeps/unix/sysv/linux/ia64/Versions
+++ b/sysdeps/unix/sysv/linux/ia64/Versions
@@ -30,7 +30,6 @@ libc {
 librt {
   GLIBC_2.3.3 {
     # Changed timer_t.
-    timer_gettime;
     timer_settime;
   }
 }
diff --git a/sysdeps/unix/sysv/linux/ia64/libc.abilist b/sysdeps/unix/sysv/linux/ia64/libc.abilist
index c9cd0370c5..b7c70a41d3 100644
--- a/sysdeps/unix/sysv/linux/ia64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/ia64/libc.abilist
@@ -1768,6 +1768,7 @@ GLIBC_2.2 timelocal F
 GLIBC_2.2 timer_create F
 GLIBC_2.2 timer_delete F
 GLIBC_2.2 timer_getoverrun F
+GLIBC_2.2 timer_gettime F
 GLIBC_2.2 times F
 GLIBC_2.2 timezone D 0x8
 GLIBC_2.2 tmpfile F
@@ -2224,6 +2225,7 @@ GLIBC_2.3.3 sys_siglist D 0x208
 GLIBC_2.3.3 timer_create F
 GLIBC_2.3.3 timer_delete F
 GLIBC_2.3.3 timer_getoverrun F
+GLIBC_2.3.3 timer_gettime F
 GLIBC_2.3.4 __chk_fail F
 GLIBC_2.3.4 __fprintf_chk F
 GLIBC_2.3.4 __gets_chk F
@@ -2468,6 +2470,7 @@ GLIBC_2.34 thrd_join F
 GLIBC_2.34 timer_create F
 GLIBC_2.34 timer_delete F
 GLIBC_2.34 timer_getoverrun F
+GLIBC_2.34 timer_gettime F
 GLIBC_2.34 timespec_getres F
 GLIBC_2.34 tss_create F
 GLIBC_2.34 tss_delete F
diff --git a/sysdeps/unix/sysv/linux/ia64/librt.abilist b/sysdeps/unix/sysv/linux/ia64/librt.abilist
index c56040a5f9..7d8e91b0d9 100644
--- a/sysdeps/unix/sysv/linux/ia64/librt.abilist
+++ b/sysdeps/unix/sysv/linux/ia64/librt.abilist
@@ -1,7 +1,5 @@
 GLIBC_2.1 __librt_version_placeholder F
-GLIBC_2.2 timer_gettime F
 GLIBC_2.2 timer_settime F
-GLIBC_2.3.3 timer_gettime F
 GLIBC_2.3.3 timer_settime F
 GLIBC_2.3.4 __librt_version_placeholder F
 GLIBC_2.4 __librt_version_placeholder F
diff --git a/sysdeps/unix/sysv/linux/ia64/timer_gettime.c b/sysdeps/unix/sysv/linux/ia64/timer_gettime.c
deleted file mode 100644
index cea524bae5..0000000000
--- a/sysdeps/unix/sysv/linux/ia64/timer_gettime.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/x86_64/timer_gettime.c>
diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
index d88486ac21..921633dd5b 100644
--- a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
@@ -357,6 +357,7 @@ GLIBC_2.34 thrd_join F
 GLIBC_2.34 timer_create F
 GLIBC_2.34 timer_delete F
 GLIBC_2.34 timer_getoverrun F
+GLIBC_2.34 timer_gettime F
 GLIBC_2.34 timespec_getres F
 GLIBC_2.34 tss_create F
 GLIBC_2.34 tss_delete F
@@ -2255,6 +2256,7 @@ GLIBC_2.4 timelocal F
 GLIBC_2.4 timer_create F
 GLIBC_2.4 timer_delete F
 GLIBC_2.4 timer_getoverrun F
+GLIBC_2.4 timer_gettime F
 GLIBC_2.4 times F
 GLIBC_2.4 timezone D 0x4
 GLIBC_2.4 tmpfile F
diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/librt.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/librt.abilist
index b4895847aa..b0906ea08a 100644
--- a/sysdeps/unix/sysv/linux/m68k/coldfire/librt.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/coldfire/librt.abilist
@@ -1,3 +1,2 @@
-GLIBC_2.4 timer_gettime F
 GLIBC_2.4 timer_settime F
 GLIBC_2.7 __librt_version_placeholder F
diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
index 3ed327327c..1609ab1971 100644
--- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
@@ -2065,6 +2065,7 @@ GLIBC_2.2 swscanf F
 GLIBC_2.2 timer_create F
 GLIBC_2.2 timer_delete F
 GLIBC_2.2 timer_getoverrun F
+GLIBC_2.2 timer_gettime F
 GLIBC_2.2 ungetwc F
 GLIBC_2.2 versionsort64 F
 GLIBC_2.2 vfwprintf F
@@ -2556,6 +2557,7 @@ GLIBC_2.34 thrd_join F
 GLIBC_2.34 timer_create F
 GLIBC_2.34 timer_delete F
 GLIBC_2.34 timer_getoverrun F
+GLIBC_2.34 timer_gettime F
 GLIBC_2.34 timespec_getres F
 GLIBC_2.34 tss_create F
 GLIBC_2.34 tss_delete F
diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/librt.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/librt.abilist
index 22e5dd0ec9..57ce681936 100644
--- a/sysdeps/unix/sysv/linux/m68k/m680x0/librt.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/m680x0/librt.abilist
@@ -1,5 +1,4 @@
 GLIBC_2.1 __librt_version_placeholder F
-GLIBC_2.2 timer_gettime F
 GLIBC_2.2 timer_settime F
 GLIBC_2.3.4 __librt_version_placeholder F
 GLIBC_2.4 __librt_version_placeholder F
diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
index 8645e96419..88dfdcf78e 100644
--- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
@@ -2013,6 +2013,7 @@ GLIBC_2.18 timelocal F
 GLIBC_2.18 timer_create F
 GLIBC_2.18 timer_delete F
 GLIBC_2.18 timer_getoverrun F
+GLIBC_2.18 timer_gettime F
 GLIBC_2.18 timerfd_create F
 GLIBC_2.18 timerfd_gettime F
 GLIBC_2.18 timerfd_settime F
@@ -2527,6 +2528,7 @@ GLIBC_2.34 thrd_join F
 GLIBC_2.34 timer_create F
 GLIBC_2.34 timer_delete F
 GLIBC_2.34 timer_getoverrun F
+GLIBC_2.34 timer_gettime F
 GLIBC_2.34 timespec_getres F
 GLIBC_2.34 tss_create F
 GLIBC_2.34 tss_delete F
diff --git a/sysdeps/unix/sysv/linux/microblaze/be/librt.abilist b/sysdeps/unix/sysv/linux/microblaze/be/librt.abilist
index f32831ffaf..8f8901c872 100644
--- a/sysdeps/unix/sysv/linux/microblaze/be/librt.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/be/librt.abilist
@@ -1,2 +1 @@
-GLIBC_2.18 timer_gettime F
 GLIBC_2.18 timer_settime F
diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
index c3e9839ef8..0b2dd534d4 100644
--- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
@@ -2013,6 +2013,7 @@ GLIBC_2.18 timelocal F
 GLIBC_2.18 timer_create F
 GLIBC_2.18 timer_delete F
 GLIBC_2.18 timer_getoverrun F
+GLIBC_2.18 timer_gettime F
 GLIBC_2.18 timerfd_create F
 GLIBC_2.18 timerfd_gettime F
 GLIBC_2.18 timerfd_settime F
@@ -2524,6 +2525,7 @@ GLIBC_2.34 thrd_join F
 GLIBC_2.34 timer_create F
 GLIBC_2.34 timer_delete F
 GLIBC_2.34 timer_getoverrun F
+GLIBC_2.34 timer_gettime F
 GLIBC_2.34 timespec_getres F
 GLIBC_2.34 tss_create F
 GLIBC_2.34 tss_delete F
diff --git a/sysdeps/unix/sysv/linux/microblaze/le/librt.abilist b/sysdeps/unix/sysv/linux/microblaze/le/librt.abilist
index f32831ffaf..8f8901c872 100644
--- a/sysdeps/unix/sysv/linux/microblaze/le/librt.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/le/librt.abilist
@@ -1,2 +1 @@
-GLIBC_2.18 timer_gettime F
 GLIBC_2.18 timer_settime F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
index ee96a63a6e..75e7671aee 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
@@ -1996,6 +1996,7 @@ GLIBC_2.2 tdestroy F
 GLIBC_2.2 timer_create F
 GLIBC_2.2 timer_delete F
 GLIBC_2.2 timer_getoverrun F
+GLIBC_2.2 timer_gettime F
 GLIBC_2.2 tmpfile F
 GLIBC_2.2 tmpfile64 F
 GLIBC_2.2 truncate64 F
@@ -2521,6 +2522,7 @@ GLIBC_2.34 thrd_join F
 GLIBC_2.34 timer_create F
 GLIBC_2.34 timer_delete F
 GLIBC_2.34 timer_getoverrun F
+GLIBC_2.34 timer_gettime F
 GLIBC_2.34 timespec_getres F
 GLIBC_2.34 tss_create F
 GLIBC_2.34 tss_delete F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/librt.abilist b/sysdeps/unix/sysv/linux/mips/mips32/librt.abilist
index a92565949e..406120e1d8 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/librt.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/librt.abilist
@@ -1,4 +1,3 @@
-GLIBC_2.2 timer_gettime F
 GLIBC_2.2 timer_settime F
 GLIBC_2.3.4 __librt_version_placeholder F
 GLIBC_2.4 __librt_version_placeholder F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
index 91ed2f20bb..a1a934c115 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
@@ -1994,6 +1994,7 @@ GLIBC_2.2 tdestroy F
 GLIBC_2.2 timer_create F
 GLIBC_2.2 timer_delete F
 GLIBC_2.2 timer_getoverrun F
+GLIBC_2.2 timer_gettime F
 GLIBC_2.2 tmpfile F
 GLIBC_2.2 tmpfile64 F
 GLIBC_2.2 truncate64 F
@@ -2519,6 +2520,7 @@ GLIBC_2.34 thrd_join F
 GLIBC_2.34 timer_create F
 GLIBC_2.34 timer_delete F
 GLIBC_2.34 timer_getoverrun F
+GLIBC_2.34 timer_gettime F
 GLIBC_2.34 timespec_getres F
 GLIBC_2.34 tss_create F
 GLIBC_2.34 tss_delete F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/librt.abilist b/sysdeps/unix/sysv/linux/mips/mips64/librt.abilist
index a92565949e..406120e1d8 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/librt.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/librt.abilist
@@ -1,4 +1,3 @@
-GLIBC_2.2 timer_gettime F
 GLIBC_2.2 timer_settime F
 GLIBC_2.3.4 __librt_version_placeholder F
 GLIBC_2.4 __librt_version_placeholder F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
index 75f1c4eac0..6e8f069a52 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
@@ -1992,6 +1992,7 @@ GLIBC_2.2 tdestroy F
 GLIBC_2.2 timer_create F
 GLIBC_2.2 timer_delete F
 GLIBC_2.2 timer_getoverrun F
+GLIBC_2.2 timer_gettime F
 GLIBC_2.2 tmpfile F
 GLIBC_2.2 tmpfile64 F
 GLIBC_2.2 truncate64 F
@@ -2527,6 +2528,7 @@ GLIBC_2.34 thrd_join F
 GLIBC_2.34 timer_create F
 GLIBC_2.34 timer_delete F
 GLIBC_2.34 timer_getoverrun F
+GLIBC_2.34 timer_gettime F
 GLIBC_2.34 timespec_getres F
 GLIBC_2.34 tss_create F
 GLIBC_2.34 tss_delete F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
index e9710b4079..a6ad507d9e 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
@@ -1988,6 +1988,7 @@ GLIBC_2.2 tdestroy F
 GLIBC_2.2 timer_create F
 GLIBC_2.2 timer_delete F
 GLIBC_2.2 timer_getoverrun F
+GLIBC_2.2 timer_gettime F
 GLIBC_2.2 tmpfile F
 GLIBC_2.2 tmpfile64 F
 GLIBC_2.2 truncate64 F
@@ -2521,6 +2522,7 @@ GLIBC_2.34 thrd_join F
 GLIBC_2.34 timer_create F
 GLIBC_2.34 timer_delete F
 GLIBC_2.34 timer_getoverrun F
+GLIBC_2.34 timer_gettime F
 GLIBC_2.34 timespec_getres F
 GLIBC_2.34 tss_create F
 GLIBC_2.34 tss_delete F
diff --git a/sysdeps/unix/sysv/linux/nios2/libc.abilist b/sysdeps/unix/sysv/linux/nios2/libc.abilist
index a8d3150c9f..4ece38246a 100644
--- a/sysdeps/unix/sysv/linux/nios2/libc.abilist
+++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist
@@ -2055,6 +2055,7 @@ GLIBC_2.21 timelocal F
 GLIBC_2.21 timer_create F
 GLIBC_2.21 timer_delete F
 GLIBC_2.21 timer_getoverrun F
+GLIBC_2.21 timer_gettime F
 GLIBC_2.21 timerfd_create F
 GLIBC_2.21 timerfd_gettime F
 GLIBC_2.21 timerfd_settime F
@@ -2566,6 +2567,7 @@ GLIBC_2.34 thrd_join F
 GLIBC_2.34 timer_create F
 GLIBC_2.34 timer_delete F
 GLIBC_2.34 timer_getoverrun F
+GLIBC_2.34 timer_gettime F
 GLIBC_2.34 timespec_getres F
 GLIBC_2.34 tss_create F
 GLIBC_2.34 tss_delete F
diff --git a/sysdeps/unix/sysv/linux/nios2/librt.abilist b/sysdeps/unix/sysv/linux/nios2/librt.abilist
index d874b0cfee..d2298d7d44 100644
--- a/sysdeps/unix/sysv/linux/nios2/librt.abilist
+++ b/sysdeps/unix/sysv/linux/nios2/librt.abilist
@@ -1,2 +1 @@
-GLIBC_2.21 timer_gettime F
 GLIBC_2.21 timer_settime F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
index 7a91e15100..43fa1ce5a8 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
@@ -2070,6 +2070,7 @@ GLIBC_2.2 swscanf F
 GLIBC_2.2 timer_create F
 GLIBC_2.2 timer_delete F
 GLIBC_2.2 timer_getoverrun F
+GLIBC_2.2 timer_gettime F
 GLIBC_2.2 ungetwc F
 GLIBC_2.2 vfwprintf F
 GLIBC_2.2 vfwscanf F
@@ -2583,6 +2584,7 @@ GLIBC_2.34 thrd_join F
 GLIBC_2.34 timer_create F
 GLIBC_2.34 timer_delete F
 GLIBC_2.34 timer_getoverrun F
+GLIBC_2.34 timer_gettime F
 GLIBC_2.34 timespec_getres F
 GLIBC_2.34 tss_create F
 GLIBC_2.34 tss_delete F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/librt.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/librt.abilist
index 22e5dd0ec9..57ce681936 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/librt.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/librt.abilist
@@ -1,5 +1,4 @@
 GLIBC_2.1 __librt_version_placeholder F
-GLIBC_2.2 timer_gettime F
 GLIBC_2.2 timer_settime F
 GLIBC_2.3.4 __librt_version_placeholder F
 GLIBC_2.4 __librt_version_placeholder F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
index 948c535117..53a23d406a 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
@@ -2074,6 +2074,7 @@ GLIBC_2.2 swscanf F
 GLIBC_2.2 timer_create F
 GLIBC_2.2 timer_delete F
 GLIBC_2.2 timer_getoverrun F
+GLIBC_2.2 timer_gettime F
 GLIBC_2.2 ungetwc F
 GLIBC_2.2 vfwprintf F
 GLIBC_2.2 vfwscanf F
@@ -2616,6 +2617,7 @@ GLIBC_2.34 thrd_join F
 GLIBC_2.34 timer_create F
 GLIBC_2.34 timer_delete F
 GLIBC_2.34 timer_getoverrun F
+GLIBC_2.34 timer_gettime F
 GLIBC_2.34 timespec_getres F
 GLIBC_2.34 tss_create F
 GLIBC_2.34 tss_delete F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions b/sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions
index a69927d41d..8607ac1012 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions
@@ -29,7 +29,6 @@ libc {
 librt {
   GLIBC_2.3.3 {
     # Changed timer_t.
-    timer_gettime;
     timer_settime;
   }
 }
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
index 71b1ccd398..2c97b206fd 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libc.abilist
@@ -1889,6 +1889,7 @@ GLIBC_2.3 timelocal F
 GLIBC_2.3 timer_create F
 GLIBC_2.3 timer_delete F
 GLIBC_2.3 timer_getoverrun F
+GLIBC_2.3 timer_gettime F
 GLIBC_2.3 times F
 GLIBC_2.3 timezone D 0x8
 GLIBC_2.3 tmpfile F
@@ -2168,6 +2169,7 @@ GLIBC_2.3.3 sys_siglist D 0x208
 GLIBC_2.3.3 timer_create F
 GLIBC_2.3.3 timer_delete F
 GLIBC_2.3.3 timer_getoverrun F
+GLIBC_2.3.3 timer_gettime F
 GLIBC_2.3.4 __chk_fail F
 GLIBC_2.3.4 __fprintf_chk F
 GLIBC_2.3.4 __gets_chk F
@@ -2432,6 +2434,7 @@ GLIBC_2.34 thrd_join F
 GLIBC_2.34 timer_create F
 GLIBC_2.34 timer_delete F
 GLIBC_2.34 timer_getoverrun F
+GLIBC_2.34 timer_gettime F
 GLIBC_2.34 timespec_getres F
 GLIBC_2.34 tss_create F
 GLIBC_2.34 tss_delete F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/librt.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/librt.abilist
index dd8b2ad6ef..bfaae8ac0e 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/librt.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/librt.abilist
@@ -1,6 +1,4 @@
-GLIBC_2.3 timer_gettime F
 GLIBC_2.3 timer_settime F
-GLIBC_2.3.3 timer_gettime F
 GLIBC_2.3.3 timer_settime F
 GLIBC_2.3.4 __librt_version_placeholder F
 GLIBC_2.4 __librt_version_placeholder F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
index e32bd31860..c43d39328d 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libc.abilist
@@ -2097,6 +2097,7 @@ GLIBC_2.17 timelocal F
 GLIBC_2.17 timer_create F
 GLIBC_2.17 timer_delete F
 GLIBC_2.17 timer_getoverrun F
+GLIBC_2.17 timer_gettime F
 GLIBC_2.17 timerfd_create F
 GLIBC_2.17 timerfd_gettime F
 GLIBC_2.17 timerfd_settime F
@@ -2729,6 +2730,7 @@ GLIBC_2.34 thrd_join F
 GLIBC_2.34 timer_create F
 GLIBC_2.34 timer_delete F
 GLIBC_2.34 timer_getoverrun F
+GLIBC_2.34 timer_gettime F
 GLIBC_2.34 timespec_getres F
 GLIBC_2.34 tss_create F
 GLIBC_2.34 tss_delete F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/librt.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/librt.abilist
index 493768f440..2cb1369ddb 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/librt.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/librt.abilist
@@ -1,2 +1 @@
-GLIBC_2.17 timer_gettime F
 GLIBC_2.17 timer_settime F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c b/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c
deleted file mode 100644
index cea524bae5..0000000000
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/x86_64/timer_gettime.c>
diff --git a/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist b/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
index c9f803d38c..2a26211fda 100644
--- a/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/riscv/rv32/libc.abilist
@@ -1953,6 +1953,7 @@ GLIBC_2.33 timelocal F
 GLIBC_2.33 timer_create F
 GLIBC_2.33 timer_delete F
 GLIBC_2.33 timer_getoverrun F
+GLIBC_2.33 timer_gettime F
 GLIBC_2.33 timerfd_create F
 GLIBC_2.33 timerfd_gettime F
 GLIBC_2.33 timerfd_settime F
@@ -2294,6 +2295,7 @@ GLIBC_2.34 thrd_join F
 GLIBC_2.34 timer_create F
 GLIBC_2.34 timer_delete F
 GLIBC_2.34 timer_getoverrun F
+GLIBC_2.34 timer_gettime F
 GLIBC_2.34 timespec_getres F
 GLIBC_2.34 tss_create F
 GLIBC_2.34 tss_delete F
diff --git a/sysdeps/unix/sysv/linux/riscv/rv32/librt.abilist b/sysdeps/unix/sysv/linux/riscv/rv32/librt.abilist
index de338094e1..c59f14490e 100644
--- a/sysdeps/unix/sysv/linux/riscv/rv32/librt.abilist
+++ b/sysdeps/unix/sysv/linux/riscv/rv32/librt.abilist
@@ -1,2 +1 @@
-GLIBC_2.33 timer_gettime F
 GLIBC_2.33 timer_settime F
diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist b/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
index 86f2c9c940..73119b554b 100644
--- a/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/riscv/rv64/libc.abilist
@@ -2019,6 +2019,7 @@ GLIBC_2.27 timelocal F
 GLIBC_2.27 timer_create F
 GLIBC_2.27 timer_delete F
 GLIBC_2.27 timer_getoverrun F
+GLIBC_2.27 timer_gettime F
 GLIBC_2.27 timerfd_create F
 GLIBC_2.27 timerfd_gettime F
 GLIBC_2.27 timerfd_settime F
@@ -2494,6 +2495,7 @@ GLIBC_2.34 thrd_join F
 GLIBC_2.34 timer_create F
 GLIBC_2.34 timer_delete F
 GLIBC_2.34 timer_getoverrun F
+GLIBC_2.34 timer_gettime F
 GLIBC_2.34 timespec_getres F
 GLIBC_2.34 tss_create F
 GLIBC_2.34 tss_delete F
diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/librt.abilist b/sysdeps/unix/sysv/linux/riscv/rv64/librt.abilist
index 624ab969d8..62ff23fd04 100644
--- a/sysdeps/unix/sysv/linux/riscv/rv64/librt.abilist
+++ b/sysdeps/unix/sysv/linux/riscv/rv64/librt.abilist
@@ -1,2 +1 @@
-GLIBC_2.27 timer_gettime F
 GLIBC_2.27 timer_settime F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
index 18bda14ede..16c3fc2e8c 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
@@ -2068,6 +2068,7 @@ GLIBC_2.2 swscanf F
 GLIBC_2.2 timer_create F
 GLIBC_2.2 timer_delete F
 GLIBC_2.2 timer_getoverrun F
+GLIBC_2.2 timer_gettime F
 GLIBC_2.2 ungetwc F
 GLIBC_2.2 versionsort64 F
 GLIBC_2.2 vfwprintf F
@@ -2581,6 +2582,7 @@ GLIBC_2.34 thrd_join F
 GLIBC_2.34 timer_create F
 GLIBC_2.34 timer_delete F
 GLIBC_2.34 timer_getoverrun F
+GLIBC_2.34 timer_gettime F
 GLIBC_2.34 timespec_getres F
 GLIBC_2.34 tss_create F
 GLIBC_2.34 tss_delete F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/librt.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/librt.abilist
index 22e5dd0ec9..57ce681936 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/librt.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/librt.abilist
@@ -1,5 +1,4 @@
 GLIBC_2.1 __librt_version_placeholder F
-GLIBC_2.2 timer_gettime F
 GLIBC_2.2 timer_settime F
 GLIBC_2.3.4 __librt_version_placeholder F
 GLIBC_2.4 __librt_version_placeholder F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/Versions b/sysdeps/unix/sysv/linux/s390/s390-64/Versions
index e7f968fcdf..5c682764ad 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/Versions
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/Versions
@@ -9,7 +9,6 @@ libc {
 librt {
   GLIBC_2.3.3 {
     # Changed timer_t.
-    timer_gettime;
     timer_settime;
   }
 }
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
index fcf90947ab..2a04b9d2d9 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
@@ -1764,6 +1764,7 @@ GLIBC_2.2 timelocal F
 GLIBC_2.2 timer_create F
 GLIBC_2.2 timer_delete F
 GLIBC_2.2 timer_getoverrun F
+GLIBC_2.2 timer_gettime F
 GLIBC_2.2 times F
 GLIBC_2.2 timezone D 0x8
 GLIBC_2.2 tmpfile F
@@ -2214,6 +2215,7 @@ GLIBC_2.3.3 sys_siglist D 0x208
 GLIBC_2.3.3 timer_create F
 GLIBC_2.3.3 timer_delete F
 GLIBC_2.3.3 timer_getoverrun F
+GLIBC_2.3.3 timer_gettime F
 GLIBC_2.3.4 __chk_fail F
 GLIBC_2.3.4 __fprintf_chk F
 GLIBC_2.3.4 __gets_chk F
@@ -2469,6 +2471,7 @@ GLIBC_2.34 thrd_join F
 GLIBC_2.34 timer_create F
 GLIBC_2.34 timer_delete F
 GLIBC_2.34 timer_getoverrun F
+GLIBC_2.34 timer_gettime F
 GLIBC_2.34 timespec_getres F
 GLIBC_2.34 tss_create F
 GLIBC_2.34 tss_delete F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/librt.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/librt.abilist
index 35dc39d27d..f851eea81e 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/librt.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/librt.abilist
@@ -1,6 +1,4 @@
-GLIBC_2.2 timer_gettime F
 GLIBC_2.2 timer_settime F
-GLIBC_2.3.3 timer_gettime F
 GLIBC_2.3.3 timer_settime F
 GLIBC_2.3.4 __librt_version_placeholder F
 GLIBC_2.4 __librt_version_placeholder F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c b/sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c
deleted file mode 100644
index cea524bae5..0000000000
--- a/sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/x86_64/timer_gettime.c>
diff --git a/sysdeps/unix/sysv/linux/sh/be/libc.abilist b/sysdeps/unix/sysv/linux/sh/be/libc.abilist
index de7372052a..fa4a56bedc 100644
--- a/sysdeps/unix/sysv/linux/sh/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/be/libc.abilist
@@ -1751,6 +1751,7 @@ GLIBC_2.2 timelocal F
 GLIBC_2.2 timer_create F
 GLIBC_2.2 timer_delete F
 GLIBC_2.2 timer_getoverrun F
+GLIBC_2.2 timer_gettime F
 GLIBC_2.2 times F
 GLIBC_2.2 timezone D 0x4
 GLIBC_2.2 tmpfile F
@@ -2436,6 +2437,7 @@ GLIBC_2.34 thrd_join F
 GLIBC_2.34 timer_create F
 GLIBC_2.34 timer_delete F
 GLIBC_2.34 timer_getoverrun F
+GLIBC_2.34 timer_gettime F
 GLIBC_2.34 timespec_getres F
 GLIBC_2.34 tss_create F
 GLIBC_2.34 tss_delete F
diff --git a/sysdeps/unix/sysv/linux/sh/be/librt.abilist b/sysdeps/unix/sysv/linux/sh/be/librt.abilist
index 22e5dd0ec9..57ce681936 100644
--- a/sysdeps/unix/sysv/linux/sh/be/librt.abilist
+++ b/sysdeps/unix/sysv/linux/sh/be/librt.abilist
@@ -1,5 +1,4 @@
 GLIBC_2.1 __librt_version_placeholder F
-GLIBC_2.2 timer_gettime F
 GLIBC_2.2 timer_settime F
 GLIBC_2.3.4 __librt_version_placeholder F
 GLIBC_2.4 __librt_version_placeholder F
diff --git a/sysdeps/unix/sysv/linux/sh/le/libc.abilist b/sysdeps/unix/sysv/linux/sh/le/libc.abilist
index 65fe13865a..928fb80b5d 100644
--- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist
@@ -1751,6 +1751,7 @@ GLIBC_2.2 timelocal F
 GLIBC_2.2 timer_create F
 GLIBC_2.2 timer_delete F
 GLIBC_2.2 timer_getoverrun F
+GLIBC_2.2 timer_gettime F
 GLIBC_2.2 times F
 GLIBC_2.2 timezone D 0x4
 GLIBC_2.2 tmpfile F
@@ -2433,6 +2434,7 @@ GLIBC_2.34 thrd_join F
 GLIBC_2.34 timer_create F
 GLIBC_2.34 timer_delete F
 GLIBC_2.34 timer_getoverrun F
+GLIBC_2.34 timer_gettime F
 GLIBC_2.34 timespec_getres F
 GLIBC_2.34 tss_create F
 GLIBC_2.34 tss_delete F
diff --git a/sysdeps/unix/sysv/linux/sh/le/librt.abilist b/sysdeps/unix/sysv/linux/sh/le/librt.abilist
index 22e5dd0ec9..57ce681936 100644
--- a/sysdeps/unix/sysv/linux/sh/le/librt.abilist
+++ b/sysdeps/unix/sysv/linux/sh/le/librt.abilist
@@ -1,5 +1,4 @@
 GLIBC_2.1 __librt_version_placeholder F
-GLIBC_2.2 timer_gettime F
 GLIBC_2.2 timer_settime F
 GLIBC_2.3.4 __librt_version_placeholder F
 GLIBC_2.4 __librt_version_placeholder F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
index 36b056d6b1..9fae206d63 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
@@ -2063,6 +2063,7 @@ GLIBC_2.2 swscanf F
 GLIBC_2.2 timer_create F
 GLIBC_2.2 timer_delete F
 GLIBC_2.2 timer_getoverrun F
+GLIBC_2.2 timer_gettime F
 GLIBC_2.2 ungetwc F
 GLIBC_2.2 vfwprintf F
 GLIBC_2.2 vfwscanf F
@@ -2576,6 +2577,7 @@ GLIBC_2.34 thrd_join F
 GLIBC_2.34 timer_create F
 GLIBC_2.34 timer_delete F
 GLIBC_2.34 timer_getoverrun F
+GLIBC_2.34 timer_gettime F
 GLIBC_2.34 timespec_getres F
 GLIBC_2.34 tss_create F
 GLIBC_2.34 tss_delete F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/librt.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/librt.abilist
index b0c70d8b2a..e97dcb5e2a 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/librt.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/librt.abilist
@@ -1,5 +1,4 @@
 GLIBC_2.1 __librt_version_placeholder F
-GLIBC_2.2 timer_gettime F
 GLIBC_2.2 timer_settime F
 GLIBC_2.3 __librt_version_placeholder F
 GLIBC_2.3.4 __librt_version_placeholder F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/Versions b/sysdeps/unix/sysv/linux/sparc/sparc64/Versions
index d04738fafc..5e8f59ceae 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/Versions
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/Versions
@@ -14,7 +14,6 @@ libc {
 librt {
   GLIBC_2.3.3 {
     # Changed timer_t.
-    timer_gettime;
     timer_settime;
   }
 }
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
index 2a69656050..765fed310f 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
@@ -1794,6 +1794,7 @@ GLIBC_2.2 timelocal F
 GLIBC_2.2 timer_create F
 GLIBC_2.2 timer_delete F
 GLIBC_2.2 timer_getoverrun F
+GLIBC_2.2 timer_gettime F
 GLIBC_2.2 times F
 GLIBC_2.2 timezone D 0x8
 GLIBC_2.2 tmpfile F
@@ -2248,6 +2249,7 @@ GLIBC_2.3.3 sys_siglist D 0x208
 GLIBC_2.3.3 timer_create F
 GLIBC_2.3.3 timer_delete F
 GLIBC_2.3.3 timer_getoverrun F
+GLIBC_2.3.3 timer_gettime F
 GLIBC_2.3.4 __chk_fail F
 GLIBC_2.3.4 __fprintf_chk F
 GLIBC_2.3.4 __gets_chk F
@@ -2491,6 +2493,7 @@ GLIBC_2.34 thrd_join F
 GLIBC_2.34 timer_create F
 GLIBC_2.34 timer_delete F
 GLIBC_2.34 timer_getoverrun F
+GLIBC_2.34 timer_gettime F
 GLIBC_2.34 timespec_getres F
 GLIBC_2.34 tss_create F
 GLIBC_2.34 tss_delete F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/librt.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/librt.abilist
index 34d42d122b..a2de1ecd94 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/librt.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/librt.abilist
@@ -1,8 +1,6 @@
 GLIBC_2.1 __librt_version_placeholder F
-GLIBC_2.2 timer_gettime F
 GLIBC_2.2 timer_settime F
 GLIBC_2.3 __librt_version_placeholder F
-GLIBC_2.3.3 timer_gettime F
 GLIBC_2.3.3 timer_settime F
 GLIBC_2.3.4 __librt_version_placeholder F
 GLIBC_2.4 __librt_version_placeholder F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c b/sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c
deleted file mode 100644
index cea524bae5..0000000000
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c
+++ /dev/null
@@ -1 +0,0 @@
-#include <sysdeps/unix/sysv/linux/x86_64/timer_gettime.c>
diff --git a/sysdeps/unix/sysv/linux/timer_gettime.c b/sysdeps/unix/sysv/linux/timer_gettime.c
index 0b31324da7..099835b6bd 100644
--- a/sysdeps/unix/sysv/linux/timer_gettime.c
+++ b/sysdeps/unix/sysv/linux/timer_gettime.c
@@ -22,17 +22,19 @@
 #include <sysdep.h>
 #include <kernel-features.h>
 #include <kernel-posix-timers.h>
+#include <shlib-compat.h>
 
+#if !TIMER_T_WAS_INT_COMPAT
 int
 __timer_gettime64 (timer_t timerid, struct __itimerspec64 *value)
 {
   kernel_timer_t ktimerid = timerid_to_kernel_timer (timerid);
 
-#ifndef __NR_timer_gettime64
-# define __NR_timer_gettime64 __NR_timer_gettime
-#endif
+# ifndef __NR_timer_gettime64
+#  define __NR_timer_gettime64 __NR_timer_gettime
+# endif
   int ret = INLINE_SYSCALL_CALL (timer_gettime64, ktimerid, value);
-#ifndef __ASSUME_TIME64_SYSCALLS
+# ifndef __ASSUME_TIME64_SYSCALLS
   if (ret == 0 || errno != ENOSYS)
     return ret;
 
@@ -43,12 +45,18 @@ __timer_gettime64 (timer_t timerid, struct __itimerspec64 *value)
       value->it_interval = valid_timespec_to_timespec64 (its32.it_interval);
       value->it_value = valid_timespec_to_timespec64 (its32.it_value);
     }
-#endif
+# endif
   return ret;
 }
 
-#if __TIMESIZE != 64
-librt_hidden_def (__timer_gettime64)
+# if __TIMESIZE == 64
+versioned_symbol (libc, __timer_gettime64, timer_gettime, GLIBC_2_34);
+#  if OTHER_SHLIB_COMPAT (librt, GLIBC_2_2, GLIBC_2_34)
+compat_symbol (librt, __timer_gettime64, timer_gettime, GLIBC_2_2);
+#  endif
+
+# else /* __TIMESIZE != 64 */
+libc_hidden_def (__timer_gettime64)
 
 int
 __timer_gettime (timer_t timerid, struct itimerspec *value)
@@ -63,5 +71,39 @@ __timer_gettime (timer_t timerid, struct itimerspec *value)
 
   return retval;
 }
-#endif
-weak_alias (__timer_gettime, timer_gettime)
+versioned_symbol (libc, __timer_gettime, timer_gettime, GLIBC_2_34);
+
+#  if OTHER_SHLIB_COMPAT (librt, GLIBC_2_2, GLIBC_2_34)
+compat_symbol (librt, __timer_gettime, timer_gettime, GLIBC_2_2);
+#  endif
+# endif /* __TIMESIZE != 64 */
+
+#else /* TIMER_T_WAS_INT_COMPAT */
+
+extern __typeof (timer_gettime) __timer_gettime_new;
+libc_hidden_proto (__timer_gettime_new)
+
+int
+___timer_gettime_new (timer_t timerid, struct itimerspec *value)
+{
+  kernel_timer_t ktimerid = timerid_to_kernel_timer (timerid);
+
+  return INLINE_SYSCALL_CALL (timer_gettime, ktimerid, value);
+}
+versioned_symbol (libc, ___timer_gettime_new, timer_gettime, GLIBC_2_34);
+libc_hidden_ver (___timer_gettime_new, __timer_gettime_new)
+
+# if OTHER_SHLIB_COMPAT (librt, GLIBC_2_3_3, GLIBC_2_34)
+compat_symbol (librt, ___timer_gettime_new, timer_gettime, GLIBC_2_3_3);
+# endif
+
+# if OTHER_SHLIB_COMPAT (librt, GLIBC_2_2, GLIBC_2_3_3)
+int
+__timer_gettime_old (int timerid, struct itimerspec *value)
+{
+  return __timer_gettime_new (__timer_compat_list[timerid], value);
+}
+compat_symbol (librt, __timer_gettime_old, timer_gettime, GLIBC_2_2);
+# endif
+
+#endif /* TIMER_T_WAS_INT_COMPAT */
diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
index 0fc491c64d..ee6ede5ec0 100644
--- a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
@@ -1763,6 +1763,7 @@ GLIBC_2.2.5 timelocal F
 GLIBC_2.2.5 timer_create F
 GLIBC_2.2.5 timer_delete F
 GLIBC_2.2.5 timer_getoverrun F
+GLIBC_2.2.5 timer_gettime F
 GLIBC_2.2.5 times F
 GLIBC_2.2.5 timezone D 0x8
 GLIBC_2.2.5 tmpfile F
@@ -2202,6 +2203,7 @@ GLIBC_2.3.3 sys_siglist D 0x208
 GLIBC_2.3.3 timer_create F
 GLIBC_2.3.3 timer_delete F
 GLIBC_2.3.3 timer_getoverrun F
+GLIBC_2.3.3 timer_gettime F
 GLIBC_2.3.4 __chk_fail F
 GLIBC_2.3.4 __fprintf_chk F
 GLIBC_2.3.4 __gets_chk F
@@ -2447,6 +2449,7 @@ GLIBC_2.34 thrd_join F
 GLIBC_2.34 timer_create F
 GLIBC_2.34 timer_delete F
 GLIBC_2.34 timer_getoverrun F
+GLIBC_2.34 timer_gettime F
 GLIBC_2.34 timespec_getres F
 GLIBC_2.34 tss_create F
 GLIBC_2.34 tss_delete F
diff --git a/sysdeps/unix/sysv/linux/x86_64/64/librt.abilist b/sysdeps/unix/sysv/linux/x86_64/64/librt.abilist
index 379fa6930c..913835d267 100644
--- a/sysdeps/unix/sysv/linux/x86_64/64/librt.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/64/librt.abilist
@@ -1,6 +1,4 @@
-GLIBC_2.2.5 timer_gettime F
 GLIBC_2.2.5 timer_settime F
-GLIBC_2.3.3 timer_gettime F
 GLIBC_2.3.3 timer_settime F
 GLIBC_2.3.4 __librt_version_placeholder F
 GLIBC_2.4 __librt_version_placeholder F
diff --git a/sysdeps/unix/sysv/linux/x86_64/Versions b/sysdeps/unix/sysv/linux/x86_64/Versions
index a97b6c7413..8deeb8908a 100644
--- a/sysdeps/unix/sysv/linux/x86_64/Versions
+++ b/sysdeps/unix/sysv/linux/x86_64/Versions
@@ -11,7 +11,6 @@ libc {
 librt {
   GLIBC_2.3.3 {
     # Changed timer_t.
-    timer_gettime;
     timer_settime;
   }
 }
diff --git a/sysdeps/unix/sysv/linux/x86_64/timer_gettime.c b/sysdeps/unix/sysv/linux/x86_64/timer_gettime.c
deleted file mode 100644
index 06ccbc40bd..0000000000
--- a/sysdeps/unix/sysv/linux/x86_64/timer_gettime.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Copyright (C) 2003-2021 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
-
-   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; see the file COPYING.LIB.  If
-   not, see <https://www.gnu.org/licenses/>.  */
-
-#include <shlib-compat.h>
-#include <sysdep.h>
-#include <kernel-posix-timers.h>
-#include "compat-timer.h"
-
-int
-__timer_gettime_new (timer_t timerid, struct itimerspec *value)
-{
-  kernel_timer_t ktimerid = timerid_to_kernel_timer (timerid);
-
-  return INLINE_SYSCALL_CALL (timer_gettime, ktimerid, value);
-}
-versioned_symbol (librt, __timer_gettime_new, timer_gettime, GLIBC_2_3_3);
-
-
-#if SHLIB_COMPAT (librt, GLIBC_2_2, GLIBC_2_3_3)
-int
-__timer_gettime_old (int timerid, struct itimerspec *value)
-{
-  return __timer_gettime_new (__timer_compat_list[timerid], value);
-}
-compat_symbol (librt, __timer_gettime_old, timer_gettime, GLIBC_2_2);
-#endif
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
index a2d178081e..a37522d210 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
@@ -2014,6 +2014,7 @@ GLIBC_2.16 timelocal F
 GLIBC_2.16 timer_create F
 GLIBC_2.16 timer_delete F
 GLIBC_2.16 timer_getoverrun F
+GLIBC_2.16 timer_gettime F
 GLIBC_2.16 timerfd_create F
 GLIBC_2.16 timerfd_gettime F
 GLIBC_2.16 timerfd_settime F
@@ -2548,6 +2549,7 @@ GLIBC_2.34 thrd_join F
 GLIBC_2.34 timer_create F
 GLIBC_2.34 timer_delete F
 GLIBC_2.34 timer_getoverrun F
+GLIBC_2.34 timer_gettime F
 GLIBC_2.34 timespec_getres F
 GLIBC_2.34 tss_create F
 GLIBC_2.34 tss_delete F
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/librt.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/librt.abilist
index 0b969910ba..50f2032de7 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/librt.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/librt.abilist
@@ -1,2 +1 @@
-GLIBC_2.16 timer_gettime F
 GLIBC_2.16 timer_settime F
