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: 166833 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp2201478ilk; Fri, 14 Jun 2019 08:30:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqwmETnFuNOUQpEa33AYbWxzTZw2lfSwIRfAlB48V+n3/4sNr/0bW1JOJujkE8bagt68INfe X-Received: by 2002:a17:902:102c:: with SMTP id b41mr43973825pla.204.1560526206374; Fri, 14 Jun 2019 08:30:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560526206; cv=none; d=google.com; s=arc-20160816; b=JE3/mBjAEYPH0zbr0KJ/OzhoCO/Z+ykjEGJMWzrhYeg0GUAYUzlNSiYHcRCrg+xU+d BratpsyxWQgzj09Di8kfD5zOqN3A0ds/cFkvTgzjO2WD8totWZsL+bbbAaMpYPzQKkXv aFiIW4HAG9CtAhSi5scxijYnce9vxwEzgeT/mXoJqNEPtG3hDg8lWLgy3U6MY1bmoAKy kLUpbld7dtTXgi/FRA1lR1Fv6iW1lJlt/8lYQEUu4MJWqSIb3hfd2WItXABgbLKNakz4 Pd3/hf5BJt8xF583akUv3wxQdHccF1nmKHSYWE0w5KkLWnssLu3Gn0HBsw4y0EieWKfp g/yw== 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=KMgrf5mx/++GprQAsHjwJCFEts05M6cYA+iI29jf3pY=; b=ORTiX3hVdqI90umoPzO4XU0fai4m6yaX8do2/9ElNwzcZK/kqOp2AWqF/+U0P60jLt 0eUyXH/I2beXIvcwFFNZ/RDLT/vsuYJ0bRUDqkIRcIb8+40zh+bjt6Bq7WswmD6WAFdi EB4gsEEs1RqU8xsrlAoTwQG5ycIkUe6zZJDNxW5EFdcyWZpLc0IT1KnQcC479pHJLrvr 2xcooy0yYQwqD61IUkqQ8oMz8u/SFJGEkicOZTmpGY0Xl4HzNSXIJ/DGJ5LPmXgRRtND Ly0s6VAEFcQDx3g9sTTyMMcyvJyf7LMCiDF5ymBIpRllSQ25Dj8NXRxVLfHGOWEOlMla 4tJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=wAWX7gLr; dkim=pass header.i=@linaro.org header.s=google header.b=PI7OVM9N; spf=pass (google.com: domain of libc-alpha-return-102739-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-102739-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 p125si2839567pfp.35.2019.06.14.08.30.06 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 Jun 2019 08:30:06 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-102739-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=wAWX7gLr; dkim=pass header.i=@linaro.org header.s=google header.b=PI7OVM9N; spf=pass (google.com: domain of libc-alpha-return-102739-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-102739-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=JrOFhbin7dFVGIh7d5+sV1f8I0Vuzla uMkfCtSIbzcbFPNJAJrk3bmS9oPgnshOqFugw4zvI/aiVIu0yqP5yaFSMx256p5P Ws4WGt9IROtyQk/M5Hw7gYm5mVtMh8UumS6UNiBrPDhp0aaH6Nbum7obPXbd1REF qYe8kbGOGqpg= 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=V+C6iwEy94CtHXlwhL6GdAlOgb4=; b=wAWX7 gLrRjnV8P39aq9UzVRdgSfpD5mpXLECZb129p6gatBEUJqj7roQ9a7X5/Uv8KF1F 3N8hpc/7lFzzpxsuATuFaC+D/ewKpSIsSVIsbBKlSYyPgoJBFU4o/yqxxKd6aHVP CG/WVTKa878Txp2yAdykVdTx3scoQ9dqonnnYc= 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(-) -- 2.17.1 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