From patchwork Fri Jun 14 15:28:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 33126 Received: (qmail 116997 invoked by alias); 14 Jun 2019 15:29:20 -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 116851 invoked by uid 89); 14 Jun 2019 15:29:19 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-20.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_JMF_BR, SPF_PASS autolearn=ham version=3.3.1 spammy=31, 5 X-HELO: mail-vs1-f66.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references; bh=skMkSn123M8HodGMEX6t/aWbaEts2+lujxKyQYG0Pks=; b=BOdXIuz7yf4DONZL/m1BeNORyQ647JOiJW5MHtOzCmhiGKNmR4D0OG5La3Yi2kzVqr P10F3zS8Q1JAqQycmsH0MfiW3f7neDcP6a5c0vHAbB+7cptre53WxjvU/htdbecyt2G+ kz1sZmn72ZlTDGZ6iJvhnQGh/0q4vyjK86XwljemLovqN+bRdwpl2cmn+zHOecXDnA7y JFj/5UAL9T1YtVJmSWpU2MxLS1jyQ+Rotzq4CH7WaTjmdo1iktiqeoSe5D1vc/gW1g/s zIced2o33bvJmFcEJGtFg2Y7IXmn08/h93aKaP9AUL1UABTkWLljFD0DNf4CDmt4qDkJ 8A1Q== Return-Path: From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 03/12] s390: Enable VDSO for static linking Date: Fri, 14 Jun 2019 12:28:59 -0300 Message-Id: <20190614152908.8101-3-adhemerval.zanella@linaro.org> In-Reply-To: <20190614152908.8101-1-adhemerval.zanella@linaro.org> References: <20190614152908.8101-1-adhemerval.zanella@linaro.org> Although s390 explicit does not enable vDSO for binaries without (arch/s390/kernel/vdso.c:217), there is no indication in the code the rationale for disabling it. In fact, I rebuilt a kernel with the check removed and the vDSO does work for static build for supplied symbols. Checked on s390x-linux-gnu. [BZ #19767] * sysdeps/unix/sysv/linux/s390/init-first.c: Remove #ifdef SHARED. * sysdeps/unix/sysv/linux/s390/libc-vdso.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h (ALWAYS_USE_VSYSCALL): Define. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h (ALWAYS_USE_VSYSCALL): Likewise. --- sysdeps/unix/sysv/linux/s390/init-first.c | 8 ++------ sysdeps/unix/sysv/linux/s390/libc-vdso.h | 3 --- sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h | 3 +++ sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h | 4 ++++ 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sysdeps/unix/sysv/linux/s390/init-first.c b/sysdeps/unix/sysv/linux/s390/init-first.c index 71dd43f738..847977c0d9 100644 --- a/sysdeps/unix/sysv/linux/s390/init-first.c +++ b/sysdeps/unix/sysv/linux/s390/init-first.c @@ -16,9 +16,8 @@ License along with the GNU C Library; if not, see . */ -#ifdef SHARED -# include -# include +#include +#include long int (*VDSO_SYMBOL(gettimeofday)) (struct timeval *, void *) attribute_hidden; @@ -54,7 +53,4 @@ _libc_vdso_platform_setup (void) VDSO_SYMBOL (getcpu) = p; } -# define VDSO_SETUP _libc_vdso_platform_setup -#endif - #include diff --git a/sysdeps/unix/sysv/linux/s390/libc-vdso.h b/sysdeps/unix/sysv/linux/s390/libc-vdso.h index 5e2d1e4b3f..cc97601383 100644 --- a/sysdeps/unix/sysv/linux/s390/libc-vdso.h +++ b/sysdeps/unix/sysv/linux/s390/libc-vdso.h @@ -20,8 +20,6 @@ #ifndef _LIBC_VDSO_H #define _LIBC_VDSO_H -#ifdef SHARED - #include extern long int (*VDSO_SYMBOL(gettimeofday)) (struct timeval *, void *) @@ -33,6 +31,5 @@ extern long int (*VDSO_SYMBOL(clock_getres)) (clockid_t, struct timespec *); extern long int (*VDSO_SYMBOL(getcpu)) (unsigned *, unsigned *, void *) attribute_hidden; -#endif #endif /* _LIBC_VDSO_H */ diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h index 640fb52de1..47d1c5cdb2 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h +++ b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h @@ -19,6 +19,9 @@ #ifndef _LINUX_S390_SYSDEP_H #define _LINUX_S390_SYSDEP_H +/* Always enable vsyscalls on s390-32. */ +#define ALWAYS_USE_VSYSCALL 1 + #include #include #include diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h index 9a9834c750..95829390e2 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h +++ b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h @@ -20,6 +20,10 @@ #ifndef _LINUX_S390_SYSDEP_H #define _LINUX_S390_SYSDEP_H +/* Always enable vsyscalls on s390-64. */ +#define ALWAYS_USE_VSYSCALL 1 + + #include #include #include