From patchwork Mon Jan 27 10:18:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Schwab X-Patchwork-Id: 1229661 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-108970-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha1 header.s=default header.b=C2gPPiXV; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 485m1y6jljz9sNx for ; Mon, 27 Jan 2020 21:19:18 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type; q=dns; s=default; b=jh18Rb7U3v9g9iGn6QUa8PK1WlH5w PftIGuO4wJoJpIm03KdPmNwFgvfg33jKnjKsVzs4lwlngLctemQEI0007eV/7/hc HtJo3GHVZSoZDGEO/O5rxpacxVEgfvRZQtiRUcW9LliEbO/KibJaqRZR+HNAeVA5 zniV5gr2P9lG1w= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type; s=default; bh=MMZdr9fMj/8OQQzm99Eh0c/OvkM=; b=C2g PPiXVuhlgijRpjnjgonA8vsDklv1Wqrn95LURX6SBcUqHKPSSqpSY8nOYba9Iagm fq6rly5OCj0sgMynkXS8blaltkrrq8pnasHaM04YSPmKUkbnKg6p/pfXCAOr3UlX iXKNFhVRtFC2LeYrz1DKbzXFiEGJMJnF5zzWn8LE= Received: (qmail 97255 invoked by alias); 27 Jan 2020 10:19:04 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 96615 invoked by uid 89); 27 Jan 2020 10:18:41 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-15.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mx2.suse.de From: Andreas Schwab To: libc-alpha@sourceware.org Subject: [PATCH] rt: avoid PLT setup in timer_[sg]ettime X-Yow: Do you have exactly what I want in a plaid poindexter bar bat?? Date: Mon, 27 Jan 2020 11:18:34 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 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"). --- 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 e5e8246eac..eff959d642 100644 --- a/include/time.h +++ b/include/time.h @@ -183,7 +183,7 @@ libc_hidden_proto (__futimens64); # define __timer_gettime64 __timer_gettime #else extern int __timer_gettime64 (timer_t timerid, struct __itimerspec64 *value); -libc_hidden_proto (__timer_gettime64); +librt_hidden_proto (__timer_gettime64); #endif #if __TIMESIZE == 64 @@ -192,7 +192,7 @@ libc_hidden_proto (__timer_gettime64); extern int __timer_settime64 (timer_t timerid, int flags, const struct __itimerspec64 *value, struct __itimerspec64 *ovalue); -libc_hidden_proto (__timer_settime64); +librt_hidden_proto (__timer_settime64); #endif /* Compute the `struct tm' representation of T, diff --git a/sysdeps/unix/sysv/linux/timer_gettime.c b/sysdeps/unix/sysv/linux/timer_gettime.c index 669aff8d16..1e07d4845b 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 cd302e38d8..c97a9e92ef 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)