a2cf7d
commit 7b5af2d8f2a2b858319a792678b15a0db08764c7
a2cf7d
Author: Zack Weinberg <zackw@panix.com>
a2cf7d
Date:   Wed Sep 4 08:18:57 2019 +0200
a2cf7d
a2cf7d
    Finish move of clock_* functions to libc. [BZ #24959]
a2cf7d
    
a2cf7d
    In glibc 2.17, the functions clock_getcpuclockid, clock_getres,
a2cf7d
    clock_gettime, clock_nanosleep, and clock_settime were moved from
a2cf7d
    librt.so to libc.so, leaving compatibility stubs behind.  Now that the
a2cf7d
    dynamic linker no longer insists on finding versioned symbols in the
a2cf7d
    same library that originally defined them, we do not need the stubs
a2cf7d
    anymore, and this means we don't need GLIBC_PRIVATE __-prefix aliases
a2cf7d
    for most of the functions anymore either.  (clock_gettime still needs
a2cf7d
    one.)  For ports added before 2.17, libc.so needs to provide two
a2cf7d
    symbol versions for each, the default at GLIBC_2.17 plus a compat
a2cf7d
    version matching what librt had.
a2cf7d
    
a2cf7d
    While I'm at it, move the clock_*.c files and their tests from rt/ to
a2cf7d
    time/.
a2cf7d
a2cf7d
 Conflicts:
a2cf7d
	rt/clock-compat.c
a2cf7d
	  (Removal after copyright year update upstream.)
a2cf7d
	sysdeps/unix/sysv/linux/arm/be/libc.abilist
a2cf7d
	sysdeps/unix/sysv/linux/arm/le/librt.abilist
a2cf7d
	sysdeps/unix/sysv/linux/microblaze/le/librt.abilist
a2cf7d
	sysdeps/unix/sysv/linux/sh/be/libc.abilist
a2cf7d
	sysdeps/unix/sysv/linux/sh/le/librt.abilist
a2cf7d
	  (These ABI lists were split into be/le variants upstream.
a2cf7d
	  The choice of files here reflects the decision of the Git
a2cf7d
	  rename detection for the source of the unsplit ABI list
a2cf7d
	  update.)
a2cf7d
	time/Makefile
a2cf7d
	  (Missing tests downstream.)
a2cf7d
a2cf7d
diff --git a/include/time.h b/include/time.h
a2cf7d
index 23d2580528b02490..832ee6896e1ca537 100644
a2cf7d
--- a/include/time.h
a2cf7d
+++ b/include/time.h
a2cf7d
@@ -16,12 +16,10 @@ libc_hidden_proto (localtime)
a2cf7d
 libc_hidden_proto (strftime)
a2cf7d
 libc_hidden_proto (strptime)
a2cf7d
 
a2cf7d
-extern __typeof (clock_getres) __clock_getres;
a2cf7d
 extern __typeof (clock_gettime) __clock_gettime;
a2cf7d
 libc_hidden_proto (__clock_gettime)
a2cf7d
 extern __typeof (clock_settime) __clock_settime;
a2cf7d
-extern __typeof (clock_nanosleep) __clock_nanosleep;
a2cf7d
-extern __typeof (clock_getcpuclockid) __clock_getcpuclockid;
a2cf7d
+libc_hidden_proto (__clock_settime)
a2cf7d
 
a2cf7d
 /* Now define the internal interfaces.  */
a2cf7d
 struct tm;
a2cf7d
diff --git a/rt/Makefile b/rt/Makefile
a2cf7d
index 14f38ef74d262188..de53133cedc778f6 100644
a2cf7d
--- a/rt/Makefile
a2cf7d
+++ b/rt/Makefile
a2cf7d
@@ -28,9 +28,6 @@ aio-routines   := aio_cancel aio_error aio_fsync aio_misc aio_read	\
a2cf7d
 		  aio_read64 aio_return aio_suspend aio_write		\
a2cf7d
 		  aio_write64 lio_listio lio_listio64 aio_sigqueue	\
a2cf7d
 		  aio_notify
a2cf7d
-clock-routines := clock_getcpuclockid					\
a2cf7d
-		  clock_getres clock_gettime clock_settime		\
a2cf7d
-		  clock_nanosleep
a2cf7d
 timer-routines := timer_create timer_delete timer_getoverr		\
a2cf7d
 		  timer_gettime timer_settime
a2cf7d
 shm-routines   := shm_open shm_unlink
a2cf7d
@@ -38,22 +35,18 @@ mq-routines    := mq_open mq_close mq_unlink mq_getattr mq_setattr	\
a2cf7d
 		  mq_notify mq_send mq_receive mq_timedsend		\
a2cf7d
 		  mq_timedreceive
a2cf7d
 
a2cf7d
-routines = $(clock-routines)
a2cf7d
-
a2cf7d
 librt-routines = $(aio-routines) \
a2cf7d
 		 $(timer-routines) \
a2cf7d
-		 $(shm-routines) $(mq-routines) \
a2cf7d
-		 clock-compat
a2cf7d
+		 $(shm-routines) $(mq-routines)
a2cf7d
 
a2cf7d
-tests := tst-shm tst-clock tst-clock_nanosleep tst-timer tst-timer2 \
a2cf7d
+tests := tst-shm tst-timer tst-timer2 \
a2cf7d
 	 tst-aio tst-aio64 tst-aio2 tst-aio3 tst-aio4 tst-aio5 tst-aio6 \
a2cf7d
 	 tst-aio7 tst-aio8 tst-aio9 tst-aio10 \
a2cf7d
 	 tst-mqueue1 tst-mqueue2 tst-mqueue3 tst-mqueue4 \
a2cf7d
 	 tst-mqueue5 tst-mqueue6 tst-mqueue7 tst-mqueue8 tst-mqueue9 \
a2cf7d
 	 tst-timer3 tst-timer4 tst-timer5 \
a2cf7d
-	 tst-cpuclock1 tst-cpuclock2 \
a2cf7d
-	 tst-cputimer1 tst-cputimer2 tst-cputimer3 \
a2cf7d
-	 tst-clock2 tst-shm-cancel
a2cf7d
+	 tst-cpuclock2 tst-cputimer1 tst-cputimer2 tst-cputimer3 \
a2cf7d
+	 tst-shm-cancel
a2cf7d
 
a2cf7d
 extra-libs := librt
a2cf7d
 extra-libs-others := $(extra-libs)
a2cf7d
diff --git a/rt/Versions b/rt/Versions
a2cf7d
index 91e3fd2a204ded9c..84d1345420dc4dc4 100644
a2cf7d
--- a/rt/Versions
a2cf7d
+++ b/rt/Versions
a2cf7d
@@ -1,15 +1,3 @@
a2cf7d
-libc {
a2cf7d
-  GLIBC_2.17 {
a2cf7d
-    # c*
a2cf7d
-    clock_getres; clock_gettime; clock_settime; clock_getcpuclockid;
a2cf7d
-    clock_nanosleep;
a2cf7d
-  }
a2cf7d
-  GLIBC_PRIVATE {
a2cf7d
-    __clock_getres; __clock_gettime; __clock_settime; __clock_getcpuclockid;
a2cf7d
-    __clock_nanosleep;
a2cf7d
-  }
a2cf7d
-}
a2cf7d
-
a2cf7d
 librt {
a2cf7d
   GLIBC_2.1 {
a2cf7d
     # AIO functions.
a2cf7d
@@ -18,10 +6,6 @@ librt {
a2cf7d
     aio_suspend64; aio_write; aio_write64; lio_listio; lio_listio64;
a2cf7d
   }
a2cf7d
   GLIBC_2.2 {
a2cf7d
-    # These have moved to libc and are still here only for compatibility.
a2cf7d
-    clock_getres; clock_gettime; clock_settime; clock_getcpuclockid;
a2cf7d
-    clock_nanosleep;
a2cf7d
-
a2cf7d
     # s*
a2cf7d
     shm_open; shm_unlink;
a2cf7d
 
a2cf7d
diff --git a/rt/clock-compat.c b/rt/clock-compat.c
a2cf7d
deleted file mode 100644
a2cf7d
index 11e71aa89019b173..0000000000000000
a2cf7d
--- a/rt/clock-compat.c
a2cf7d
+++ /dev/null
a2cf7d
@@ -1,63 +0,0 @@
a2cf7d
-/* ABI compatibility redirects for clock_* symbols in librt.
a2cf7d
-   Copyright (C) 2012-2018 Free Software Foundation, Inc.
a2cf7d
-   This file is part of the GNU C Library.
a2cf7d
-
a2cf7d
-   The GNU C Library is free software; you can redistribute it and/or
a2cf7d
-   modify it under the terms of the GNU Lesser General Public
a2cf7d
-   License as published by the Free Software Foundation; either
a2cf7d
-   version 2.1 of the License, or (at your option) any later version.
a2cf7d
-
a2cf7d
-   The GNU C Library is distributed in the hope that it will be useful,
a2cf7d
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
a2cf7d
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
a2cf7d
-   Lesser General Public License for more details.
a2cf7d
-
a2cf7d
-   You should have received a copy of the GNU Lesser General Public
a2cf7d
-   License along with the GNU C Library; if not, see
a2cf7d
-   <http://www.gnu.org/licenses/>.  */
a2cf7d
-
a2cf7d
-#include <shlib-compat.h>
a2cf7d
-
a2cf7d
-/* The clock_* symbols were originally defined in librt and so
a2cf7d
-   are part of its ABI.  As of 2.17, they have moved to libc.
a2cf7d
-   So we supply definitions for librt that just redirect to
a2cf7d
-   their libc counterparts.  */
a2cf7d
-
a2cf7d
-#if SHLIB_COMPAT (librt, GLIBC_2_2, GLIBC_2_17)
a2cf7d
-
a2cf7d
-#include <time.h>
a2cf7d
-
a2cf7d
-#if HAVE_IFUNC
a2cf7d
-# undef INIT_ARCH
a2cf7d
-# define INIT_ARCH()
a2cf7d
-# define COMPAT_REDIRECT(name, proto, arglist) libc_ifunc (name, &__##name) \
a2cf7d
-    compat_symbol (librt, name, name, GLIBC_2_2);
a2cf7d
-#else
a2cf7d
-# define COMPAT_REDIRECT(name, proto, arglist)				      \
a2cf7d
-  int									      \
a2cf7d
-  name proto								      \
a2cf7d
-  {									      \
a2cf7d
-    return __##name arglist;						      \
a2cf7d
-  }									      \
a2cf7d
-  compat_symbol (librt, name, name, GLIBC_2_2);
a2cf7d
-#endif
a2cf7d
-
a2cf7d
-COMPAT_REDIRECT (clock_getres,
a2cf7d
-		 (clockid_t clock_id, struct timespec *res),
a2cf7d
-		 (clock_id, res))
a2cf7d
-COMPAT_REDIRECT (clock_gettime,
a2cf7d
-		 (clockid_t clock_id, struct timespec *tp),
a2cf7d
-		 (clock_id, tp))
a2cf7d
-COMPAT_REDIRECT (clock_settime,
a2cf7d
-		 (clockid_t clock_id, const struct timespec *tp),
a2cf7d
-		 (clock_id, tp))
a2cf7d
-COMPAT_REDIRECT (clock_getcpuclockid,
a2cf7d
-		 (pid_t pid, clockid_t *clock_id),
a2cf7d
-		 (pid, clock_id))
a2cf7d
-COMPAT_REDIRECT (clock_nanosleep,
a2cf7d
-		 (clockid_t clock_id, int flags,
a2cf7d
-		  const struct timespec *req,
a2cf7d
-		  struct timespec *rem),
a2cf7d
-		 (clock_id, flags, req, rem))
a2cf7d
-
a2cf7d
-#endif
a2cf7d
diff --git a/sysdeps/mach/hurd/i386/libc.abilist b/sysdeps/mach/hurd/i386/libc.abilist
a2cf7d
index e3fc05137b18194b..f89ef9a43251c164 100644
a2cf7d
--- a/sysdeps/mach/hurd/i386/libc.abilist
a2cf7d
+++ b/sysdeps/mach/hurd/i386/libc.abilist
a2cf7d
@@ -711,6 +711,11 @@ GLIBC_2.2.6 clntudp_bufcreate F
a2cf7d
 GLIBC_2.2.6 clntudp_create F
a2cf7d
 GLIBC_2.2.6 clntunix_create F
a2cf7d
 GLIBC_2.2.6 clock F
a2cf7d
+GLIBC_2.2.6 clock_getcpuclockid F
a2cf7d
+GLIBC_2.2.6 clock_getres F
a2cf7d
+GLIBC_2.2.6 clock_gettime F
a2cf7d
+GLIBC_2.2.6 clock_nanosleep F
a2cf7d
+GLIBC_2.2.6 clock_settime F
a2cf7d
 GLIBC_2.2.6 close F
a2cf7d
 GLIBC_2.2.6 closedir F
a2cf7d
 GLIBC_2.2.6 closelog F
a2cf7d
diff --git a/sysdeps/mach/hurd/i386/librt.abilist b/sysdeps/mach/hurd/i386/librt.abilist
a2cf7d
index d5fe32b3a9917254..3726e41f06cc500c 100644
a2cf7d
--- a/sysdeps/mach/hurd/i386/librt.abilist
a2cf7d
+++ b/sysdeps/mach/hurd/i386/librt.abilist
a2cf7d
@@ -13,11 +13,6 @@ GLIBC_2.2.6 aio_suspend F
a2cf7d
 GLIBC_2.2.6 aio_suspend64 F
a2cf7d
 GLIBC_2.2.6 aio_write F
a2cf7d
 GLIBC_2.2.6 aio_write64 F
a2cf7d
-GLIBC_2.2.6 clock_getcpuclockid F
a2cf7d
-GLIBC_2.2.6 clock_getres F
a2cf7d
-GLIBC_2.2.6 clock_gettime F
a2cf7d
-GLIBC_2.2.6 clock_nanosleep F
a2cf7d
-GLIBC_2.2.6 clock_settime F
a2cf7d
 GLIBC_2.2.6 lio_listio F
a2cf7d
 GLIBC_2.2.6 lio_listio64 F
a2cf7d
 GLIBC_2.2.6 shm_open F
a2cf7d
diff --git a/sysdeps/posix/clock_getres.c b/sysdeps/posix/clock_getres.c
a2cf7d
index 5b0d8eb8a1a0593e..7408197420b14aad 100644
a2cf7d
--- a/sysdeps/posix/clock_getres.c
a2cf7d
+++ b/sysdeps/posix/clock_getres.c
a2cf7d
@@ -22,7 +22,7 @@
a2cf7d
 #include <unistd.h>
a2cf7d
 #include <sys/param.h>
a2cf7d
 #include <libc-internal.h>
a2cf7d
-
a2cf7d
+#include <shlib-compat.h>
a2cf7d
 
a2cf7d
 static inline int
a2cf7d
 realtime_getres (struct timespec *res)
a2cf7d
@@ -62,4 +62,11 @@ __clock_getres (clockid_t clock_id, struct timespec *res)
a2cf7d
 
a2cf7d
   return retval;
a2cf7d
 }
a2cf7d
-weak_alias (__clock_getres, clock_getres)
a2cf7d
+
a2cf7d
+versioned_symbol (libc, __clock_getres, clock_getres, GLIBC_2_17);
a2cf7d
+/* clock_getres moved to libc in version 2.17;
a2cf7d
+   old binaries may expect the symbol version it had in librt.  */
a2cf7d
+#if SHLIB_COMPAT (libc, GLIBC_2_2, GLIBC_2_17)
a2cf7d
+strong_alias (__clock_getres, __clock_getres_2);
a2cf7d
+compat_symbol (libc, __clock_getres_2, clock_getres, GLIBC_2_2);
a2cf7d
+#endif
a2cf7d
diff --git a/sysdeps/unix/clock_gettime.c b/sysdeps/unix/clock_gettime.c
a2cf7d
index f3ebbe15ccc2e95e..3ad8ea87bb7d379b 100644
a2cf7d
--- a/sysdeps/unix/clock_gettime.c
a2cf7d
+++ b/sysdeps/unix/clock_gettime.c
a2cf7d
@@ -17,24 +17,9 @@
a2cf7d
    <http://www.gnu.org/licenses/>.  */
a2cf7d
 
a2cf7d
 #include <errno.h>
a2cf7d
-#include <stdint.h>
a2cf7d
 #include <time.h>
a2cf7d
 #include <sys/time.h>
a2cf7d
-#include <libc-internal.h>
a2cf7d
-#include <ldsodefs.h>
a2cf7d
-
a2cf7d
-
a2cf7d
-static inline int
a2cf7d
-realtime_gettime (struct timespec *tp)
a2cf7d
-{
a2cf7d
-  struct timeval tv;
a2cf7d
-  int retval = __gettimeofday (&tv, NULL);
a2cf7d
-  if (retval == 0)
a2cf7d
-    /* Convert into `timespec'.  */
a2cf7d
-    TIMEVAL_TO_TIMESPEC (&tv, tp);
a2cf7d
-  return retval;
a2cf7d
-}
a2cf7d
-
a2cf7d
+#include <shlib-compat.h>
a2cf7d
 
a2cf7d
 /* Get current value of CLOCK and store it in TP.  */
a2cf7d
 int
a2cf7d
@@ -60,5 +45,12 @@ __clock_gettime (clockid_t clock_id, struct timespec *tp)
a2cf7d
 
a2cf7d
   return retval;
a2cf7d
 }
a2cf7d
-weak_alias (__clock_gettime, clock_gettime)
a2cf7d
 libc_hidden_def (__clock_gettime)
a2cf7d
+
a2cf7d
+versioned_symbol (libc, __clock_gettime, clock_gettime, GLIBC_2_17);
a2cf7d
+/* clock_gettime moved to libc in version 2.17;
a2cf7d
+   old binaries may expect the symbol version it had in librt.  */
a2cf7d
+#if SHLIB_COMPAT (libc, GLIBC_2_2, GLIBC_2_17)
a2cf7d
+strong_alias (__clock_gettime, __clock_gettime_2);
a2cf7d
+compat_symbol (libc, __clock_gettime_2, clock_gettime, GLIBC_2_2);
a2cf7d
+#endif
a2cf7d
diff --git a/sysdeps/unix/clock_nanosleep.c b/sysdeps/unix/clock_nanosleep.c
a2cf7d
index 13dd0f4b905ec631..6513e2d64614c561 100644
a2cf7d
--- a/sysdeps/unix/clock_nanosleep.c
a2cf7d
+++ b/sysdeps/unix/clock_nanosleep.c
a2cf7d
@@ -20,6 +20,7 @@
a2cf7d
 #include <errno.h>
a2cf7d
 #include <time.h>
a2cf7d
 #include <sysdep-cancel.h>
a2cf7d
+#include <shlib-compat.h>
a2cf7d
 
a2cf7d
 /* This implementation assumes that these is only a `nanosleep' system
a2cf7d
    call.  So we have to remap all other activities.  */
a2cf7d
@@ -76,4 +77,11 @@ __clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req,
a2cf7d
 
a2cf7d
   return __nanosleep (req, rem), 0 ? errno : 0;
a2cf7d
 }
a2cf7d
-weak_alias (__clock_nanosleep, clock_nanosleep)
a2cf7d
+
a2cf7d
+versioned_symbol (libc, __clock_nanosleep, clock_nanosleep, GLIBC_2_17);
a2cf7d
+/* clock_nanosleep moved to libc in version 2.17;
a2cf7d
+   old binaries may expect the symbol version it had in librt.  */
a2cf7d
+#if SHLIB_COMPAT (libc, GLIBC_2_2, GLIBC_2_17)
a2cf7d
+strong_alias (__clock_nanosleep, __clock_nanosleep_2);
a2cf7d
+compat_symbol (libc, __clock_nanosleep_2, clock_nanosleep, GLIBC_2_2);
a2cf7d
+#endif
a2cf7d
diff --git a/sysdeps/unix/clock_settime.c b/sysdeps/unix/clock_settime.c
a2cf7d
index 4f5640f67047cef6..123b6f44ee3831d9 100644
a2cf7d
--- a/sysdeps/unix/clock_settime.c
a2cf7d
+++ b/sysdeps/unix/clock_settime.c
a2cf7d
@@ -18,8 +18,7 @@
a2cf7d
 #include <errno.h>
a2cf7d
 #include <time.h>
a2cf7d
 #include <sys/time.h>
a2cf7d
-#include <ldsodefs.h>
a2cf7d
-
a2cf7d
+#include <shlib-compat.h>
a2cf7d
 
a2cf7d
 /* Set CLOCK to value TP.  */
a2cf7d
 int
a2cf7d
@@ -51,4 +50,12 @@ __clock_settime (clockid_t clock_id, const struct timespec *tp)
a2cf7d
 
a2cf7d
   return retval;
a2cf7d
 }
