aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/powerpc
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/powerpc')
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/gettimeofday.c5
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/init-first.c22
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h7
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h6
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/sysdep.h25
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/time.c5
6 files changed, 40 insertions, 30 deletions
diff --git a/sysdeps/unix/sysv/linux/powerpc/gettimeofday.c b/sysdeps/unix/sysv/linux/powerpc/gettimeofday.c
index 7605357307..40549fe6dd 100644
--- a/sysdeps/unix/sysv/linux/powerpc/gettimeofday.c
+++ b/sysdeps/unix/sysv/linux/powerpc/gettimeofday.c
@@ -57,9 +57,8 @@ __gettimeofday_syscall (struct timeval *tv, struct timezone *tz)
return INLINE_SYSCALL (gettimeofday, 2, tv, tz);
}
-# define INIT_ARCH() \
- PREPARE_VERSION_KNOWN (linux2615, LINUX_2_6_15); \
- void *vdso_gettimeofday = _dl_vdso_vsym ("__kernel_gettimeofday", &linux2615);
+# define INIT_ARCH() \
+ void *vdso_gettimeofday = get_vdso_symbol ("__kernel_gettimeofday")
/* If the vDSO is not available we fall back syscall. */
libc_ifunc_hidden (__redirect___gettimeofday, __gettimeofday,
diff --git a/sysdeps/unix/sysv/linux/powerpc/init-first.c b/sysdeps/unix/sysv/linux/powerpc/init-first.c
index 4b285fb842..b1618ed0b1 100644
--- a/sysdeps/unix/sysv/linux/powerpc/init-first.c
+++ b/sysdeps/unix/sysv/linux/powerpc/init-first.c
@@ -37,29 +37,27 @@ void *VDSO_SYMBOL(sigtramp_rt32);
static inline void
_libc_vdso_platform_setup (void)
{
- PREPARE_VERSION_KNOWN (linux2615, LINUX_2_6_15);
-
- void *p = _dl_vdso_vsym ("__kernel_gettimeofday", &linux2615);
+ void *p = get_vdso_symbol ("__kernel_gettimeofday");
PTR_MANGLE (p);
VDSO_SYMBOL (gettimeofday) = p;
- p = _dl_vdso_vsym ("__kernel_clock_gettime", &linux2615);
+ p = get_vdso_symbol ("__kernel_clock_gettime");
PTR_MANGLE (p);
VDSO_SYMBOL (clock_gettime) = p;
- p = _dl_vdso_vsym ("__kernel_clock_getres", &linux2615);
+ p = get_vdso_symbol ("__kernel_clock_getres");
PTR_MANGLE (p);
VDSO_SYMBOL (clock_getres) = p;
- p = _dl_vdso_vsym ("__kernel_get_tbfreq", &linux2615);
+ p = get_vdso_symbol ("__kernel_get_tbfreq");
PTR_MANGLE (p);
VDSO_SYMBOL (get_tbfreq) = p;
- p = _dl_vdso_vsym ("__kernel_getcpu", &linux2615);
+ p = get_vdso_symbol ("__kernel_getcpu");
PTR_MANGLE (p);
VDSO_SYMBOL (getcpu) = p;
- p = _dl_vdso_vsym ("__kernel_time", &linux2615);
+ p = get_vdso_symbol ("__kernel_time");
PTR_MANGLE (p);
VDSO_SYMBOL (time) = p;
@@ -69,12 +67,10 @@ _libc_vdso_platform_setup (void)
There is no need to pointer mangle these symbol because they will
used only for pointer comparison. */
#if defined(__PPC64__) || defined(__powerpc64__)
- VDSO_SYMBOL(sigtramp_rt64) = _dl_vdso_vsym ("__kernel_sigtramp_rt64",
- &linux2615);
+ VDSO_SYMBOL(sigtramp_rt64) = get_vdso_symbol ("__kernel_sigtramp_rt64");
#else
- VDSO_SYMBOL(sigtramp32) = _dl_vdso_vsym ("__kernel_sigtramp32", &linux2615);
- VDSO_SYMBOL(sigtramp_rt32) = _dl_vdso_vsym ("__kernel_sigtramp_rt32",
- &linux2615);
+ VDSO_SYMBOL(sigtramp32) = get_vdso_symbol ("__kernel_sigtramp32");
+ VDSO_SYMBOL(sigtramp_rt32) = get_vdso_symbol ("__kernel_sigtramp_rt32");
#endif
}
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h b/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h
index 75d5831018..1cbf1596d5 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h
@@ -18,6 +18,7 @@
#ifndef _LINUX_POWERPC_SYSDEP_H
#define _LINUX_POWERPC_SYSDEP_H 1
+#include <sysdeps/unix/sysv/linux/powerpc/sysdep.h>
#include <sysdeps/unix/sysv/linux/sysdep.h>
#include <sysdeps/unix/powerpc/sysdep.h>
#include <tls.h>
@@ -144,12 +145,6 @@
sc_ret; \
})
-/* List of system calls which are supported as vsyscalls. */
-# define HAVE_CLOCK_GETRES_VSYSCALL 1
-# define HAVE_CLOCK_GETTIME_VSYSCALL 1
-# define HAVE_GETCPU_VSYSCALL 1
-
-
# define LOADARGS_0(name, dummy) \
r0 = name
# define LOADARGS_1(name, __arg1) \
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h
index e662cca4fe..fac7a9ac2e 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h
@@ -20,6 +20,7 @@
#ifndef _LINUX_POWERPC_SYSDEP_H
#define _LINUX_POWERPC_SYSDEP_H 1
+#include <sysdeps/unix/sysv/linux/powerpc/sysdep.h>
#include <sysdeps/unix/sysv/linux/sysdep.h>
#include <sysdeps/unix/powerpc/sysdep.h>
#include <tls.h>
@@ -60,11 +61,6 @@
sc_ret; \
})
-/* List of system calls which are supported as vsyscalls. */
-#define HAVE_CLOCK_GETRES_VSYSCALL 1
-#define HAVE_CLOCK_GETTIME_VSYSCALL 1
-#define HAVE_GETCPU_VSYSCALL 1
-
/* Define a macro which expands inline into the wrapper code for a system
call. This use is for internal calls that do not need to handle errors
normally. It will never touch errno. This returns just what the kernel
diff --git a/sysdeps/unix/sysv/linux/powerpc/sysdep.h b/sysdeps/unix/sysv/linux/powerpc/sysdep.h
new file mode 100644
index 0000000000..c72c93dfa0
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/powerpc/sysdep.h
@@ -0,0 +1,25 @@
+/* Syscall definitions, Linux PowerPC generic version.
+ Copyright (C) 2019 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define VDSO_NAME "LINUX_2.6.15"
+#define VDSO_HASH 123718565
+
+/* List of system calls which are supported as vsyscalls. */
+#define HAVE_CLOCK_GETRES_VSYSCALL 1
+#define HAVE_CLOCK_GETTIME_VSYSCALL 1
+#define HAVE_GETCPU_VSYSCALL 1
diff --git a/sysdeps/unix/sysv/linux/powerpc/time.c b/sysdeps/unix/sysv/linux/powerpc/time.c
index 41092b3b98..2a0b776927 100644
--- a/sysdeps/unix/sysv/linux/powerpc/time.c
+++ b/sysdeps/unix/sysv/linux/powerpc/time.c
@@ -66,9 +66,8 @@ time_syscall (time_t *t)
return result;
}
-# define INIT_ARCH() \
- PREPARE_VERSION_KNOWN (linux2615, LINUX_2_6_15); \
- void *vdso_time = _dl_vdso_vsym ("__kernel_time", &linux2615);
+# define INIT_ARCH() \
+ void *vdso_time = get_vdso_symbol ("__kernel_time");
/* If the vDSO is not available we fall back to the syscall. */
libc_ifunc_hidden (__redirect_time, time,