]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Enable VDSO for static linking on arm
authorRafael Ávila de Espíndola <rafael@espindo.la>
Mon, 3 Dec 2018 20:59:22 +0000 (20:59 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Mon, 3 Dec 2018 20:59:22 +0000 (20:59 +0000)
I have tested that this builds and the resulting program still work.
The kernel in gcc117 (which I ussed for testing) seems to be missing
https://patchwork.kernel.org/patch/10060431/, so the vdso is never used.

[BZ #19767]
* sysdeps/unix/sysv/linux/arm/init-first.c: Remove #ifdef SHARED.
* sysdeps/unix/sysv/linux/arm/libc-vdso.h: Remove #ifdef SHARED.
* sysdeps/unix/sysv/linux/arm/sysdep.h: Define
ALWAYS_USE_VSYSCALL.

ChangeLog
sysdeps/unix/sysv/linux/arm/init-first.c
sysdeps/unix/sysv/linux/arm/libc-vdso.h
sysdeps/unix/sysv/linux/arm/sysdep.h

index c094c9044060a9502c37461c62179ef100e17b88..a534c4a5f4005f15025dc714432adfd6ed45e3c5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2018-12-03  Rafael Ávila de Espíndola  <rafael@espindo.la>
+
+       [BZ #19767]
+       * sysdeps/unix/sysv/linux/arm/init-first.c: Remove #ifdef SHARED.
+       * sysdeps/unix/sysv/linux/arm/libc-vdso.h: Remove #ifdef SHARED.
+       * sysdeps/unix/sysv/linux/arm/sysdep.h: Define
+       ALWAYS_USE_VSYSCALL.
+
 2018-12-03  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
 
        [BZ #23913]
index f4293b1cf8239504fe372c3b89f90d0a314ec7d1..7fbdc272275e9a8a6a96d23469bc7021170780da 100644 (file)
@@ -17,9 +17,9 @@
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#ifdef SHARED
-# include <dl-vdso.h>
-# include <libc-vdso.h>
+#include <dl-vdso.h>
+#include <libc-vdso.h>
+#include <sysdep-vdso.h>
 
 int (*VDSO_SYMBOL(gettimeofday)) (struct timeval *, void *) attribute_hidden;
 int (*VDSO_SYMBOL(clock_gettime)) (clockid_t, struct timespec *);
@@ -38,7 +38,6 @@ _libc_vdso_platform_setup (void)
   VDSO_SYMBOL (clock_gettime) = p;
 }
 
-# define VDSO_SETUP _libc_vdso_platform_setup
-#endif
+#define VDSO_SETUP _libc_vdso_platform_setup
 
 #include <csu/init-first.c>
index 52dd3558185f3638c688b1bf2654d85350a59474..2a8979d35600a2f6fcb3226096d4cf087659f52e 100644 (file)
 #ifndef _LIBC_VDSO_H
 #define _LIBC_VDSO_H
 
-#ifdef SHARED
-
-# include <sysdep-vdso.h>
+#include <sysdep-vdso.h>
 
 extern int (*VDSO_SYMBOL(gettimeofday)) (struct timeval *, void *)
    attribute_hidden;
 extern int (*VDSO_SYMBOL(clock_gettime)) (clockid_t, struct timespec *);
 
-#endif
-
 #endif /* _LIBC_VDSO_H */
index 174c530412c2542b5e6f425f06d47ff0c35f4b52..3902d46d5572175b929eb00834e71a6849be7fa3 100644 (file)
@@ -20,6 +20,9 @@
 #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>