]> sourceware.org Git - glibc.git/commitdiff
linux: Enable vDSO for static linking as default (BZ#19767)
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Thu, 13 Jun 2019 20:00:29 +0000 (20:00 +0000)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 5 Aug 2019 19:38:42 +0000 (16:38 -0300)
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.

17 files changed:
ChangeLog
sysdeps/unix/sysv/linux/aarch64/sysdep.h
sysdeps/unix/sysv/linux/arm/sysdep.h
sysdeps/unix/sysv/linux/i386/sysdep.h
sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h
sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h
sysdeps/unix/sysv/linux/riscv/sysdep.h
sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h
sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h
sysdeps/unix/sysv/linux/sparc/sysdep.h
sysdeps/unix/sysv/linux/sysdep-vdso.h
sysdeps/unix/sysv/linux/sysdep.h
sysdeps/unix/sysv/linux/x86/libc-vdso.h
sysdeps/unix/sysv/linux/x86_64/sysdep.h

index 5fd201987826b9e3d8ce3805e037ef187e89d09e..2e21197f88c4e942f3e8448d0f6443ee94ad40dc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,37 @@
 2019-08-05  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
 
+       [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.
+
        [BZ #19767]
        * sysdeps/unix/sysv/linux/sparc/init-first.c: Remove #ifdef SHARED.
        * sysdeps/unix/sysv/linux/sparc/libc-vdso.h: Likewise.
index 935c507f8cb36b2ad6a657bf51f058c3e68542a0..a2f4061b580d8d9270c83657b996c0f1a1483ec1 100644 (file)
@@ -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 <sysdeps/unix/sysdep.h>
 #include <sysdeps/aarch64/sysdep.h>
 #include <sysdeps/unix/sysv/linux/generic/sysdep.h>
index 9b4ed8d6a5681d8a1bfcde5510c3f5dd1f251ead..6d8d9a47f9649a963c70df8506ad5b38417cac31 100644 (file)
@@ -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 <sysdeps/unix/sysv/linux/sysdep.h>
 #include <sysdeps/unix/arm/sysdep.h>
index 0be10744ff445e4041ca719c29920f5b47d26c5a..77154b904a9407ad3d27f746ceb5bf60737dc17f 100644 (file)
@@ -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 <sysdeps/unix/sysv/linux/sysdep.h>
 #include <sysdeps/unix/i386/sysdep.h>
index 5a2704e3e8df1f259a0356e56da65452b867b4b1..a310a0acbc7dd0c11d52d7bfefe7a16ae7095edf 100644 (file)
@@ -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 <sysdeps/unix/sysv/linux/sysdep.h>
 #include <sysdeps/unix/mips/mips32/sysdep.h>
index a4f35470309e34b5c55add9e55a1a747a3923b71..d83e08f96a6d4cbc547410819c94fc4df69bb49b 100644 (file)
@@ -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 <sysdeps/unix/sysv/linux/sysdep.h>
 #include <sysdeps/unix/mips/mips64/n32/sysdep.h>
index 5b4d27757dad00493484fb28c531fe11ba819f97..bcfaf561a14bf71459e0f6c068769e2cb89ee901 100644 (file)
@@ -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 <sysdeps/unix/sysv/linux/sysdep.h>
 #include <sysdeps/unix/mips/mips64/n64/sysdep.h>
index bdbab8e41b7732839b42fd1811bbaf5b041a8d2f..62caa265d73c0012d285d2ce943a8496718cab63 100644 (file)
@@ -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 <sysdeps/unix/sysv/linux/sysdep.h>
 #include <sysdeps/unix/powerpc/sysdep.h>
 #include <tls.h>
index 294517e3f3e4f3061b0f18f3047e85284a72558a..4122e5c4a9cf3bff0b4f8a4211a866228a4ae118 100644 (file)
@@ -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 <sysdeps/unix/sysv/linux/sysdep.h>
 #include <sysdeps/unix/powerpc/sysdep.h>
 #include <tls.h>
index caf013a9a11eef3fa2b6541deb3a3314c2d89090..5470ea3d2a6882ad34e5fc924517fd6fc98add2b 100644 (file)
@@ -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 <sysdeps/unix/sysv/linux/generic/sysdep.h>
 #include <tls.h>
 
index 47d1c5cdb2e615c8bf7db5b56d9dc127b226ce67..640fb52de19aef133399057f558a88bb8850726f 100644 (file)
@@ -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 <sysdeps/s390/s390-32/sysdep.h>
 #include <sysdeps/unix/sysdep.h>
 #include <sysdeps/unix/sysv/linux/sysdep.h>
index 2552aaa7111cac05bfaa13b3418bb25d5e7b5b73..9a9834c750f3bd8c3b761cd7918e15c1f1ae6901 100644 (file)
@@ -20,9 +20,6 @@
 #ifndef _LINUX_S390_SYSDEP_H
 #define _LINUX_S390_SYSDEP_H
 
-/* Always enable vsyscalls on s390-64.  */
-#define ALWAYS_USE_VSYSCALL 1
-
 #include <sysdeps/s390/s390-64/sysdep.h>
 #include <sysdeps/unix/sysdep.h>
 #include <sysdeps/unix/sysv/linux/sysdep.h>
index fc4053c5ce6c0a0e6e87b06e0a55a9e3a29bee13..981b2a26b7a91093f821c97876e55bc4be2d9f8a 100644 (file)
@@ -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 <sysdeps/unix/sysdep.h>
 #include <sysdeps/unix/sysv/linux/sysdep.h>
 #include <sysdeps/sparc/sysdep.h>
index c5a1ae06708cdb0d23855232bf45e684620b0d4d..5fec208380d9d06fff20391d5359710d567032c0 100644 (file)
@@ -26,7 +26,7 @@
      funcptr (args)
 #endif
 
-#if USE_VSYSCALL && defined HAVE_VSYSCALL
+#ifdef HAVE_VSYSCALL
 
 # include <libc-vdso.h>
 
index f94cfa2fa9ae98a4d6b4e22fdcd583f456a9f6f7..af1c9a26fe60cb594f6c5f495368bd5f3bd52497 100644 (file)
 #include <bits/wordsize.h>
 #include <kernel-features.h>
 
-/* 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 *).  */
index ea35c71664f5a825ea9297e81f5428c10734ff64..c9aa1c8a720748ad82d8bb14ee3aa8b49a4d5d11 100644 (file)
@@ -22,9 +22,7 @@
 #include <time.h>
 #include <sys/time.h>
 
-#if USE_VSYSCALL
-
-# include <sysdep-vdso.h>
+#include <sysdep-vdso.h>
 
 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 */
index b88c46b589fe314b32a28e5d4232bdccfc9fbef0..0a3ddd37e1eb0d158cc50627daf21cb10665142a 100644 (file)
@@ -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 <sysdeps/unix/sysv/linux/sysdep.h>
 #include <sysdeps/unix/x86_64/sysdep.h>
This page took 0.081057 seconds and 5 git commands to generate.