Message ID | qnnds-QEJN1jzXU6DlIgAkH6S2HmF89Oq8QTMJFpPwRNXDB1eC3Vb0wY2DurtQaUWndkqWJ-8fFRV488osA-aYNyILrMq40dv4b9XzMtevM=@espindo.la |
---|---|
State | New |
Headers | show |
Series | Enable VDSO on i386 statically linked programs. | expand |
I forgot to include a ChangeLog. It is: 2018-10-09 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 USE_VSYSCALL. Cheers, Rafael ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Tuesday, October 9, 2018 9:51 PM, Rafael Avila de Espindola <rafael@espindo.la> wrote: > > > Now that the infrastructure is in place this is pretty easy. > > ------------------------------------------------------------------- > > sysdeps/unix/sysv/linux/i386/init-first.c | 12 +++++------- > sysdeps/unix/sysv/linux/i386/sysdep.h | 5 +++++ > 2 files changed, 10 insertions(+), 7 deletions(-) > > diff --git a/sysdeps/unix/sysv/linux/i386/init-first.c b/sysdeps/unix/sysv/linux/i386/init-first.c > index 82ac7f5cf2..6e62dd5923 100644 > --- a/sysdeps/unix/sysv/linux/i386/init-first.c > +++ b/sysdeps/unix/sysv/linux/i386/init-first.c > @@ -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> > diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h > index 3255cc78b8..cd44727ae6 100644 > --- a/sysdeps/unix/sysv/linux/i386/sysdep.h > +++ b/sysdeps/unix/sysv/linux/i386/sysdep.h > @@ -19,6 +19,11 @@ > #ifndef _LINUX_I386_SYSDEP_H > #define _LINUX_I386_SYSDEP_H 1 > > +/* Always enable vsyscalls on i386 / > +#ifndef USE_VSYSCALL > +#define USE_VSYSCALL > +#endif > + > / There is some commonality. */#include <sysdeps/unix/sysv/linux/sysdep.h> > #include <sysdeps/unix/i386/sysdep.h> > -- > 2.17.1
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. Cheers, Rafael ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Sunday, November 11, 2018 6:07 PM, Rafael Avila de Espindola <rafael@espindo.la> wrote: > I forgot to include a ChangeLog. It is: > > 2018-10-09 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 USE_VSYSCALL. > > Cheers, > Rafael > > ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ > On Tuesday, October 9, 2018 9:51 PM, Rafael Avila de Espindola rafael@espindo.la wrote: > > > Now that the infrastructure is in place this is pretty easy. > > > > sysdeps/unix/sysv/linux/i386/init-first.c | 12 +++++------- > > sysdeps/unix/sysv/linux/i386/sysdep.h | 5 +++++ > > 2 files changed, 10 insertions(+), 7 deletions(-) > > diff --git a/sysdeps/unix/sysv/linux/i386/init-first.c b/sysdeps/unix/sysv/linux/i386/init-first.c > > index 82ac7f5cf2..6e62dd5923 100644 > > --- a/sysdeps/unix/sysv/linux/i386/init-first.c > > +++ b/sysdeps/unix/sysv/linux/i386/init-first.c > > @@ -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> > > diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h > > index 3255cc78b8..cd44727ae6 100644 > > --- a/sysdeps/unix/sysv/linux/i386/sysdep.h > > +++ b/sysdeps/unix/sysv/linux/i386/sysdep.h > > @@ -19,6 +19,11 @@ > > #ifndef _LINUX_I386_SYSDEP_H > > #define _LINUX_I386_SYSDEP_H 1 > > > > +/* Always enable vsyscalls on i386 / > > +#ifndef USE_VSYSCALL > > +#define USE_VSYSCALL > > +#endif > > + > > / There is some commonality. */#include <sysdeps/unix/sysv/linux/sysdep.h> > > #include <sysdeps/unix/i386/sysdep.h> > > > > ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > > > > 2.17.1 From 0431353a688cf29262631c4937a977bcb6b538ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20=C3=81vila=20de=20Esp=C3=ADndola?= <rafael@espindo.la> Date: Thu, 8 Nov 2018 23:27:57 -0800 Subject: [PATCH] Enable VDSO on i386 statically linked programs. Now that the infrastructure is in place this is pretty easy. --- sysdeps/unix/sysv/linux/i386/init-first.c | 12 +++++------- sysdeps/unix/sysv/linux/i386/sysdep.h | 3 +++ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/sysdeps/unix/sysv/linux/i386/init-first.c b/sysdeps/unix/sysv/linux/i386/init-first.c index 82ac7f5cf2..6e62dd5923 100644 --- a/sysdeps/unix/sysv/linux/i386/init-first.c +++ b/sysdeps/unix/sysv/linux/i386/init-first.c @@ -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> diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h index 3255cc78b8..3891663a64 100644 --- a/sysdeps/unix/sysv/linux/i386/sysdep.h +++ b/sysdeps/unix/sysv/linux/i386/sysdep.h @@ -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>
"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? Thanks, Rafael
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.
"H.J. Lu" <hjl.tools@gmail.com> writes: >> Could you please commit it? >> > > This is what I pushed. > Thanks! Cheers, Rafael
diff --git a/sysdeps/unix/sysv/linux/i386/init-first.c b/sysdeps/unix/sysv/linux/i386/init-first.c index 82ac7f5cf2..6e62dd5923 100644 --- a/sysdeps/unix/sysv/linux/i386/init-first.c +++ b/sysdeps/unix/sysv/linux/i386/init-first.c @@ -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> diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h index 3255cc78b8..cd44727ae6 100644 --- a/sysdeps/unix/sysv/linux/i386/sysdep.h +++ b/sysdeps/unix/sysv/linux/i386/sysdep.h @@ -19,6 +19,11 @@ #ifndef _LINUX_I386_SYSDEP_H #define _LINUX_I386_SYSDEP_H 1 +/* Always enable vsyscalls on i386 */ +#ifndef USE_VSYSCALL +#define USE_VSYSCALL +#endif + /* There is some commonality. */ #include <sysdeps/unix/sysv/linux/sysdep.h> #include <sysdeps/unix/i386/sysdep.h>