a2cf7d
-weak_alias (__clock_settime, clock_settime)
a2cf7d
+libc_hidden_def (__clock_settime)
a2cf7d
+
a2cf7d
+versioned_symbol (libc, __clock_settime, clock_settime, GLIBC_2_17);
a2cf7d
+/* clock_settime moved to libc in version 2.17;
a2cf7d
+   old binaries may expect the symbol version it had in librt.  */
a2cf7d
+#if SHLIB_COMPAT (libc, GLIBC_2_2, GLIBC_2_17)
a2cf7d
+strong_alias (__clock_settime, __clock_settime_2);
a2cf7d
+compat_symbol (libc, __clock_settime_2, clock_settime, GLIBC_2_2);
a2cf7d
+#endif
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/alpha/libc.abilist b/sysdeps/unix/sysv/linux/alpha/libc.abilist
a2cf7d
index e22b91655dd5f7e0..77f0432d0f1f5aab 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/alpha/libc.abilist
a2cf7d
+++ b/sysdeps/unix/sysv/linux/alpha/libc.abilist
a2cf7d
@@ -1863,6 +1863,11 @@ GLIBC_2.2 __xpg_sigpause F
a2cf7d
 GLIBC_2.2 _flushlbf F
a2cf7d
 GLIBC_2.2 _res_hconf D 0x48
