From patchwork Fri Jun 14 15:29:01 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: 33127 Received: (qmail 117205 invoked by alias); 14 Jun 2019 15:29:21 -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 117091 invoked by uid 89); 14 Jun 2019 15:29:21 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-20.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=timeh, UD:time.h, time.h X-HELO: mail-vs1-f67.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=KMgrf5mx/++GprQAsHjwJCFEts05M6cYA+iI29jf3pY=; b=PI7OVM9NdyOVDJFW+VwcKMz4sTCcvKo1+uwTEC6QEDx9Z9El22ZI6kA2hzdqOK9NYe 1AifNnu2f49XxxELib+nrqFdsX1W2QJV9Mu5rDkzgFsYEAl/PB+7XF7uOpm2ZcDPUV8i iZFTa8Wbp0TJXL7ohec3cgwzd1VLgvIcO2sBsK9J5xhxunoKitCTcfCR2l/zabcfMyVp j8sZJiPH4hT/7/s0diAfkqjEtR13y+Ggur828w3zv1zsXMdTUFDJw6lvoPkprI3RTGJ/ Y/EAgK1T1mflhcpCt0qCJeHowxYBQLWA/+2KsYi4hBWKcxTZg7vQ8gMY5xEO0c60AGlC wZNA== Return-Path: From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH 05/12] linux: Enable vDSO for static linking as default (BZ#19767) Date: Fri, 14 Jun 2019 12:29:01 -0300 Message-Id: <20190614152908.8101-5-adhemerval.zanella@linaro.org> In-Reply-To: <20190614152908.8101-1-adhemerval.zanella@linaro.org> References: <20190614152908.8101-1-adhemerval.zanella@linaro.org> This patch assumes static vDSO is supported as default, it is now supported on all current architectures that support vDSO. It allows removing both ALWAYS_USE_VSYSCALL define, which an architecture requires to explicit define and USE_VSYSCALL (which defines vDSO only for shared or if architecture defines ALWAYS_USE_VSYSCALL). Checked with a build against all affected ABIs. [BZ #19767] * sysdeps/unix/sysv/linux/aarch64/sysdep.h (ALWAYS_USE_VSYSCALL): Remove definition. * sysdeps/unix/sysv/linux/arm/sysdep.h (ALWAYS_USE_VSYSCALL): Likewise. * sysdeps/unix/sysv/linux/i386/sysdep.h (ALWAYS_USE_VSYSCALL): Likewise. * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h (ALWAYS_USE_VSYSCALL): Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h (ALWAYS_USE_VSYSCALL): Likewise. * sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h (ALWAYS_USE_VSYSCALL): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h (ALWAYS_USE_VSYSCALL): Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h (ALWAYS_USE_VSYSCALL): Likewise. * sysdeps/unix/sysv/linux/riscv/sysdep.h (ALWAYS_USE_VSYSCALL): Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h (ALWAYS_USE_VSYSCALL): Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h (ALWAYS_USE_VSYSCALL): Likewise. * sysdeps/unix/sysv/linux/sparc/sysdep.h (ALWAYS_USE_VSYSCALL): Likewise. * sysdeps/unix/sysv/linux/x86_64/sysdep.h (ALWAYS_USE_VSYSCALL): Likewise. * sysdeps/unix/sysv/linux/x86/libc-vdso.h: Remove #if USE_VSYSCALL. * sysdeps/unix/sysv/linux/sysdep-vdso.h: Likewise. * sysdeps/unix/sysv/linux/sysdep.h (ALWAYS_USE_VSYSCALL, USE_VSYSCALL): Remove defitions. --- sysdeps/unix/sysv/linux/aarch64/sysdep.h | 3 --- sysdeps/unix/sysv/linux/arm/sysdep.h | 3 --- sysdeps/unix/sysv/linux/i386/sysdep.h | 3 --- sysdeps/unix/sysv/linux/mips/mips32/sysdep.h | 3 --- sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h | 3 --- sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h | 3 --- sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h | 3 --- sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h | 3 --- sysdeps/unix/sysv/linux/riscv/sysdep.h | 3 --- sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h | 3 --- sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h | 4 ---- sysdeps/unix/sysv/linux/sparc/sysdep.h | 3 --- sysdeps/unix/sysv/linux/sysdep-vdso.h | 2 +- sysdeps/unix/sysv/linux/sysdep.h | 7 ------- sysdeps/unix/sysv/linux/x86/libc-vdso.h | 6 +----- sysdeps/unix/sysv/linux/x86_64/sysdep.h | 3 --- 16 files changed, 2 insertions(+), 53 deletions(-) diff --git a/sysdeps/unix/sysv/linux/aarch64/sysdep.h b/sysdeps/unix/sysv/linux/aarch64/sysdep.h index 935c507f8c..a2f4061b58 100644 --- a/sysdeps/unix/sysv/linux/aarch64/sysdep.h +++ b/sysdeps/unix/sysv/linux/aarch64/sysdep.h @@ -19,9 +19,6 @@ #ifndef _LINUX_AARCH64_SYSDEP_H #define _LINUX_AARCH64_SYSDEP_H 1 -/* Always enable vsyscalls on aarch64 */ -#define ALWAYS_USE_VSYSCALL 1 - #include #include #include diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index 9b4ed8d6a5..6d8d9a47f9 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -20,9 +20,6 @@ #ifndef _LINUX_ARM_SYSDEP_H #define _LINUX_ARM_SYSDEP_H 1 -/* Always enable vsyscalls on arm */ -#define ALWAYS_USE_VSYSCALL 1 - /* There is some commonality. */ #include #include diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h index 0be10744ff..77154b904a 100644 --- a/sysdeps/unix/sysv/linux/i386/sysdep.h +++ b/sysdeps/unix/sysv/linux/i386/sysdep.h @@ -19,9 +19,6 @@ #ifndef _LINUX_I386_SYSDEP_H #define _LINUX_I386_SYSDEP_H 1 -/* Always enable vsyscalls on i386 */ -#define ALWAYS_USE_VSYSCALL 1 - /* There is some commonality. */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h index 5a2704e3e8..a310a0acbc 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h @@ -18,9 +18,6 @@ #ifndef _LINUX_MIPS_MIPS32_SYSDEP_H #define _LINUX_MIPS_MIPS32_SYSDEP_H 1 -/* Always enable vsyscalls on mips32. */ -#define ALWAYS_USE_VSYSCALL 1 - /* There is some commonality. */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h index a4f3547030..d83e08f96a 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h @@ -18,9 +18,6 @@ #ifndef _LINUX_MIPS_SYSDEP_H #define _LINUX_MIPS_SYSDEP_H 1 -/* Always enable vsyscalls on n32. */ -#define ALWAYS_USE_VSYSCALL 1 - /* There is some commonality. */ #include #include diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h index 5b4d27757d..bcfaf561a1 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h +++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h @@ -18,9 +18,6 @@ #ifndef _LINUX_MIPS_SYSDEP_H #define _LINUX_MIPS_SYSDEP_H 1 -/* Always enable vsyscalls on n64. */ -#define ALWAYS_USE_VSYSCALL 1 - /* There is some commonality. */ #include #include diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h b/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h index bdbab8e41b..62caa265d7 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h @@ -18,9 +18,6 @@ #ifndef _LINUX_POWERPC_SYSDEP_H #define _LINUX_POWERPC_SYSDEP_H 1 -/* Always enable vsyscalls on powerpc32 */ -#define ALWAYS_USE_VSYSCALL 1 - #include #include #include diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h index 294517e3f3..4122e5c4a9 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h @@ -20,9 +20,6 @@ #ifndef _LINUX_POWERPC_SYSDEP_H #define _LINUX_POWERPC_SYSDEP_H 1 -/* Always enable vsyscalls on powerpc64 */ -#define ALWAYS_USE_VSYSCALL 1 - #include #include #include diff --git a/sysdeps/unix/sysv/linux/riscv/sysdep.h b/sysdeps/unix/sysv/linux/riscv/sysdep.h index caf013a9a1..5470ea3d2a 100644 --- a/sysdeps/unix/sysv/linux/riscv/sysdep.h +++ b/sysdeps/unix/sysv/linux/riscv/sysdep.h @@ -19,9 +19,6 @@ #ifndef _LINUX_RISCV_SYSDEP_H #define _LINUX_RISCV_SYSDEP_H 1 -/* Always enable vsyscalls on riscv */ -#define ALWAYS_USE_VSYSCALL 1 - #include #include diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h index 47d1c5cdb2..640fb52de1 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h +++ b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h @@ -19,9 +19,6 @@ #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 95829390e2..9a9834c750 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h +++ b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h @@ -20,10 +20,6 @@ #ifndef _LINUX_S390_SYSDEP_H #define _LINUX_S390_SYSDEP_H -/* Always enable vsyscalls on s390-64. */ -#define ALWAYS_USE_VSYSCALL 1 - - #include #include #include diff --git a/sysdeps/unix/sysv/linux/sparc/sysdep.h b/sysdeps/unix/sysv/linux/sparc/sysdep.h index fc4053c5ce..981b2a26b7 100644 --- a/sysdeps/unix/sysv/linux/sparc/sysdep.h +++ b/sysdeps/unix/sysv/linux/sparc/sysdep.h @@ -19,9 +19,6 @@ #ifndef _LINUX_SPARC_SYSDEP_H #define _LINUX_SPARC_SYSDEP_H 1 -/* Always enable vsyscalls on sparc */ -#define ALWAYS_USE_VSYSCALL 1 - #include #include #include diff --git a/sysdeps/unix/sysv/linux/sysdep-vdso.h b/sysdeps/unix/sysv/linux/sysdep-vdso.h index c5a1ae0670..5fec208380 100644 --- a/sysdeps/unix/sysv/linux/sysdep-vdso.h +++ b/sysdeps/unix/sysv/linux/sysdep-vdso.h @@ -26,7 +26,7 @@ funcptr (args) #endif -#if USE_VSYSCALL && defined HAVE_VSYSCALL +#ifdef HAVE_VSYSCALL # include diff --git a/sysdeps/unix/sysv/linux/sysdep.h b/sysdeps/unix/sysv/linux/sysdep.h index f94cfa2fa9..af1c9a26fe 100644 --- a/sysdeps/unix/sysv/linux/sysdep.h +++ b/sysdeps/unix/sysv/linux/sysdep.h @@ -18,13 +18,6 @@ #include #include -/* By default only shared builds use vdso. */ -#ifndef ALWAYS_USE_VSYSCALL -#define ALWAYS_USE_VSYSCALL 0 -#endif - -#define USE_VSYSCALL (defined (SHARED) || ALWAYS_USE_VSYSCALL) - /* Set error number and return -1. A target may choose to return the internal function, __syscall_error, which sets errno and returns -1. We use -1l, instead of -1, so that it can be casted to (void *). */ diff --git a/sysdeps/unix/sysv/linux/x86/libc-vdso.h b/sysdeps/unix/sysv/linux/x86/libc-vdso.h index ea35c71664..c9aa1c8a72 100644 --- a/sysdeps/unix/sysv/linux/x86/libc-vdso.h +++ b/sysdeps/unix/sysv/linux/x86/libc-vdso.h @@ -22,9 +22,7 @@ #include #include -#if USE_VSYSCALL - -# include +#include extern long int (*VDSO_SYMBOL(clock_gettime)) (clockid_t, struct timespec *) attribute_hidden; @@ -32,6 +30,4 @@ extern long int (*VDSO_SYMBOL(clock_gettime)) (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/x86_64/sysdep.h b/sysdeps/unix/sysv/linux/x86_64/sysdep.h index b88c46b589..0a3ddd37e1 100644 --- a/sysdeps/unix/sysv/linux/x86_64/sysdep.h +++ b/sysdeps/unix/sysv/linux/x86_64/sysdep.h @@ -18,9 +18,6 @@ #ifndef _LINUX_X86_64_SYSDEP_H #define _LINUX_X86_64_SYSDEP_H 1 -/* Always enable vsyscalls on x86_64 */ -#define ALWAYS_USE_VSYSCALL 1 - /* There is some commonality. */ #include #include