summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Chestnykh <dm.chestnykh@gmail.com>2024-04-20 19:09:12 +0300
committerWaldemar Brodkorb <wbx@openadk.org>2024-04-21 10:21:34 +0200
commit016371460afd6126b6857561f51d40d09c1b8120 (patch)
treeaeb70b789aa0644fd045d960c7d32fbb8ed7d0eb
parent7e528892baee2234b8db434bc08c82f83c4b928c (diff)
x86: Add vDSO support.
Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
-rw-r--r--extra/Configs/Config.i3861
-rw-r--r--ldso/ldso/i386/dl-syscalls.h28
2 files changed, 29 insertions, 0 deletions
diff --git a/extra/Configs/Config.i386 b/extra/Configs/Config.i386
index c928ac1a2..c2a9a6e93 100644
--- a/extra/Configs/Config.i386
+++ b/extra/Configs/Config.i386
@@ -14,6 +14,7 @@ config FORCE_OPTIONS_FOR_ARCH
select ARCH_HAS_MMU
select ARCH_HAS_UCONTEXT
select ARCH_HAS_DEPRECATED_SYSCALLS
+ select ARCH_VDSO_SUPPORT
choice
prompt "Target x86 Processor Family"
diff --git a/ldso/ldso/i386/dl-syscalls.h b/ldso/ldso/i386/dl-syscalls.h
index f40c4fd31..8f144ee28 100644
--- a/ldso/ldso/i386/dl-syscalls.h
+++ b/ldso/ldso/i386/dl-syscalls.h
@@ -1 +1,29 @@
+/* stub for arch-specific syscall issues/specific implementations */
+
+#ifndef _DL_SYSCALLS_H
+#define _DL_SYSCALLS_H
+
+#if defined(__VDSO_SUPPORT__) && !defined(UCLIBC_LDSO)
+
+#include "../dl-vdso-calls.h"
+
+static int __attribute__ ((used)) __x86_vdso_clock_gettime(clockid_t clock_id, struct timespec *tp);
+static int __attribute__ ((used)) __x86_vdso_clock_gettime(clockid_t clock_id, struct timespec *tp)
+{
+ return __generic_vdso_clock_gettime(clock_id, tp);
+}
+
+static int __attribute__ ((used)) __x86_vdso_gettimeofday(struct timeval *tv, __timezone_ptr_t tz);
+static int __attribute__ ((used)) __x86_vdso_gettimeofday(struct timeval *tv, __timezone_ptr_t tz)
+{
+ return __generic_vdso_gettimeofday(tv, tz);
+}
+
+#define ARCH_VDSO_GETTIMEOFDAY(tv, tz) __x86_vdso_gettimeofday(tv, tz)
+#define ARCH_VDSO_CLOCK_GETTIME(clock_id, tp) __x86_vdso_clock_gettime(clock_id, tp)
+
+#endif /* defined(__VDSO_SUPPORT__) && !defined(UCLIBC_LDSO) */
+
+#endif /* _DL_SYSCALLS_H */
+
/* stub for arch-specific syscall issues */