a2cf7d
 GLIBC_2.2 bind_textdomain_codeset F
a2cf7d
+GLIBC_2.2 clock_getcpuclockid F
a2cf7d
+GLIBC_2.2 clock_getres F
a2cf7d
+GLIBC_2.2 clock_gettime F
a2cf7d
+GLIBC_2.2 clock_nanosleep F
a2cf7d
+GLIBC_2.2 clock_settime F
a2cf7d
 GLIBC_2.2 dcngettext F
a2cf7d
 GLIBC_2.2 dngettext F
a2cf7d
 GLIBC_2.2 fgetpos F
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/alpha/librt.abilist b/sysdeps/unix/sysv/linux/alpha/librt.abilist
a2cf7d
index d7a049cf600e2966..71f86e03ce67fd19 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/alpha/librt.abilist
a2cf7d
+++ b/sysdeps/unix/sysv/linux/alpha/librt.abilist
a2cf7d
@@ -15,11 +15,6 @@ GLIBC_2.1 aio_write F
a2cf7d
 GLIBC_2.1 aio_write64 F
a2cf7d
 GLIBC_2.1 lio_listio F
a2cf7d
 GLIBC_2.1 lio_listio64 F
a2cf7d
-GLIBC_2.2 clock_getcpuclockid F
a2cf7d
-GLIBC_2.2 clock_getres F
a2cf7d
-GLIBC_2.2 clock_gettime F
a2cf7d
-GLIBC_2.2 clock_nanosleep F
a2cf7d
-GLIBC_2.2 clock_settime F
a2cf7d
 GLIBC_2.2 shm_open F
a2cf7d
 GLIBC_2.2 shm_unlink F
a2cf7d
 GLIBC_2.2 timer_create F
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/arm/libc.abilist b/sysdeps/unix/sysv/linux/arm/libc.abilist
a2cf7d
index a231812eea6dc556..e748ec28912ce773 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/arm/libc.abilist
a2cf7d
+++ b/sysdeps/unix/sysv/linux/arm/libc.abilist
a2cf7d
@@ -759,6 +759,11 @@ GLIBC_2.4 clntudp_bufcreate F
a2cf7d
 GLIBC_2.4 clntudp_create F
a2cf7d
 GLIBC_2.4 clntunix_create F
a2cf7d
 GLIBC_2.4 clock F
a2cf7d
+GLIBC_2.4 clock_getcpuclockid F
a2cf7d
+GLIBC_2.4 clock_getres F
a2cf7d
+GLIBC_2.4 clock_gettime F
a2cf7d
+GLIBC_2.4 clock_nanosleep F
a2cf7d
+GLIBC_2.4 clock_settime F
a2cf7d
 GLIBC_2.4 clone F
a2cf7d
 GLIBC_2.4 close F
a2cf7d
 GLIBC_2.4 closedir F
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/arm/librt.abilist b/sysdeps/unix/sysv/linux/arm/librt.abilist
a2cf7d
index cfbbd2755765e720..3c0647b2516bb51d 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/arm/librt.abilist
a2cf7d
+++ b/sysdeps/unix/sysv/linux/arm/librt.abilist
a2cf7d
@@ -13,11 +13,6 @@ GLIBC_2.4 aio_suspend F
a2cf7d
 GLIBC_2.4 aio_suspend64 F
a2cf7d
 GLIBC_2.4 aio_write F
a2cf7d
 GLIBC_2.4 aio_write64 F
a2cf7d
-GLIBC_2.4 clock_getcpuclockid F
a2cf7d
-GLIBC_2.4 clock_getres F
a2cf7d
-GLIBC_2.4 clock_gettime F
a2cf7d
-GLIBC_2.4 clock_nanosleep F
a2cf7d
-GLIBC_2.4 clock_settime F
a2cf7d
 GLIBC_2.4 lio_listio F
a2cf7d
 GLIBC_2.4 lio_listio64 F
a2cf7d
 GLIBC_2.4 mq_close F
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/clock_getcpuclockid.c b/sysdeps/unix/sysv/linux/clock_getcpuclockid.c
a2cf7d
index 190a47950eb1d177..877f4f3c7916a534 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/clock_getcpuclockid.c
a2cf7d
+++ b/sysdeps/unix/sysv/linux/clock_getcpuclockid.c
a2cf7d
@@ -20,6 +20,7 @@
a2cf7d
 #include <time.h>
a2cf7d
 #include <unistd.h>
a2cf7d
 #include "kernel-posix-cpu-timers.h"
a2cf7d
+#include <shlib-compat.h>
a2cf7d
 
a2cf7d
 int
a2cf7d
 __clock_getcpuclockid (pid_t pid, clockid_t *clock_id)
a2cf7d
@@ -45,4 +46,11 @@ __clock_getcpuclockid (pid_t pid, clockid_t *clock_id)
a2cf7d
   else
a2cf7d
     return INTERNAL_SYSCALL_ERRNO (r, err);
a2cf7d
 }
a2cf7d
-weak_alias (__clock_getcpuclockid, clock_getcpuclockid)
a2cf7d
+
a2cf7d
+versioned_symbol (libc, __clock_getcpuclockid, clock_getcpuclockid, GLIBC_2_17);
a2cf7d
+/* clock_getcpuclockid moved to libc in version 2.17;
a2cf7d
+   old binaries may expect the symbol version it had in librt.  */
a2cf7d
+#if SHLIB_COMPAT (libc, GLIBC_2_2, GLIBC_2_17)
a2cf7d
+strong_alias (__clock_getcpuclockid, __clock_getcpuclockid_2);
a2cf7d
+compat_symbol (libc, __clock_getcpuclockid_2, clock_getcpuclockid, GLIBC_2_2);
a2cf7d
+#endif
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/clock_getres.c b/sysdeps/unix/sysv/linux/clock_getres.c
a2cf7d
index 2517e66910a79d93..1fbb638097ba4a80 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/clock_getres.c
a2cf7d
+++ b/sysdeps/unix/sysv/linux/clock_getres.c
a2cf7d
@@ -26,10 +26,19 @@
a2cf7d
 #endif
a2cf7d
 #include <sysdep-vdso.h>
a2cf7d
 
a2cf7d
+#include <shlib-compat.h>
a2cf7d
+
a2cf7d
 /* Get resolution of clock.  */
a2cf7d
 int
a2cf7d
 __clock_getres (clockid_t clock_id, struct timespec *res)
a2cf7d
 {
a2cf7d
   return INLINE_VSYSCALL (clock_getres, 2, clock_id, res);
a2cf7d
 }
a2cf7d
-weak_alias (__clock_getres, clock_getres)
a2cf7d
+
a2cf7d
+versioned_symbol (libc, __clock_getres, clock_getres, GLIBC_2_17);
a2cf7d
+/* clock_getres moved to libc in version 2.17;
a2cf7d
+   old binaries may expect the symbol version it had in librt.  */
a2cf7d
+#if SHLIB_COMPAT (libc, GLIBC_2_2, GLIBC_2_17)
a2cf7d
+strong_alias (__clock_getres, __clock_getres_2);
a2cf7d
+compat_symbol (libc, __clock_getres_2, clock_getres, GLIBC_2_2);
a2cf7d
+#endif
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/clock_gettime.c b/sysdeps/unix/sysv/linux/clock_gettime.c
a2cf7d
index dadfc518b74baea0..3f8feb37a1795306 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/clock_gettime.c
a2cf7d
+++ b/sysdeps/unix/sysv/linux/clock_gettime.c
a2cf7d
@@ -26,11 +26,20 @@
a2cf7d
 #endif
a2cf7d
 #include <sysdep-vdso.h>
a2cf7d
 
a2cf7d
+#include <shlib-compat.h>
a2cf7d
+
a2cf7d
 /* Get current value of CLOCK and store it in TP.  */
a2cf7d
 int
a2cf7d
 __clock_gettime (clockid_t clock_id, struct timespec *tp)
a2cf7d
 {
a2cf7d
   return INLINE_VSYSCALL (clock_gettime, 2, clock_id, tp);
a2cf7d
 }
a2cf7d
-weak_alias (__clock_gettime, clock_gettime)
a2cf7d
 libc_hidden_def (__clock_gettime)
a2cf7d
+
a2cf7d
+versioned_symbol (libc, __clock_gettime, clock_gettime, GLIBC_2_17);
a2cf7d
+/* clock_gettime moved to libc in version 2.17;
a2cf7d
+   old binaries may expect the symbol version it had in librt.  */
a2cf7d
+#if SHLIB_COMPAT (libc, GLIBC_2_2, GLIBC_2_17)
a2cf7d
+strong_alias (__clock_gettime, __clock_gettime_2);
a2cf7d
+compat_symbol (libc, __clock_gettime_2, clock_gettime, GLIBC_2_2);
a2cf7d
+#endif
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/clock_nanosleep.c b/sysdeps/unix/sysv/linux/clock_nanosleep.c
a2cf7d
index 93d5d6ef120ca9ef..a90da63069b7f0f8 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/clock_nanosleep.c
a2cf7d
+++ b/sysdeps/unix/sysv/linux/clock_nanosleep.c
a2cf7d
@@ -21,6 +21,7 @@
a2cf7d
 #include <sysdep-cancel.h>
