public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Andreas Schwab <schwab@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc] rt: avoid PLT setup in timer_[sg]ettime
Date: Mon, 03 Feb 2020 11:17:00 -0000	[thread overview]
Message-ID: <20200203111726.101007.qmail@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=6befb33f31f034a0e8876ce6427dacdfa0cd7ea7

commit 6befb33f31f034a0e8876ce6427dacdfa0cd7ea7
Author: Andreas Schwab <schwab@suse.de>
Date:   Mon Jan 27 10:05:53 2020 +0100

    rt: avoid PLT setup in timer_[sg]ettime
    
    The functions __timer_gettime64 and __timer_settime64 live in librt, not
    libc.  Use proper hidden aliases so that the callers do not need to set up
    the PLT register.
    
    Fixes commits cae1635a70 ("y2038: linux: Provide __timer_settime64
    implementation") and 562cdc19c7 ("y2038: linux: Provide __timer_gettime64
    implementation").

Diff:
---
 include/time.h                          | 4 ++--
 sysdeps/unix/sysv/linux/timer_gettime.c | 3 ++-
 sysdeps/unix/sysv/linux/timer_settime.c | 3 ++-
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/include/time.h b/include/time.h
index 5589232..f712a0e 100644
--- a/include/time.h
+++ b/include/time.h
@@ -185,7 +185,7 @@ libc_hidden_proto (__futimens64);
 #else
 extern int __timer_gettime64 (timer_t timerid, struct __itimerspec64 *value);
 extern int __timerfd_gettime64 (int fd, struct __itimerspec64 *value);
-libc_hidden_proto (__timer_gettime64);
+librt_hidden_proto (__timer_gettime64);
 libc_hidden_proto (__timerfd_gettime64);
 #endif
 
@@ -199,7 +199,7 @@ extern int __timer_settime64 (timer_t timerid, int flags,
 extern int __timerfd_settime64 (int fd, int flags,
                                 const struct __itimerspec64 *value,
                                 struct __itimerspec64 *ovalue);
-libc_hidden_proto (__timer_settime64);
+librt_hidden_proto (__timer_settime64);
 libc_hidden_proto (__timerfd_settime64);
 #endif
 
diff --git a/sysdeps/unix/sysv/linux/timer_gettime.c b/sysdeps/unix/sysv/linux/timer_gettime.c
index 669aff8..1e07d48 100644
--- a/sysdeps/unix/sysv/linux/timer_gettime.c
+++ b/sysdeps/unix/sysv/linux/timer_gettime.c
@@ -52,6 +52,8 @@ __timer_gettime64 (timer_t timerid, struct __itimerspec64 *value)
 }
 
 #if __TIMESIZE != 64
+librt_hidden_def (__timer_gettime64)
+
 int
 __timer_gettime (timer_t timerid, struct itimerspec *value)
 {
@@ -67,4 +69,3 @@ __timer_gettime (timer_t timerid, struct itimerspec *value)
 }
 #endif
 weak_alias (__timer_gettime, timer_gettime)
-libc_hidden_def (timer_gettime)
diff --git a/sysdeps/unix/sysv/linux/timer_settime.c b/sysdeps/unix/sysv/linux/timer_settime.c
index cd302e3..c97a9e9 100644
--- a/sysdeps/unix/sysv/linux/timer_settime.c
+++ b/sysdeps/unix/sysv/linux/timer_settime.c
@@ -68,6 +68,8 @@ __timer_settime64 (timer_t timerid, int flags,
 }
 
 #if __TIMESIZE != 64
+librt_hidden_def (__timer_settime64)
+
 int
 __timer_settime (timer_t timerid, int flags, const struct itimerspec *value,
                  struct itimerspec *ovalue)
@@ -89,4 +91,3 @@ __timer_settime (timer_t timerid, int flags, const struct itimerspec *value,
 }
 #endif
 weak_alias (__timer_settime, timer_settime)
-libc_hidden_def (timer_settime)


                 reply	other threads:[~2020-02-03 11:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200203111726.101007.qmail@sourceware.org \
    --to=schwab@sourceware.org \
    --cc=glibc-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).