]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Enable VDSO for static linking on mips
authorRafael Ávila de Espíndola <rafael@espindo.la>
Mon, 10 Dec 2018 21:27:54 +0000 (21:27 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Mon, 10 Dec 2018 21:27:54 +0000 (21:27 +0000)
I have tested that this builds and the resulting program still work.

This was tested on gcc23.fsffrance.org, and for some reason the vdso
there seems unused even when using shared libraries.

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

ChangeLog
sysdeps/unix/sysv/linux/mips/init-first.c
sysdeps/unix/sysv/linux/mips/libc-vdso.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

index 1d21435858ee21148f2ae699b330eb9933ac75b3..e47fbd71192c5c2a431fdefb80d1893ad21e94fd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2018-12-10  Rafael Ávila de Espíndola  <rafael@espindo.la>
+
+       [BZ #19767]
+       * sysdeps/unix/sysv/linux/mips/init-first.c: Remove #ifdef SHARED.
+        * sysdeps/unix/sysv/linux/mips/libc-vdso.h: Remove #ifdef SHARED.
+        * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h: Define
+       ALWAYS_USE_VSYSCALL.
+        * sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h: Define
+       ALWAYS_USE_VSYSCALL.
+       * sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h: Define
+       ALWAYS_USE_VSYSCALL.
+
 2018-12-10  Florian Weimer  <fweimer@redhat.com>
 
        [BZ #23972]
index 0cf8279c73a8fbfa099d62e861512b6c42f63440..2e04a6b0504b1d0a0a0c7139b932c39ffdca054c 100644 (file)
@@ -17,9 +17,8 @@
    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>
 
 int (*VDSO_SYMBOL(gettimeofday)) (struct timeval *, void *) attribute_hidden;
 int (*VDSO_SYMBOL(clock_gettime)) (clockid_t, struct timespec *);
@@ -38,7 +37,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 c36e22dc400c833384478e720da4f6c41504b6ff..f8f89fbcf2551d45df3386a7a698ecdda2ed6645 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 cbe9cd2bda470133139dc76d92a48c73aad7bd6e..2d6e0234b602a091118a39f76c1ce6a74ff5389c 100644 (file)
@@ -18,6 +18,9 @@
 #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 8e3117d7a7aa477049cddec37328a827ee4187a8..5c8181cd2903f3ad63a685f316e0da4a676ee909 100644 (file)
@@ -18,6 +18,9 @@
 #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 c9046a06b89495367dd46a332609fc99ec18bb28..7c71d1ed121f868c26b4b985151702280e7e3e06 100644 (file)
@@ -18,6 +18,9 @@
 #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>