a2cf7d
 #include "kernel-posix-cpu-timers.h"
a2cf7d
 
a2cf7d
+#include <shlib-compat.h>
a2cf7d
 
a2cf7d
 /* We can simply use the syscall.  The CPU clocks are not supported
a2cf7d
    with this function.  */
a2cf7d
@@ -51,4 +52,11 @@ __clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req,
a2cf7d
   return (INTERNAL_SYSCALL_ERROR_P (r, err)
a2cf7d
 	  ? INTERNAL_SYSCALL_ERRNO (r, err) : 0);
a2cf7d
 }
a2cf7d
-weak_alias (__clock_nanosleep, clock_nanosleep)
a2cf7d
+
a2cf7d
+versioned_symbol (libc, __clock_nanosleep, clock_nanosleep, GLIBC_2_17);
a2cf7d
+/* clock_nanosleep moved to libc in version 2.17;
a2cf7d
+   old binaries may expect the symbol version it had in librt.  */
a2cf7d
+#if SHLIB_COMPAT (libc, GLIBC_2_2, GLIBC_2_17)
a2cf7d
+strong_alias (__clock_nanosleep, __clock_nanosleep_2);
a2cf7d
+compat_symbol (libc, __clock_nanosleep_2, clock_nanosleep, GLIBC_2_2);
a2cf7d
+#endif
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/clock_settime.c b/sysdeps/unix/sysv/linux/clock_settime.c
a2cf7d
index c71461a4f6deac5a..21efc6c982c084b4 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/clock_settime.c
a2cf7d
+++ b/sysdeps/unix/sysv/linux/clock_settime.c
a2cf7d
@@ -18,6 +18,7 @@
a2cf7d
 #include <errno.h>
a2cf7d
 #include <sysdep.h>
a2cf7d
 #include <time.h>
a2cf7d
+#include <shlib-compat.h>
a2cf7d
 
a2cf7d
 #include "kernel-posix-cpu-timers.h"
a2cf7d
 
a2cf7d
@@ -34,4 +35,12 @@ __clock_settime (clockid_t clock_id, const struct timespec *tp)
a2cf7d
 
a2cf7d
   return INLINE_SYSCALL_CALL (clock_settime, clock_id, tp);
a2cf7d
 }
a2cf7d
-weak_alias (__clock_settime, clock_settime)
a2cf7d
+libc_hidden_def (__clock_settime)
a2cf7d
+
a2cf7d
+versioned_symbol (libc, __clock_settime, clock_settime, GLIBC_2_17);
a2cf7d
+/* clock_settime moved to libc in version 2.17;
a2cf7d
+   old binaries may expect the symbol version it had in librt.  */
a2cf7d
+#if SHLIB_COMPAT (libc, GLIBC_2_2, GLIBC_2_17)
a2cf7d
+strong_alias (__clock_settime, __clock_settime_2);
a2cf7d
+compat_symbol (libc, __clock_settime_2, clock_settime, GLIBC_2_2);
a2cf7d
+#endif
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/hppa/libc.abilist b/sysdeps/unix/sysv/linux/hppa/libc.abilist
a2cf7d
index 24b11b15c0e71140..d34f040d85cc5bb2 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/hppa/libc.abilist
a2cf7d
+++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist
a2cf7d
@@ -615,6 +615,11 @@ GLIBC_2.2 clntudp_bufcreate F
a2cf7d
 GLIBC_2.2 clntudp_create F
a2cf7d
 GLIBC_2.2 clntunix_create F
a2cf7d
 GLIBC_2.2 clock F
a2cf7d
+GLIBC_2.2 clock_getcpuclockid F
a2cf7d
+GLIBC_2.2 clock_getres F
a2cf7d
+GLIBC_2.2 clock_gettime F
a2cf7d
+GLIBC_2.2 clock_nanosleep F
a2cf7d
+GLIBC_2.2 clock_settime F
a2cf7d
 GLIBC_2.2 clone F
a2cf7d
 GLIBC_2.2 close F
a2cf7d
 GLIBC_2.2 closedir F
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/hppa/librt.abilist b/sysdeps/unix/sysv/linux/hppa/librt.abilist
a2cf7d
index 595f1b712a4e8d70..bb03781dcc04d219 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/hppa/librt.abilist
a2cf7d
+++ b/sysdeps/unix/sysv/linux/hppa/librt.abilist
a2cf7d
@@ -15,11 +15,6 @@ GLIBC_2.1 aio_write F
a2cf7d
 GLIBC_2.1 aio_write64 F
a2cf7d
 GLIBC_2.1 lio_listio F
a2cf7d
 GLIBC_2.1 lio_listio64 F
a2cf7d
-GLIBC_2.2 clock_getcpuclockid F
a2cf7d
-GLIBC_2.2 clock_getres F
a2cf7d
-GLIBC_2.2 clock_gettime F
a2cf7d
-GLIBC_2.2 clock_nanosleep F
a2cf7d
-GLIBC_2.2 clock_settime F
a2cf7d
 GLIBC_2.2 shm_open F
a2cf7d
 GLIBC_2.2 shm_unlink F
a2cf7d
 GLIBC_2.2 timer_create F
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist
a2cf7d
index 9762c81365b0abcd..48e838fc2813df0d 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/i386/libc.abilist
a2cf7d
+++ b/sysdeps/unix/sysv/linux/i386/libc.abilist
a2cf7d
@@ -1869,6 +1869,11 @@ GLIBC_2.2 _flushlbf F
a2cf7d
 GLIBC_2.2 _res_hconf D 0x30
a2cf7d
 GLIBC_2.2 alphasort64 F
a2cf7d
 GLIBC_2.2 bind_textdomain_codeset F
a2cf7d
+GLIBC_2.2 clock_getcpuclockid F
a2cf7d
+GLIBC_2.2 clock_getres F
a2cf7d
+GLIBC_2.2 clock_gettime F
a2cf7d
+GLIBC_2.2 clock_nanosleep F
a2cf7d
+GLIBC_2.2 clock_settime F
a2cf7d
 GLIBC_2.2 dcngettext F
a2cf7d
 GLIBC_2.2 dngettext F
a2cf7d
 GLIBC_2.2 fgetpos F
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/i386/librt.abilist b/sysdeps/unix/sysv/linux/i386/librt.abilist
a2cf7d
index 595f1b712a4e8d70..bb03781dcc04d219 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/i386/librt.abilist
a2cf7d
+++ b/sysdeps/unix/sysv/linux/i386/librt.abilist
a2cf7d
@@ -15,11 +15,6 @@ GLIBC_2.1 aio_write F
a2cf7d
 GLIBC_2.1 aio_write64 F
a2cf7d
 GLIBC_2.1 lio_listio F
a2cf7d
 GLIBC_2.1 lio_listio64 F
a2cf7d
-GLIBC_2.2 clock_getcpuclockid F
a2cf7d
-GLIBC_2.2 clock_getres F
a2cf7d
-GLIBC_2.2 clock_gettime F
a2cf7d
-GLIBC_2.2 clock_nanosleep F
a2cf7d
-GLIBC_2.2 clock_settime F
a2cf7d
 GLIBC_2.2 shm_open F
a2cf7d
 GLIBC_2.2 shm_unlink F
a2cf7d
 GLIBC_2.2 timer_create F
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/ia64/libc.abilist b/sysdeps/unix/sysv/linux/ia64/libc.abilist
a2cf7d
index 50c94adff93b5bb4..e9fe0697b784be64 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/ia64/libc.abilist
a2cf7d
+++ b/sysdeps/unix/sysv/linux/ia64/libc.abilist
a2cf7d
@@ -627,6 +627,11 @@ GLIBC_2.2 clntudp_bufcreate F
a2cf7d
 GLIBC_2.2 clntudp_create F
a2cf7d
 GLIBC_2.2 clntunix_create F
a2cf7d
 GLIBC_2.2 clock F
a2cf7d
+GLIBC_2.2 clock_getcpuclockid F
a2cf7d
+GLIBC_2.2 clock_getres F
a2cf7d
+GLIBC_2.2 clock_gettime F
a2cf7d
+GLIBC_2.2 clock_nanosleep F
a2cf7d
+GLIBC_2.2 clock_settime F
a2cf7d
 GLIBC_2.2 close F
a2cf7d
 GLIBC_2.2 closedir F
a2cf7d
 GLIBC_2.2 closelog F
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/ia64/librt.abilist b/sysdeps/unix/sysv/linux/ia64/librt.abilist
a2cf7d
index 804622a14abd8ea9..08384c906518837d 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/ia64/librt.abilist
a2cf7d
+++ b/sysdeps/unix/sysv/linux/ia64/librt.abilist
a2cf7d
@@ -15,11 +15,6 @@ GLIBC_2.1 aio_write F
a2cf7d
 GLIBC_2.1 aio_write64 F
a2cf7d
 GLIBC_2.1 lio_listio F
a2cf7d
 GLIBC_2.1 lio_listio64 F
a2cf7d
-GLIBC_2.2 clock_getcpuclockid F
a2cf7d
-GLIBC_2.2 clock_getres F
a2cf7d
-GLIBC_2.2 clock_gettime F
a2cf7d
-GLIBC_2.2 clock_nanosleep F
a2cf7d
-GLIBC_2.2 clock_settime F
a2cf7d
 GLIBC_2.2 shm_open F
a2cf7d
 GLIBC_2.2 shm_unlink F
a2cf7d
 GLIBC_2.2 timer_create F
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
a2cf7d
index f57be98e494d0701..98f07b79918d1c17 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
a2cf7d
+++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
a2cf7d
@@ -748,6 +748,11 @@ GLIBC_2.4 clntudp_bufcreate F
a2cf7d
 GLIBC_2.4 clntudp_create F
a2cf7d
 GLIBC_2.4 clntunix_create F
a2cf7d
 GLIBC_2.4 clock F
a2cf7d
+GLIBC_2.4 clock_getcpuclockid F
a2cf7d
+GLIBC_2.4 clock_getres F
a2cf7d
+GLIBC_2.4 clock_gettime F
a2cf7d
+GLIBC_2.4 clock_nanosleep F
a2cf7d
+GLIBC_2.4 clock_settime F
a2cf7d
 GLIBC_2.4 clone F
a2cf7d
 GLIBC_2.4 close F
