aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2019-06-13 20:00:29 +0000
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2019-08-05 16:38:42 -0300
commitd665367f596d3461dd3f434a98b8d9f9f7d7763f (patch)
tree1d1f3e902b230c499c261887470df9d356c83fb9
parentc9c1a413c01eeda679896ebb761f8feb5236fe9c (diff)
downloadglibc-d665367f596d3461dd3f434a98b8d9f9f7d7763f.zip
glibc-d665367f596d3461dd3f434a98b8d9f9f7d7763f.tar.gz
glibc-d665367f596d3461dd3f434a98b8d9f9f7d7763f.tar.bz2
linux: Enable vDSO for static linking as default (BZ#19767)
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.
-rw-r--r--ChangeLog32
-rw-r--r--sysdeps/unix/sysv/linux/aarch64/sysdep.h3
-rw-r--r--sysdeps/unix/sysv/linux/arm/sysdep.h3
-rw-r--r--sysdeps/unix/sysv/linux/i386/sysdep.h3
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips32/sysdep.h3
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h3
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h3
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h3
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h3
-rw-r--r--sysdeps/unix/sysv/linux/riscv/sysdep.h3
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h3
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h3
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sysdep.h3
-rw-r--r--sysdeps/unix/sysv/linux/sysdep-vdso.h2
-rw-r--r--sysdeps/unix/sysv/linux/sysdep.h7
-rw-r--r--sysdeps/unix/sysv/linux/x86/libc-vdso.h6
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/sysdep.h3
17 files changed, 34 insertions, 52 deletions
diff --git a/ChangeLog b/ChangeLog
index 5fd2019..2e21197 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,38 @@
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.
* sysdeps/unix/sysv/linux/sparc/sysdep.h (ALWAYS_USE_VSYSCALL):
diff --git a/sysdeps/unix/sysv/linux/aarch64/sysdep.h b/sysdeps/unix/sysv/linux/aarch64/sysdep.h
index 935c507f..a2f4061 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 <sysdeps/unix/sysdep.h>
#include <sysdeps/aarch64/sysdep.h>
#include <sysdeps/unix/sysv/linux/generic/sysdep.h>
diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h
index 9b4ed8d..6d8d9a4 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 <sysdeps/unix/sysv/linux/sysdep.h>
#include <sysdeps/unix/arm/sysdep.h>
diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h
index 0be1074..77154b9 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 <sysdeps/unix/sysv/linux/sysdep.h>
#include <sysdeps/unix/i386/sysdep.h>
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h
index 5a2704e..a310a0a 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 <sysdeps/unix/sysv/linux/sysdep.h>
#include <sysdeps/unix/mips/mips32/sysdep.h>
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h
index a4f3547..d83e08f 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 <sysdeps/unix/sysv/linux/sysdep.h>
#include <sysdeps/unix/mips/mips64/n32/sysdep.h>
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h b/sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h
index 5b4d277..bcfaf56 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 <sysdeps/unix/sysv/linux/sysdep.h>
#include <sysdeps/unix/mips/mips64/n64/sysdep.h>
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h b/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h
index bdbab8e..62caa26 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 <sysdeps/unix/sysv/linux/sysdep.h>
#include <sysdeps/unix/powerpc/sysdep.h>
#include <tls.h>
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h
index 294517e..4122e5c 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 <sysdeps/unix/sysv/linux/sysdep.h>
#include <sysdeps/unix/powerpc/sysdep.h>
#include <tls.h>
diff --git a/sysdeps/unix/sysv/linux/riscv/sysdep.h b/sysdeps/unix/sysv/linux/riscv/sysdep.h
index caf013a..5470ea3 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 <sysdeps/unix/sysv/linux/generic/sysdep.h>
#include <tls.h>
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h b/sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h
index 47d1c5c..640fb52 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 <sysdeps/s390/s390-32/sysdep.h>
#include <sysdeps/unix/sysdep.h>
#include <sysdeps/unix/sysv/linux/sysdep.h>
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h
index 2552aaa..9a9834c 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h
@@ -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>
diff --git a/sysdeps/unix/sysv/linux/sparc/sysdep.h b/sysdeps/unix/sysv/linux/sparc/sysdep.h
index fc4053c..981b2a2 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 <sysdeps/unix/sysdep.h>
#include <sysdeps/unix/sysv/linux/sysdep.h>
#include <sysdeps/sparc/sysdep.h>
diff --git a/sysdeps/unix/sysv/linux/sysdep-vdso.h b/sysdeps/unix/sysv/linux/sysdep-vdso.h
index c5a1ae0..5fec208 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 <libc-vdso.h>
diff --git a/sysdeps/unix/sysv/linux/sysdep.h b/sysdeps/unix/sysv/linux/sysdep.h
index f94cfa2..af1c9a2 100644
--- a/sysdeps/unix/sysv/linux/sysdep.h
+++ b/sysdeps/unix/sysv/linux/sysdep.h
@@ -18,13 +18,6 @@
#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 *). */
diff --git a/sysdeps/unix/sysv/linux/x86/libc-vdso.h b/sysdeps/unix/sysv/linux/x86/libc-vdso.h
index ea35c71..c9aa1c8 100644
--- a/sysdeps/unix/sysv/linux/x86/libc-vdso.h
+++ b/sysdeps/unix/sysv/linux/x86/libc-vdso.h
@@ -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 */
diff --git a/sysdeps/unix/sysv/linux/x86_64/sysdep.h b/sysdeps/unix/sysv/linux/x86_64/sysdep.h
index b88c46b..0a3ddd3 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 <sysdeps/unix/sysv/linux/sysdep.h>
#include <sysdeps/unix/x86_64/sysdep.h>