Enable VDSO on i386 statically linked programs.
Commit Message
On Fri, Nov 30, 2018 at 12:22 PM Rafael Avila de Espindola
<rafael@espindo.la> wrote:
>
> "H.J. Lu" <hjl.tools@gmail.com> writes:
>
> > On Mon, Nov 12, 2018 at 3:17 PM Rafael Avila de Espindola
> > <rafael@espindo.la> wrote:
> >>
> >> A rebased version is attached. The new changelog is
> >>
> >>
> >>
> >> 2018-11-12 Rafael Ávila de Espíndola <rafael@espindo.la>
> >>
> >> [BZ #19767]
> >> * sysdeps/unix/sysv/linux/i386/init-first.c: remove #ifdef SHARED.
> >> * sysdeps/unix/sysv/linux/i386/sysdep.h: define ALWAYS_USE_VSYSCALL.
> >
> > LGTM.
>
> Could you please commit it?
>
This is what I pushed.
Comments
"H.J. Lu" <hjl.tools@gmail.com> writes:
>> Could you please commit it?
>>
>
> This is what I pushed.
>
Thanks!
Cheers,
Rafael
From 15b8d67e29142251a30576b5ab469051a8833e97 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafael=20=C3=81vila=20de=20Esp=C3=ADndola?=
<rafael@espindo.la>
Date: Fri, 30 Nov 2018 14:32:35 -0800
Subject: [PATCH] Enable VDSO on i386 statically linked programs
[BZ #19767]
* sysdeps/unix/sysv/linux/i386/init-first.c: Don't check SHARED.
* sysdeps/unix/sysv/linux/i386/sysdep.h (ALWAYS_USE_VSYSCALL):
New.
---
ChangeLog | 7 +++++++
sysdeps/unix/sysv/linux/i386/init-first.c | 12 +++++-------
sysdeps/unix/sysv/linux/i386/sysdep.h | 3 +++
3 files changed, 15 insertions(+), 7 deletions(-)
@@ -1,3 +1,10 @@
+2018-11-30 Rafael Ãvila de EspÃndola <rafael@espindo.la>
+
+ [BZ #19767]
+ * sysdeps/unix/sysv/linux/i386/init-first.c: Don't check SHARED.
+ * sysdeps/unix/sysv/linux/i386/sysdep.h (ALWAYS_USE_VSYSCALL):
+ New.
+
2018-11-30 Florian Weimer <fweimer@redhat.com>
* scripts/abilist.awk: Print "0x0" for size 0. Handle "g"/"D".
@@ -16,11 +16,10 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#ifdef SHARED
-# include <time.h>
-# include <sysdep.h>
-# include <dl-vdso.h>
-# include <sysdep-vdso.h>
+#include <time.h>
+#include <sysdep.h>
+#include <dl-vdso.h>
+#include <sysdep-vdso.h>
long int (*VDSO_SYMBOL (clock_gettime)) (clockid_t, struct timespec *)
attribute_hidden;
@@ -44,7 +43,6 @@ __vdso_platform_setup (void)
VDSO_SYMBOL (clock_gettime) = p;
}
-# define VDSO_SETUP __vdso_platform_setup
-#endif
+#define VDSO_SETUP __vdso_platform_setup
#include <csu/init-first.c>
@@ -19,6 +19,9 @@
#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>
--
2.19.2