a2cf7d
 GLIBC_2.4 closedir F
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/librt.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/librt.abilist
a2cf7d
index cfbbd2755765e720..3c0647b2516bb51d 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/m68k/coldfire/librt.abilist
a2cf7d
+++ b/sysdeps/unix/sysv/linux/m68k/coldfire/librt.abilist
a2cf7d
@@ -13,11 +13,6 @@ GLIBC_2.4 aio_suspend F
a2cf7d
 GLIBC_2.4 aio_suspend64 F
a2cf7d
 GLIBC_2.4 aio_write F
a2cf7d
 GLIBC_2.4 aio_write64 F
a2cf7d
-GLIBC_2.4 clock_getcpuclockid F
a2cf7d
-GLIBC_2.4 clock_getres F
a2cf7d
-GLIBC_2.4 clock_gettime F
a2cf7d
-GLIBC_2.4 clock_nanosleep F
a2cf7d
-GLIBC_2.4 clock_settime F
a2cf7d
 GLIBC_2.4 lio_listio F
a2cf7d
 GLIBC_2.4 lio_listio64 F
a2cf7d
 GLIBC_2.4 mq_close F
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
a2cf7d
index ddc7ebca673a466c..6a60d7876120f2f2 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
a2cf7d
+++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
a2cf7d
@@ -1825,6 +1825,11 @@ GLIBC_2.2 _flushlbf F
a2cf7d
 GLIBC_2.2 _res_hconf D 0x30
a2cf7d
 GLIBC_2.2 alphasort64 F
a2cf7d
 GLIBC_2.2 bind_textdomain_codeset F
a2cf7d
+GLIBC_2.2 clock_getcpuclockid F
a2cf7d
+GLIBC_2.2 clock_getres F
a2cf7d
+GLIBC_2.2 clock_gettime F
a2cf7d
+GLIBC_2.2 clock_nanosleep F
a2cf7d
+GLIBC_2.2 clock_settime F
a2cf7d
 GLIBC_2.2 dcngettext F
a2cf7d
 GLIBC_2.2 dngettext F
a2cf7d
 GLIBC_2.2 fgetpos F
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/librt.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/librt.abilist
a2cf7d
index 595f1b712a4e8d70..bb03781dcc04d219 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/m68k/m680x0/librt.abilist
a2cf7d
+++ b/sysdeps/unix/sysv/linux/m68k/m680x0/librt.abilist
a2cf7d
@@ -15,11 +15,6 @@ GLIBC_2.1 aio_write F
a2cf7d
 GLIBC_2.1 aio_write64 F
a2cf7d
 GLIBC_2.1 lio_listio F
a2cf7d
 GLIBC_2.1 lio_listio64 F
a2cf7d
-GLIBC_2.2 clock_getcpuclockid F
a2cf7d
-GLIBC_2.2 clock_getres F
a2cf7d
-GLIBC_2.2 clock_gettime F
a2cf7d
-GLIBC_2.2 clock_nanosleep F
a2cf7d
-GLIBC_2.2 clock_settime F
a2cf7d
 GLIBC_2.2 shm_open F
a2cf7d
 GLIBC_2.2 shm_unlink F
a2cf7d
 GLIBC_2.2 timer_create F
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/microblaze/librt.abilist b/sysdeps/unix/sysv/linux/microblaze/librt.abilist
a2cf7d
index fb85d8729e1bc69d..889dfbc0eef5e75a 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/microblaze/librt.abilist
a2cf7d
+++ b/sysdeps/unix/sysv/linux/microblaze/librt.abilist
a2cf7d
@@ -14,11 +14,6 @@ GLIBC_2.18 aio_suspend F
a2cf7d
 GLIBC_2.18 aio_suspend64 F
a2cf7d
 GLIBC_2.18 aio_write F
a2cf7d
 GLIBC_2.18 aio_write64 F
a2cf7d
-GLIBC_2.18 clock_getcpuclockid F
a2cf7d
-GLIBC_2.18 clock_getres F
a2cf7d
-GLIBC_2.18 clock_gettime F
a2cf7d
-GLIBC_2.18 clock_nanosleep F
a2cf7d
-GLIBC_2.18 clock_settime F
a2cf7d
 GLIBC_2.18 lio_listio F
a2cf7d
 GLIBC_2.18 lio_listio64 F
a2cf7d
 GLIBC_2.18 mq_close F
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
a2cf7d
index dda9797e0ea736f6..34a24582ca7a4a08 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
a2cf7d
+++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
a2cf7d
@@ -1612,6 +1612,11 @@ GLIBC_2.2 capget F
a2cf7d
 GLIBC_2.2 capset F
a2cf7d
 GLIBC_2.2 cbc_crypt F
a2cf7d
 GLIBC_2.2 clntunix_create F
a2cf7d
+GLIBC_2.2 clock_getcpuclockid F
a2cf7d
+GLIBC_2.2 clock_getres F
a2cf7d
+GLIBC_2.2 clock_gettime F
a2cf7d
+GLIBC_2.2 clock_nanosleep F
a2cf7d
+GLIBC_2.2 clock_settime F
a2cf7d
 GLIBC_2.2 creat64 F
a2cf7d
 GLIBC_2.2 dcngettext F
a2cf7d
 GLIBC_2.2 des_setparity F
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/librt.abilist b/sysdeps/unix/sysv/linux/mips/mips32/librt.abilist
a2cf7d
index 84837c8a2ef02e1b..1539c1cef92bccfd 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/mips/mips32/librt.abilist
a2cf7d
+++ b/sysdeps/unix/sysv/linux/mips/mips32/librt.abilist
a2cf7d
@@ -13,11 +13,6 @@ GLIBC_2.2 aio_suspend F
a2cf7d
 GLIBC_2.2 aio_suspend64 F
a2cf7d
 GLIBC_2.2 aio_write F
a2cf7d
 GLIBC_2.2 aio_write64 F
a2cf7d
-GLIBC_2.2 clock_getcpuclockid F
a2cf7d
-GLIBC_2.2 clock_getres F
a2cf7d
-GLIBC_2.2 clock_gettime F
a2cf7d
-GLIBC_2.2 clock_nanosleep F
a2cf7d
-GLIBC_2.2 clock_settime F
a2cf7d
 GLIBC_2.2 lio_listio F
a2cf7d
 GLIBC_2.2 lio_listio64 F
a2cf7d
 GLIBC_2.2 shm_open F
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
a2cf7d
index 42e930d56595083e..176a57298a45d492 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
a2cf7d
+++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
a2cf7d
@@ -1610,6 +1610,11 @@ GLIBC_2.2 capget F
a2cf7d
 GLIBC_2.2 capset F
a2cf7d
 GLIBC_2.2 cbc_crypt F
a2cf7d
 GLIBC_2.2 clntunix_create F
a2cf7d
+GLIBC_2.2 clock_getcpuclockid F
a2cf7d
+GLIBC_2.2 clock_getres F
a2cf7d
+GLIBC_2.2 clock_gettime F
a2cf7d
+GLIBC_2.2 clock_nanosleep F
a2cf7d
+GLIBC_2.2 clock_settime F
a2cf7d
 GLIBC_2.2 creat64 F
a2cf7d
 GLIBC_2.2 dcngettext F
a2cf7d
 GLIBC_2.2 des_setparity F
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/librt.abilist b/sysdeps/unix/sysv/linux/mips/mips64/librt.abilist
a2cf7d
index 84837c8a2ef02e1b..1539c1cef92bccfd 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/mips/mips64/librt.abilist
a2cf7d
+++ b/sysdeps/unix/sysv/linux/mips/mips64/librt.abilist
a2cf7d
@@ -13,11 +13,6 @@ GLIBC_2.2 aio_suspend F
a2cf7d
 GLIBC_2.2 aio_suspend64 F
a2cf7d
 GLIBC_2.2 aio_write F
a2cf7d
 GLIBC_2.2 aio_write64 F
a2cf7d
-GLIBC_2.2 clock_getcpuclockid F
a2cf7d
-GLIBC_2.2 clock_getres F
a2cf7d
-GLIBC_2.2 clock_gettime F
a2cf7d
-GLIBC_2.2 clock_nanosleep F
a2cf7d
-GLIBC_2.2 clock_settime F
a2cf7d
 GLIBC_2.2 lio_listio F
a2cf7d
 GLIBC_2.2 lio_listio64 F
a2cf7d
 GLIBC_2.2 shm_open F
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
a2cf7d
index f89b44f3a14d0f85..5a66ffd67e5cf364 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
a2cf7d
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
a2cf7d
@@ -1611,6 +1611,11 @@ GLIBC_2.2 capget F
a2cf7d
 GLIBC_2.2 capset F
a2cf7d
 GLIBC_2.2 cbc_crypt F
a2cf7d
 GLIBC_2.2 clntunix_create F
a2cf7d
+GLIBC_2.2 clock_getcpuclockid F
a2cf7d
+GLIBC_2.2 clock_getres F
a2cf7d
+GLIBC_2.2 clock_gettime F
a2cf7d
+GLIBC_2.2 clock_nanosleep F
a2cf7d
+GLIBC_2.2 clock_settime F
a2cf7d
 GLIBC_2.2 creat64 F
a2cf7d
 GLIBC_2.2 dcngettext F
a2cf7d
 GLIBC_2.2 des_setparity F
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
a2cf7d
index 1486af11d755d37e..a817f33695a5230f 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
a2cf7d
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
a2cf7d
@@ -1607,6 +1607,11 @@ GLIBC_2.2 capget F
a2cf7d
 GLIBC_2.2 capset F
a2cf7d
 GLIBC_2.2 cbc_crypt F
a2cf7d
 GLIBC_2.2 clntunix_create F
a2cf7d
+GLIBC_2.2 clock_getcpuclockid F
a2cf7d
+GLIBC_2.2 clock_getres F
a2cf7d
+GLIBC_2.2 clock_gettime F
a2cf7d
+GLIBC_2.2 clock_nanosleep F
a2cf7d
+GLIBC_2.2 clock_settime F
a2cf7d
 GLIBC_2.2 creat64 F
a2cf7d
 GLIBC_2.2 dcngettext F
a2cf7d
 GLIBC_2.2 des_setparity F
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
a2cf7d
index 45839ed25b0fde5f..d5e121b76e583f4c 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
a2cf7d
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
a2cf7d
@@ -1830,6 +1830,11 @@ GLIBC_2.2 __xstat64 F
a2cf7d
 GLIBC_2.2 _flushlbf F
a2cf7d
 GLIBC_2.2 _res_hconf D 0x30
a2cf7d
 GLIBC_2.2 bind_textdomain_codeset F
