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: 166832 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp2201327ilk; Fri, 14 Jun 2019 08:29:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqwUwvEl2ygHc6d3H8WOvTI3CyEF4uGLUK/YOdhg90UO1ssxtHGBamLfb3J9mvyXGO9cf1c4 X-Received: by 2002:a62:1c92:: with SMTP id c140mr99603525pfc.258.1560526197221; Fri, 14 Jun 2019 08:29:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560526197; cv=none; d=google.com; s=arc-20160816; b=r1uDS+sN09gP2maNsZ2IKGpTlr6O7r51In3YQGkw+7cJ0rnTL92KnIzKLCNRxjnFhZ sfFJiDQbosqg5EYHBaCRER5HU8ipZIMcKhtw/76qHsQThx3UjUoLvq3eSV0HuPyi9f7x wfFIL0mAdAvbLQ437bbpxJJ9SSZxaudchzoyMiJv+GQ8iZkCR/CXNjg1nFJFL3oyxvAS NS3QwFvDRekCRj909QUaV/3h0XFZcPMHN+jC/W0D/doVIN96ZUjtF9skQOnJ9fkJVQAd N05X67MgCORZwDPdanjxnvVW99PFROxIY3gGNshV5CmiqEyHkEe5liYFUBO9hkijd6tg 1oTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to:sender:list-help:list-post:list-archive :list-subscribe:list-unsubscribe:list-id:precedence:mailing-list :dkim-signature:domainkey-signature; bh=skMkSn123M8HodGMEX6t/aWbaEts2+lujxKyQYG0Pks=; b=D4LOoSslb59Mb6FU8U34YqkGx7nCCKbsFFMpzUSv5YisMs7fuImnVInsCC/no3D5Nd XVzlvciIGurJk6ur6W9mUiGBCqC6V4nET7Im3r84S9n8Z80yBiCk6FuBPn/m1V/eGXTI 9Dy3VMIcIMc6FZYLL6ats4mcMLZKzB1E2n8T67NLnLh1irdjy3/KpSwbsXg7Tg1wvq2r zPpYhTvdOmeQYAiXUnMLdXXxnhchJBrBI0ZC6lQzpBP++36FerCgfwTCfQ9b/SllR2Do sqjmPwNMloQaQnF3bvUZ4KR3unlGwn25sR/Hm7ibg/n5KZsCHtedotbzHQfWwTRTEunR DnAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=AM8nlGLq; dkim=pass header.i=@linaro.org header.s=google header.b=BOdXIuz7; spf=pass (google.com: domain of libc-alpha-return-102738-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-102738-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id d62si2937541pga.447.2019.06.14.08.29.56 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Jun 2019 08:29:57 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-102738-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=AM8nlGLq; dkim=pass header.i=@linaro.org header.s=google header.b=BOdXIuz7; spf=pass (google.com: domain of libc-alpha-return-102738-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-102738-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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:in-reply-to :references; q=dns; s=default; b=ClXWlF4Hi9CzOxrwq7K8o4hsDUtiY2p hvqcOG2g7poOucSMEg3G9EDJ/N9PEj43aHWZvdmYjQUSuMD1rY9e85dLk2dBlOcX 4VdEFTrKpSRGVRxG3KDZn3w2F9Njf/M6v59EO1jZdqv07OEOuZ4libRsEc1/+ZdZ LId0YKM4JX8Q= 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:in-reply-to :references; s=default; bh=y4LZ9uF+9AC2HyCsJYMBpnusKFc=; b=AM8nl GLqghN4y995o6KLZcULvTwKJ3CE4MQpK2t1hkrD+hOoUUIoniV5WQPuUk81F4vFC Vd/yArkJKhQ8CotjdSbsCN+L1wcGjH9//qMLFH47Fv7OM94MObyT+uYLpdwKHUf2 i0IQOSzppSekoMU7pdT6ZtPjNWChBZGBaj8QPI= 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(-) -- 2.17.1 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