From 8ae74eadb60eb36424e4605939cef5fc966724be Mon Sep 17 00:00:00 2001 From: Rafael Ávila de Espíndola Date: Mon, 26 Nov 2018 11:35:26 -0200 Subject: Enable VDSO on powerpc statically linked programs (bug 19767) [BZ #19767] * sysdeps/unix/sysv/linux/powerpc/init-first.c: Remove #ifdef SHARED. * sysdeps/unix/sysv/linux/powerpc/libc-vdso.h: Remove #ifdef SHARED. Include sysdep.h. * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h: Define ALWAYS_USE_VSYSCALL. * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h: Define ALWAYS_USE_VSYSCALL. Reviewed-by: Tulio Magno Quites Machado Filho --- sysdeps/unix/sysv/linux/powerpc/init-first.c | 8 +++----- sysdeps/unix/sysv/linux/powerpc/libc-vdso.h | 5 +---- sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h | 3 +++ sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h | 3 +++ 4 files changed, 10 insertions(+), 9 deletions(-) (limited to 'sysdeps/unix/sysv/linux/powerpc') diff --git a/sysdeps/unix/sysv/linux/powerpc/init-first.c b/sysdeps/unix/sysv/linux/powerpc/init-first.c index 0a4becbed6..c8a28008db 100644 --- a/sysdeps/unix/sysv/linux/powerpc/init-first.c +++ b/sysdeps/unix/sysv/linux/powerpc/init-first.c @@ -16,9 +16,8 @@ License along with the GNU C Library; if not, see . */ -#ifdef SHARED -# include -# include +#include +#include int (*VDSO_SYMBOL(gettimeofday)) (struct timeval *, void *) attribute_hidden; @@ -79,7 +78,6 @@ _libc_vdso_platform_setup (void) #endif } -# define VDSO_SETUP _libc_vdso_platform_setup -#endif +#define VDSO_SETUP _libc_vdso_platform_setup #include diff --git a/sysdeps/unix/sysv/linux/powerpc/libc-vdso.h b/sysdeps/unix/sysv/linux/powerpc/libc-vdso.h index 5fe817d6cb..6f55944a51 100644 --- a/sysdeps/unix/sysv/linux/powerpc/libc-vdso.h +++ b/sysdeps/unix/sysv/linux/powerpc/libc-vdso.h @@ -20,8 +20,7 @@ #ifndef _LIBC_VDSO_H #define _LIBC_VDSO_H -#ifdef SHARED - +#include #include extern int (*VDSO_SYMBOL(gettimeofday)) (struct timeval *, void *) @@ -69,6 +68,4 @@ extern void *VDSO_SYMBOL(sigtramp_rt32); #define VDSO_IFUNC_RET(value) ((void *) (value)) #endif -#endif - #endif /* _LIBC_VDSO_H */ diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h b/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h index ec5c5250f8..6fe0a9951f 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h @@ -18,6 +18,9 @@ #ifndef _LINUX_POWERPC_SYSDEP_H #define _LINUX_POWERPC_SYSDEP_H 1 +/* Always enable vsyscalls on powerpc32 */ +#define ALWAYS_USE_VSYSCALL 1 + #include #include #include diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h index 1f17f7bd5f..4d4015a03d 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h @@ -20,6 +20,9 @@ #ifndef _LINUX_POWERPC_SYSDEP_H #define _LINUX_POWERPC_SYSDEP_H 1 +/* Always enable vsyscalls on powerpc64 */ +#define ALWAYS_USE_VSYSCALL 1 + #include #include #include -- cgit 1.4.1