a2cf7d
+GLIBC_2.2 clock_getcpuclockid F
a2cf7d
+GLIBC_2.2 clock_getres F
a2cf7d
+GLIBC_2.2 clock_gettime F
a2cf7d
+GLIBC_2.2 clock_nanosleep F
a2cf7d
+GLIBC_2.2 clock_settime F
a2cf7d
 GLIBC_2.2 dcngettext F
a2cf7d
 GLIBC_2.2 dngettext F
a2cf7d
 GLIBC_2.2 fgetpos F
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/librt.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/librt.abilist
a2cf7d
index 595f1b712a4e8d70..bb03781dcc04d219 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/librt.abilist
a2cf7d
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/librt.abilist
a2cf7d
@@ -15,11 +15,6 @@ GLIBC_2.1 aio_write F
a2cf7d
 GLIBC_2.1 aio_write64 F
a2cf7d
 GLIBC_2.1 lio_listio F
a2cf7d
 GLIBC_2.1 lio_listio64 F
a2cf7d
-GLIBC_2.2 clock_getcpuclockid F
a2cf7d
-GLIBC_2.2 clock_getres F
a2cf7d
-GLIBC_2.2 clock_gettime F
a2cf7d
-GLIBC_2.2 clock_nanosleep F
a2cf7d
-GLIBC_2.2 clock_settime F
a2cf7d
 GLIBC_2.2 shm_open F
a2cf7d
 GLIBC_2.2 shm_unlink F
a2cf7d
 GLIBC_2.2 timer_create F
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
a2cf7d
index 344e5ae87c5d76b2..3dfddbddb3a11180 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
a2cf7d
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
a2cf7d
@@ -1834,6 +1834,11 @@ GLIBC_2.2 __xstat64 F
a2cf7d
 GLIBC_2.2 _flushlbf F
a2cf7d
 GLIBC_2.2 _res_hconf D 0x30
a2cf7d
 GLIBC_2.2 bind_textdomain_codeset F
a2cf7d
+GLIBC_2.2 clock_getcpuclockid F
a2cf7d
+GLIBC_2.2 clock_getres F
a2cf7d
+GLIBC_2.2 clock_gettime F
a2cf7d
+GLIBC_2.2 clock_nanosleep F
a2cf7d
+GLIBC_2.2 clock_settime F
a2cf7d
 GLIBC_2.2 dcngettext F
a2cf7d
 GLIBC_2.2 dngettext F
a2cf7d
 GLIBC_2.2 fgetpos F
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist
a2cf7d
index 8c1781adf49a7432..06ce341194a37dd4 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist
a2cf7d
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist
a2cf7d
@@ -670,6 +670,11 @@ GLIBC_2.3 clntudp_bufcreate F
a2cf7d
 GLIBC_2.3 clntudp_create F
a2cf7d
 GLIBC_2.3 clntunix_create F
a2cf7d
 GLIBC_2.3 clock F
a2cf7d
+GLIBC_2.3 clock_getcpuclockid F
a2cf7d
+GLIBC_2.3 clock_getres F
a2cf7d
+GLIBC_2.3 clock_gettime F
a2cf7d
+GLIBC_2.3 clock_nanosleep F
a2cf7d
+GLIBC_2.3 clock_settime F
a2cf7d
 GLIBC_2.3 clone F
a2cf7d
 GLIBC_2.3 close F
a2cf7d
 GLIBC_2.3 closedir F
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/librt.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/librt.abilist
a2cf7d
index e76b7eb49566718b..6a5bd96963e67109 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/librt.abilist
a2cf7d
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/librt.abilist
a2cf7d
@@ -13,11 +13,6 @@ GLIBC_2.3 aio_suspend F
a2cf7d
 GLIBC_2.3 aio_suspend64 F
a2cf7d
 GLIBC_2.3 aio_write F
a2cf7d
 GLIBC_2.3 aio_write64 F
a2cf7d
-GLIBC_2.3 clock_getcpuclockid F
a2cf7d
-GLIBC_2.3 clock_getres F
a2cf7d
-GLIBC_2.3 clock_gettime F
a2cf7d
-GLIBC_2.3 clock_nanosleep F
a2cf7d
-GLIBC_2.3 clock_settime F
a2cf7d
 GLIBC_2.3 lio_listio F
a2cf7d
 GLIBC_2.3 lio_listio64 F
a2cf7d
 GLIBC_2.3 shm_open F
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
a2cf7d
index 3a5ec2a1e47b5da5..02ff949c33197774 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
a2cf7d
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
a2cf7d
@@ -1829,6 +1829,11 @@ GLIBC_2.2 _flushlbf F
a2cf7d
 GLIBC_2.2 _res_hconf D 0x30
a2cf7d
 GLIBC_2.2 alphasort64 F
a2cf7d
 GLIBC_2.2 bind_textdomain_codeset F
a2cf7d
+GLIBC_2.2 clock_getcpuclockid F
a2cf7d
+GLIBC_2.2 clock_getres F
a2cf7d
+GLIBC_2.2 clock_gettime F
a2cf7d
+GLIBC_2.2 clock_nanosleep F
a2cf7d
+GLIBC_2.2 clock_settime F
a2cf7d
 GLIBC_2.2 dcngettext F
a2cf7d
 GLIBC_2.2 dngettext F
a2cf7d
 GLIBC_2.2 fgetpos F
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/librt.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/librt.abilist
a2cf7d
index 595f1b712a4e8d70..bb03781dcc04d219 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/s390/s390-32/librt.abilist
a2cf7d
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/librt.abilist
a2cf7d
@@ -15,11 +15,6 @@ GLIBC_2.1 aio_write F
a2cf7d
 GLIBC_2.1 aio_write64 F
a2cf7d
 GLIBC_2.1 lio_listio F
a2cf7d
 GLIBC_2.1 lio_listio64 F
a2cf7d
-GLIBC_2.2 clock_getcpuclockid F
a2cf7d
-GLIBC_2.2 clock_getres F
a2cf7d
-GLIBC_2.2 clock_gettime F
a2cf7d
-GLIBC_2.2 clock_nanosleep F
a2cf7d
-GLIBC_2.2 clock_settime F
a2cf7d
 GLIBC_2.2 shm_open F
a2cf7d
 GLIBC_2.2 shm_unlink F
a2cf7d
 GLIBC_2.2 timer_create F
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
a2cf7d
index 3b5465558b72f166..96693d41df267e1b 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
a2cf7d
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
a2cf7d
@@ -632,6 +632,11 @@ GLIBC_2.2 clntudp_bufcreate F
a2cf7d
 GLIBC_2.2 clntudp_create F
a2cf7d
 GLIBC_2.2 clntunix_create F
a2cf7d
 GLIBC_2.2 clock F
a2cf7d
+GLIBC_2.2 clock_getcpuclockid F
a2cf7d
+GLIBC_2.2 clock_getres F
a2cf7d
+GLIBC_2.2 clock_gettime F
a2cf7d
+GLIBC_2.2 clock_nanosleep F
a2cf7d
+GLIBC_2.2 clock_settime F
a2cf7d
 GLIBC_2.2 clone F
a2cf7d
 GLIBC_2.2 close F
a2cf7d
 GLIBC_2.2 closedir F
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/librt.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/librt.abilist
a2cf7d
index 41be3bb84b6e4df0..5905498a488359d7 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/s390/s390-64/librt.abilist
a2cf7d
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/librt.abilist
a2cf7d
@@ -13,11 +13,6 @@ GLIBC_2.2 aio_suspend F
a2cf7d
 GLIBC_2.2 aio_suspend64 F
a2cf7d
 GLIBC_2.2 aio_write F
a2cf7d
 GLIBC_2.2 aio_write64 F
a2cf7d
-GLIBC_2.2 clock_getcpuclockid F
a2cf7d
-GLIBC_2.2 clock_getres F
a2cf7d
-GLIBC_2.2 clock_gettime F
a2cf7d
-GLIBC_2.2 clock_nanosleep F
a2cf7d
-GLIBC_2.2 clock_settime F
a2cf7d
 GLIBC_2.2 lio_listio F
a2cf7d
 GLIBC_2.2 lio_listio64 F
a2cf7d
 GLIBC_2.2 shm_open F
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/sh/libc.abilist b/sysdeps/unix/sysv/linux/sh/libc.abilist
a2cf7d
index 1f4e648baade9c47..b126bda07a9cc58c 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/sh/libc.abilist
a2cf7d
+++ b/sysdeps/unix/sysv/linux/sh/libc.abilist
a2cf7d
@@ -618,6 +618,11 @@ GLIBC_2.2 clntudp_bufcreate F
a2cf7d
 GLIBC_2.2 clntudp_create F
a2cf7d
 GLIBC_2.2 clntunix_create F
a2cf7d
 GLIBC_2.2 clock F
a2cf7d
+GLIBC_2.2 clock_getcpuclockid F
a2cf7d
+GLIBC_2.2 clock_getres F
a2cf7d
+GLIBC_2.2 clock_gettime F
a2cf7d
+GLIBC_2.2 clock_nanosleep F
a2cf7d
+GLIBC_2.2 clock_settime F
a2cf7d
 GLIBC_2.2 clone F
a2cf7d
 GLIBC_2.2 close F
a2cf7d
 GLIBC_2.2 closedir F
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/sh/librt.abilist b/sysdeps/unix/sysv/linux/sh/librt.abilist
a2cf7d
index 595f1b712a4e8d70..bb03781dcc04d219 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/sh/librt.abilist
a2cf7d
+++ b/sysdeps/unix/sysv/linux/sh/librt.abilist
a2cf7d
@@ -15,11 +15,6 @@ GLIBC_2.1 aio_write F
a2cf7d
 GLIBC_2.1 aio_write64 F
a2cf7d
 GLIBC_2.1 lio_listio F
a2cf7d
 GLIBC_2.1 lio_listio64 F
a2cf7d
-GLIBC_2.2 clock_getcpuclockid F
a2cf7d
-GLIBC_2.2 clock_getres F
a2cf7d
-GLIBC_2.2 clock_gettime F
a2cf7d
-GLIBC_2.2 clock_nanosleep F
a2cf7d
-GLIBC_2.2 clock_settime F
a2cf7d
 GLIBC_2.2 shm_open F
a2cf7d
 GLIBC_2.2 shm_unlink F
