Enable VDSO on powerpc statically linked programs.
Commit Message
The attached program enables vdso on powerpc statically linked programs.
The gcc compile farm only has 64 bit powerpc machines, so that is all I was able to test.
2018-11-11 Rafael Ávila de Espíndola <rafael@espindo.la>
[BZ #19767]
* sysdeps/unix/sysv/linux/powerpc/init-first.c: remove #ifdef SHARED.
* sysdeps/unix/sysv/linux/powerpc/libc-vdso.h: remove #ifdef SHARED.
* sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h: define USE_VSYSCALL.
* sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h: define USE_VSYSCALL.
Comments
On Nov 12 2018, Rafael Avila de Espindola <rafael@espindo.la> wrote:
> The gcc compile farm only has 64 bit powerpc machines, so that is all I was able to test.
gcc110 also has -m32.
Andreas.
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Monday, November 12, 2018 12:47 AM, Andreas Schwab <schwab@suse.de> wrote:
> On Nov 12 2018, Rafael Avila de Espindola rafael@espindo.la wrote:
>
> > The gcc compile farm only has 64 bit powerpc machines, so that is all I was able to test.
>
> gcc110 also has -m32.
Awesome. Thanks!
Cheers,
Rafael
From a7070e1793da4fdc4a9a88d81e9297655b8849f8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rafael=20=C3=81vila=20de=20Esp=C3=ADndola?=
<rafael@espindo.la>
Date: Sun, 11 Nov 2018 17:53:10 -0800
Subject: [PATCH] Enable VDSO on static on powerpc.
---
sysdeps/unix/sysv/linux/powerpc/init-first.c | 8 +++-----
sysdeps/unix/sysv/linux/powerpc/libc-vdso.h | 4 ----
sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h | 5 +++++
sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h | 5 +++++
4 files changed, 13 insertions(+), 9 deletions(-)
@@ -16,9 +16,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;
@@ -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 <csu/init-first.c>
@@ -20,8 +20,6 @@
#ifndef _LIBC_VDSO_H
#define _LIBC_VDSO_H
-#ifdef SHARED
-
#include <sysdep-vdso.h>
extern int (*VDSO_SYMBOL(gettimeofday)) (struct timeval *, void *)
@@ -69,6 +67,4 @@ extern void *VDSO_SYMBOL(sigtramp_rt32);
#define VDSO_IFUNC_RET(value) ((void *) (value))
#endif
-#endif
-
#endif /* _LIBC_VDSO_H */
@@ -18,6 +18,11 @@
#ifndef _LINUX_POWERPC_SYSDEP_H
#define _LINUX_POWERPC_SYSDEP_H 1
+/* Always enable vsyscalls on powerpc32 */
+#ifndef USE_VSYSCALL
+#define USE_VSYSCALL
+#endif
+
#include <sysdeps/unix/sysv/linux/sysdep.h>
#include <sysdeps/unix/powerpc/sysdep.h>
#include <tls.h>
@@ -20,6 +20,11 @@
#ifndef _LINUX_POWERPC_SYSDEP_H
#define _LINUX_POWERPC_SYSDEP_H 1
+/* Always enable vsyscalls on powerpc64 */
+#ifndef USE_VSYSCALL
+#define USE_VSYSCALL
+#endif
+
#include <sysdeps/unix/sysv/linux/sysdep.h>
#include <sysdeps/unix/powerpc/sysdep.h>
#include <tls.h>
--
2.19.1