a2cf7d
 GLIBC_2.2 timer_create F
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
a2cf7d
index d308ac8b0527cb3f..63b78d80b333d4b4 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
a2cf7d
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
a2cf7d
@@ -1826,6 +1826,11 @@ GLIBC_2.2 __xstat64 F
a2cf7d
 GLIBC_2.2 _flushlbf F
a2cf7d
 GLIBC_2.2 _res_hconf D 0x30
a2cf7d
 GLIBC_2.2 bind_textdomain_codeset F
a2cf7d
+GLIBC_2.2 clock_getcpuclockid F
a2cf7d
+GLIBC_2.2 clock_getres F
a2cf7d
+GLIBC_2.2 clock_gettime F
a2cf7d
+GLIBC_2.2 clock_nanosleep F
a2cf7d
+GLIBC_2.2 clock_settime F
a2cf7d
 GLIBC_2.2 dcngettext F
a2cf7d
 GLIBC_2.2 dngettext F
a2cf7d
 GLIBC_2.2 fgetpos F
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/librt.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/librt.abilist
a2cf7d
index cb874f41477109c3..38f0aad791793010 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/librt.abilist
a2cf7d
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/librt.abilist
a2cf7d
@@ -15,11 +15,6 @@ GLIBC_2.1 aio_write F
a2cf7d
 GLIBC_2.1 aio_write64 F
a2cf7d
 GLIBC_2.1 lio_listio F
a2cf7d
 GLIBC_2.1 lio_listio64 F
a2cf7d
-GLIBC_2.2 clock_getcpuclockid F
a2cf7d
-GLIBC_2.2 clock_getres F
a2cf7d
-GLIBC_2.2 clock_gettime F
a2cf7d
-GLIBC_2.2 clock_nanosleep F
a2cf7d
-GLIBC_2.2 clock_settime F
a2cf7d
 GLIBC_2.2 shm_open F
a2cf7d
 GLIBC_2.2 shm_unlink F
a2cf7d
 GLIBC_2.2 timer_create F
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
a2cf7d
index 6731ebfc2877c5c6..a899eb6a92215b47 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
a2cf7d
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
a2cf7d
@@ -660,6 +660,11 @@ GLIBC_2.2 clntudp_bufcreate F
a2cf7d
 GLIBC_2.2 clntudp_create F
a2cf7d
 GLIBC_2.2 clntunix_create F
a2cf7d
 GLIBC_2.2 clock F
a2cf7d
+GLIBC_2.2 clock_getcpuclockid F
a2cf7d
+GLIBC_2.2 clock_getres F
a2cf7d
+GLIBC_2.2 clock_gettime F
a2cf7d
+GLIBC_2.2 clock_nanosleep F
a2cf7d
+GLIBC_2.2 clock_settime F
a2cf7d
 GLIBC_2.2 clone F
a2cf7d
 GLIBC_2.2 close F
a2cf7d
 GLIBC_2.2 closedir F
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/librt.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/librt.abilist
a2cf7d
index d7a049cf600e2966..71f86e03ce67fd19 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/librt.abilist
a2cf7d
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/librt.abilist
a2cf7d
@@ -15,11 +15,6 @@ GLIBC_2.1 aio_write F
a2cf7d
 GLIBC_2.1 aio_write64 F
a2cf7d
 GLIBC_2.1 lio_listio F
a2cf7d
 GLIBC_2.1 lio_listio64 F
a2cf7d
-GLIBC_2.2 clock_getcpuclockid F
a2cf7d
-GLIBC_2.2 clock_getres F
a2cf7d
-GLIBC_2.2 clock_gettime F
a2cf7d
-GLIBC_2.2 clock_nanosleep F
a2cf7d
-GLIBC_2.2 clock_settime F
a2cf7d
 GLIBC_2.2 shm_open F
a2cf7d
 GLIBC_2.2 shm_unlink F
a2cf7d
 GLIBC_2.2 timer_create F
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
a2cf7d
index 816e4a742632ad44..0ebb018e2089c70a 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
a2cf7d
+++ b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
a2cf7d
@@ -621,6 +621,11 @@ GLIBC_2.2.5 clntudp_bufcreate F
a2cf7d
 GLIBC_2.2.5 clntudp_create F
a2cf7d
 GLIBC_2.2.5 clntunix_create F
a2cf7d
 GLIBC_2.2.5 clock F
a2cf7d
+GLIBC_2.2.5 clock_getcpuclockid F
a2cf7d
+GLIBC_2.2.5 clock_getres F
a2cf7d
+GLIBC_2.2.5 clock_gettime F
a2cf7d
+GLIBC_2.2.5 clock_nanosleep F
a2cf7d
+GLIBC_2.2.5 clock_settime F
a2cf7d
 GLIBC_2.2.5 clone F
a2cf7d
 GLIBC_2.2.5 close F
a2cf7d
 GLIBC_2.2.5 closedir F
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/x86_64/64/librt.abilist b/sysdeps/unix/sysv/linux/x86_64/64/librt.abilist
a2cf7d
index e2e8b60bf8e29f55..95e3f22daa06b237 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/x86_64/64/librt.abilist
a2cf7d
+++ b/sysdeps/unix/sysv/linux/x86_64/64/librt.abilist
a2cf7d
@@ -13,11 +13,6 @@ GLIBC_2.2.5 aio_suspend F
a2cf7d
 GLIBC_2.2.5 aio_suspend64 F
a2cf7d
 GLIBC_2.2.5 aio_write F
a2cf7d
 GLIBC_2.2.5 aio_write64 F
a2cf7d
-GLIBC_2.2.5 clock_getcpuclockid F
a2cf7d
-GLIBC_2.2.5 clock_getres F
a2cf7d
-GLIBC_2.2.5 clock_gettime F
a2cf7d
-GLIBC_2.2.5 clock_nanosleep F
a2cf7d
-GLIBC_2.2.5 clock_settime F
a2cf7d
 GLIBC_2.2.5 lio_listio F
a2cf7d
 GLIBC_2.2.5 lio_listio64 F
a2cf7d
 GLIBC_2.2.5 shm_open F
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
a2cf7d
index 6fee16a850adc7b8..0b6b3fa98183e5af 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
a2cf7d
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
a2cf7d
@@ -660,6 +660,11 @@ GLIBC_2.16 clntudp_create F
a2cf7d
 GLIBC_2.16 clntunix_create F
a2cf7d
 GLIBC_2.16 clock F
a2cf7d
 GLIBC_2.16 clock_adjtime F
a2cf7d
+GLIBC_2.16 clock_getcpuclockid F
a2cf7d
+GLIBC_2.16 clock_getres F
a2cf7d
+GLIBC_2.16 clock_gettime F
a2cf7d
+GLIBC_2.16 clock_nanosleep F
a2cf7d
+GLIBC_2.16 clock_settime F
a2cf7d
 GLIBC_2.16 clone F
a2cf7d
 GLIBC_2.16 close F
a2cf7d
 GLIBC_2.16 closedir F
a2cf7d
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/librt.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/librt.abilist
a2cf7d
index 94e84e4dcfaa85dc..66969fb9ab887756 100644
a2cf7d
--- a/sysdeps/unix/sysv/linux/x86_64/x32/librt.abilist
a2cf7d
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/librt.abilist
a2cf7d
@@ -14,11 +14,6 @@ GLIBC_2.16 aio_suspend F
a2cf7d
 GLIBC_2.16 aio_suspend64 F
a2cf7d
 GLIBC_2.16 aio_write F
a2cf7d
 GLIBC_2.16 aio_write64 F
a2cf7d
-GLIBC_2.16 clock_getcpuclockid F
a2cf7d
-GLIBC_2.16 clock_getres F
a2cf7d
-GLIBC_2.16 clock_gettime F
a2cf7d
-GLIBC_2.16 clock_nanosleep F
a2cf7d
-GLIBC_2.16 clock_settime F
a2cf7d
 GLIBC_2.16 lio_listio F
a2cf7d
 GLIBC_2.16 lio_listio64 F
a2cf7d
 GLIBC_2.16 mq_close F
a2cf7d
diff --git a/time/Makefile b/time/Makefile
a2cf7d
index ec3e39dcea75ee51..6a68481a5de1b148 100644
a2cf7d
--- a/time/Makefile
a2cf7d
+++ b/time/Makefile
a2cf7d
@@ -36,14 +36,18 @@ routines := offtime asctime clock ctime ctime_r difftime \
a2cf7d
 	    stime dysize timegm ftime			 \
a2cf7d
 	    getdate strptime strptime_l			 \
a2cf7d
 	    strftime wcsftime strftime_l wcsftime_l	 \
a2cf7d
-	    timespec_get
a2cf7d
+	    timespec_get 	 			 \
a2cf7d
+	    clock_getcpuclockid clock_getres 		 \
a2cf7d
+	    clock_gettime clock_settime clock_nanosleep
a2cf7d
+
a2cf7d
 aux :=	    era alt_digit lc-time-cleanup
a2cf7d
 
a2cf7d
 tests	:= test_time clocktest tst-posixtz tst-strptime tst_wcsftime \
a2cf7d
 	   tst-getdate tst-mktime tst-mktime2 tst-ftime_l tst-strftime \
a2cf7d
 	   tst-mktime3 tst-strptime2 bug-asctime bug-asctime_r bug-mktime1 \
a2cf7d
 	   tst-strptime3 bug-getdate1 tst-strptime-whitespace tst-ftime \
a2cf7d
-	   tst-tzname tst-y2039
a2cf7d
+	   tst-tzname tst-y2039 \
a2cf7d
+	   tst-clock tst-clock2 tst-clock_nanosleep tst-cpuclock1
a2cf7d
 
a2cf7d
 include ../Rules
a2cf7d
 
a2cf7d
diff --git a/time/Versions b/time/Versions
a2cf7d
index fd838181e4f0969d..8788e192ce358d77 100644
a2cf7d
--- a/time/Versions
a2cf7d
+++ b/time/Versions
a2cf7d
@@ -49,6 +49,10 @@ libc {
a2cf7d
   GLIBC_2.2 {
a2cf7d
     # w*
a2cf7d
     wcsftime;
a2cf7d
+
a2cf7d
+    # c*; actually in librt in version 2.2, moved to libc in 2.17
a2cf7d
+    clock_getres; clock_gettime; clock_settime; clock_getcpuclockid;
a2cf7d
+    clock_nanosleep;
a2cf7d
   }
a2cf7d
   GLIBC_2.3 {
a2cf7d
     # these internal names are used by libstdc++
a2cf7d
@@ -65,4 +69,13 @@ libc {
a2cf7d
   GLIBC_2.16 {
a2cf7d
     timespec_get;
a2cf7d
   }
a2cf7d
+  GLIBC_2.17 {
a2cf7d
+    # c*
a2cf7d
+    clock_getres; clock_gettime; clock_settime; clock_getcpuclockid;
a2cf7d
+    clock_nanosleep;
a2cf7d
+  }
a2cf7d
+  GLIBC_PRIVATE {
a2cf7d
+    # same as clock_gettime; used in other libraries
a2cf7d
+    __clock_gettime;
a2cf7d
+  }
a2cf7d
 }
a2cf7d
diff --git a/rt/clock_getcpuclockid.c b/time/clock_getcpuclockid.c
a2cf7d
similarity index 75%
a2cf7d
rename from rt/clock_getcpuclockid.c
a2cf7d
rename to time/clock_getcpuclockid.c
a2cf7d
index 6bc42a0863d92d5a..81b86241f7adc6c9 100644
a2cf7d
--- a/rt/clock_getcpuclockid.c
a2cf7d
+++ b/time/clock_getcpuclockid.c
a2cf7d
@@ -19,6 +19,7 @@
a2cf7d
 #include <errno.h>
a2cf7d
 #include <time.h>
a2cf7d
 #include <unistd.h>
a2cf7d
+#include <shlib-compat.h>
a2cf7d
 
a2cf7d
 int
a2cf7d
 __clock_getcpuclockid (pid_t pid, clockid_t *clock_id)
a2cf7d
@@ -37,4 +38,10 @@ __clock_getcpuclockid (pid_t pid, clockid_t *clock_id)
a2cf7d
   return ENOENT;
a2cf7d
 #endif
a2cf7d
 }
a2cf7d
-weak_alias (__clock_getcpuclockid, clock_getcpuclockid)
a2cf7d
+versioned_symbol (libc, __clock_getcpuclockid, clock_getcpuclockid, GLIBC_2_17);
a2cf7d
+/* clock_getcpuclockid moved to libc in version 2.17;
a2cf7d
+   old binaries may expect the symbol version it had in librt.  */
a2cf7d
+#if SHLIB_COMPAT (libc, GLIBC_2_2, GLIBC_2_17)
a2cf7d
+strong_alias (__clock_getcpuclockid, __clock_getcpuclockid_2);
a2cf7d
+compat_symbol (libc, __clock_getcpuclockid_2, clock_getcpuclockid, GLIBC_2_2);
a2cf7d
+#endif
a2cf7d
diff --git a/rt/clock_getres.c b/time/clock_getres.c
a2cf7d
similarity index 73%
a2cf7d
rename from rt/clock_getres.c
a2cf7d
rename to time/clock_getres.c
a2cf7d
index 816f7b2a907e27ce..e8315393e560b186 100644
a2cf7d
--- a/rt/clock_getres.c
a2cf7d
+++ b/time/clock_getres.c
a2cf7d
@@ -18,6 +18,7 @@
a2cf7d
 
a2cf7d
 #include <errno.h>
a2cf7d
 #include <time.h>
a2cf7d
+#include <shlib-compat.h>
a2cf7d
 
a2cf7d
 /* Get resolution of clock.  */
a2cf7d
 int
a2cf7d
@@ -26,5 +27,13 @@ __clock_getres (clockid_t clock_id, struct timespec *res)
a2cf7d
   __set_errno (ENOSYS);
a2cf7d
   return -1;
a2cf7d
 }
a2cf7d
-weak_alias (__clock_getres, clock_getres)
a2cf7d
+
a2cf7d
+versioned_symbol (libc, __clock_getres, clock_getres, GLIBC_2_17);
a2cf7d
+/* clock_getres moved to libc in version 2.17;
a2cf7d
+   old binaries may expect the symbol version it had in librt.  */
a2cf7d
+#if SHLIB_COMPAT (libc, GLIBC_2_2, GLIBC_2_17)
a2cf7d
+strong_alias (__clock_getres, __clock_getres_2);
a2cf7d
+compat_symbol (libc, __clock_getres_2, clock_getres, GLIBC_2_2);
a2cf7d
+#endif
a2cf7d
+
a2cf7d
 stub_warning (clock_getres)
a2cf7d
diff --git a/rt/clock_gettime.c b/time/clock_gettime.c
a2cf7d
similarity index 74%
a2cf7d
rename from rt/clock_gettime.c
a2cf7d
rename to time/clock_gettime.c
a2cf7d
index 30a012473f5bc821..4a5f808845351156 100644
a2cf7d
--- a/rt/clock_gettime.c
a2cf7d
+++ b/time/clock_gettime.c
a2cf7d
@@ -18,6 +18,7 @@
a2cf7d
 
a2cf7d
 #include <errno.h>
a2cf7d
 #include <time.h>
a2cf7d
+#include <shlib-compat.h>
a2cf7d
 
a2cf7d
 /* Get current value of CLOCK and store it in TP.  */
a2cf7d
 int
a2cf7d
@@ -26,6 +27,14 @@ __clock_gettime (clockid_t clock_id, struct timespec *tp)
a2cf7d
   __set_errno (ENOSYS);
a2cf7d
   return -1;
a2cf7d
 }
a2cf7d
-weak_alias (__clock_gettime, clock_gettime)
a2cf7d
 libc_hidden_def (__clock_gettime)
a2cf7d
+
a2cf7d
+versioned_symbol (libc, __clock_gettime, clock_gettime, GLIBC_2_17);
a2cf7d
+/* clock_gettime moved to libc in version 2.17;
a2cf7d
+   old binaries may expect the symbol version it had in librt.  */
a2cf7d
+#if SHLIB_COMPAT (libc, GLIBC_2_2, GLIBC_2_17)
a2cf7d
+strong_alias (__clock_gettime, __clock_gettime_2);
a2cf7d
+compat_symbol (libc, __clock_gettime_2, clock_gettime, GLIBC_2_2);
a2cf7d
+#endif
a2cf7d
+
a2cf7d
 stub_warning (clock_gettime)
a2cf7d
diff --git a/rt/clock_nanosleep.c b/time/clock_nanosleep.c
a2cf7d
similarity index 76%
a2cf7d
rename from rt/clock_nanosleep.c
a2cf7d
rename to time/clock_nanosleep.c
a2cf7d
index 15aa6f7c4f22e197..a314b169a9455e0d 100644
a2cf7d
--- a/rt/clock_nanosleep.c
a2cf7d
+++ b/time/clock_nanosleep.c
a2cf7d
@@ -18,6 +18,7 @@
a2cf7d
 
a2cf7d
 #include <errno.h>
a2cf7d
 #include <time.h>
a2cf7d
+#include <shlib-compat.h>
a2cf7d
 
a2cf7d
 int
a2cf7d
 __clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req,
a2cf7d
@@ -33,5 +34,13 @@ __clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req,
a2cf7d
   /* Not implemented.  */
a2cf7d
   return ENOSYS;
a2cf7d
 }
a2cf7d
-weak_alias (__clock_nanosleep, clock_nanosleep)
a2cf7d
+
a2cf7d
+versioned_symbol (libc, __clock_nanosleep, clock_nanosleep, GLIBC_2_17);
a2cf7d
+/* clock_nanosleep moved to libc in version 2.17;
a2cf7d
+   old binaries may expect the symbol version it had in librt.  */
a2cf7d
+#if SHLIB_COMPAT (libc, GLIBC_2_2, GLIBC_2_17)
a2cf7d
+strong_alias (__clock_nanosleep, __clock_nanosleep_2);
a2cf7d
+compat_symbol (libc, __clock_nanosleep_2, clock_nanosleep, GLIBC_2_2);
a2cf7d
+#endif
a2cf7d
+
a2cf7d
 stub_warning (clock_nanosleep)
a2cf7d
diff --git a/rt/clock_settime.c b/time/clock_settime.c
a2cf7d
similarity index 71%
a2cf7d
rename from rt/clock_settime.c
a2cf7d
rename to time/clock_settime.c
a2cf7d
index 0b6d4b2a2a0dc46c..2091239448e307f2 100644
a2cf7d
--- a/rt/clock_settime.c
a2cf7d
+++ b/time/clock_settime.c
a2cf7d
@@ -18,6 +18,7 @@
a2cf7d
 
a2cf7d
 #include <errno.h>
a2cf7d
 #include <time.h>
a2cf7d
+#include <shlib-compat.h>
a2cf7d
 
a2cf7d
 /* Set CLOCK to value TP.  */
a2cf7d
 int
a2cf7d
@@ -26,5 +27,14 @@ __clock_settime (clockid_t clock_id, const struct timespec *tp)
a2cf7d
   __set_errno (ENOSYS);
a2cf7d
   return -1;
a2cf7d
 }
a2cf7d
-weak_alias (__clock_settime, clock_settime)
a2cf7d
+libc_hidden_def (__clock_settime)
a2cf7d
+
a2cf7d
+versioned_symbol (libc, __clock_settime, clock_settime, GLIBC_2_17);
a2cf7d
+/* clock_settime moved to libc in version 2.17;
a2cf7d
+   old binaries may expect the symbol version it had in librt.  */
a2cf7d
+#if SHLIB_COMPAT (libc, GLIBC_2_2, GLIBC_2_17)
a2cf7d
+strong_alias (__clock_settime, __clock_settime_2);
a2cf7d
+compat_symbol (libc, __clock_settime_2, clock_settime, GLIBC_2_2);
a2cf7d
+#endif
a2cf7d
+
a2cf7d
 stub_warning (clock_settime)
a2cf7d
diff --git a/rt/tst-clock.c b/time/tst-clock.c
a2cf7d
similarity index 100%
a2cf7d
rename from rt/tst-clock.c
a2cf7d
rename to time/tst-clock.c
a2cf7d
diff --git a/rt/tst-clock2.c b/time/tst-clock2.c
a2cf7d
similarity index 100%
a2cf7d
rename from rt/tst-clock2.c
a2cf7d
rename to time/tst-clock2.c
a2cf7d
diff --git a/rt/tst-clock_nanosleep.c b/time/tst-clock_nanosleep.c
a2cf7d
similarity index 100%
a2cf7d
rename from rt/tst-clock_nanosleep.c
a2cf7d
rename to time/tst-clock_nanosleep.c
a2cf7d
diff --git a/rt/tst-cpuclock1.c b/time/tst-cpuclock1.c
a2cf7d
similarity index 100%
a2cf7d
rename from rt/tst-cpuclock1.c
a2cf7d
rename to time/tst-cpuclock1.c