summaryrefslogtreecommitdiff
path: root/ldso/ldso
diff options
context:
space:
mode:
Diffstat (limited to 'ldso/ldso')
-rw-r--r--ldso/ldso/aarch64/dl-syscalls.h39
-rw-r--r--ldso/ldso/aarch64/elfinterp.c6
-rw-r--r--ldso/ldso/arm/dl-syscalls.h29
-rw-r--r--ldso/ldso/arm/elfinterp.c6
-rw-r--r--ldso/ldso/dl-startup.c2
-rw-r--r--ldso/ldso/dl-vdso-calls.h68
-rwxr-xr-xldso/ldso/dl-vdso.c98
-rw-r--r--ldso/ldso/fdpic/dl-inlines.h4
-rw-r--r--ldso/ldso/fdpic/dl-sysdep.h2
-rw-r--r--ldso/ldso/i386/dl-syscalls.h28
-rw-r--r--ldso/ldso/mips/dl-syscalls.h29
-rw-r--r--ldso/ldso/x86_64/dl-syscalls.h29
12 files changed, 285 insertions, 55 deletions
diff --git a/ldso/ldso/aarch64/dl-syscalls.h b/ldso/ldso/aarch64/dl-syscalls.h
index f40c4fd31..7f3566d6b 100644
--- a/ldso/ldso/aarch64/dl-syscalls.h
+++ b/ldso/ldso/aarch64/dl-syscalls.h
@@ -1 +1,38 @@
-/* stub for arch-specific syscall issues */
+/* stub for arch-specific syscall issues/specific implementations */
+#ifndef _DL_SYSCALLS_H
+#define _DL_SYSCALLS_H
+
+#ifdef __ARCH_VDSO_GETTIMEOFDAY_NAME
+#undef __ARCH_VDSO_GETTIMEOFDAY_NAME
+#endif
+
+#ifdef __ARCH_VDSO_CLOCK_GETTIME_NAME
+#undef __ARCH_VDSO_CLOCK_GETTIME_NAME
+#endif
+
+#define __ARCH_VDSO_GETTIMEOFDAY_NAME "__kernel_gettimeofday"
+#define __ARCH_VDSO_CLOCK_GETTIME_NAME "__kernel_clock_gettime"
+
+#if defined(__VDSO_SUPPORT__) && !defined(UCLIBC_LDSO)
+
+#include "../dl-vdso-calls.h"
+
+static int __attribute__ ((used)) __aarch64_vdso_clock_gettime(clockid_t clock_id, struct timespec *tp);
+static int __attribute__ ((used)) __aarch64_vdso_clock_gettime(clockid_t clock_id, struct timespec *tp)
+{
+ return __generic_vdso_clock_gettime(clock_id, tp);
+}
+
+static int __attribute__ ((used)) __aarch64_vdso_gettimeofday(struct timeval *tv, __timezone_ptr_t tz);
+static int __attribute__ ((used)) __aarch64_vdso_gettimeofday(struct timeval *tv, __timezone_ptr_t tz)
+{
+ return __generic_vdso_gettimeofday(tv, tz);
+}
+
+#define ARCH_VDSO_GETTIMEOFDAY(tv, tz) __aarch64_vdso_gettimeofday(tv, tz)
+#define ARCH_VDSO_CLOCK_GETTIME(clock_id, tp) __aarch64_vdso_clock_gettime(clock_id, tp)
+
+#endif /* defined(__VDSO_SUPPORT__) && !defined(UCLIBC_LDSO) */
+
+#endif /* _DL_SYSCALLS_H */
+
diff --git a/ldso/ldso/aarch64/elfinterp.c b/ldso/ldso/aarch64/elfinterp.c
index 717a76980..9365569cc 100644
--- a/ldso/ldso/aarch64/elfinterp.c
+++ b/ldso/ldso/aarch64/elfinterp.c
@@ -238,6 +238,12 @@ _dl_do_reloc (struct elf_resolve *tpnt, struct r_scope_elem *scope,
}
}
break;
+ case R_AARCH64_TLS_DTPMOD:
+ *reloc_addr = tls_tpnt->l_tls_modid;
+ break;
+ case R_AARCH64_TLS_DTPREL:
+ *reloc_addr = symbol_addr + rpnt->r_addend;
+ break;
#endif
default:
return -1; /*call _dl_exit(1) */
diff --git a/ldso/ldso/arm/dl-syscalls.h b/ldso/ldso/arm/dl-syscalls.h
index f40c4fd31..5f6f7a883 100644
--- a/ldso/ldso/arm/dl-syscalls.h
+++ b/ldso/ldso/arm/dl-syscalls.h
@@ -1 +1,28 @@
-/* stub for arch-specific syscall issues */
+/* 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)) __arm_vdso_clock_gettime(clockid_t clock_id, struct timespec *tp);
+static int __attribute__ ((used)) __arm_vdso_clock_gettime(clockid_t clock_id, struct timespec *tp)
+{
+ return __generic_vdso_clock_gettime(clock_id, tp);
+}
+
+static int __attribute__ ((used)) __arm_vdso_gettimeofday(struct timeval *tv, __timezone_ptr_t tz);
+static int __attribute__ ((used)) __arm_vdso_gettimeofday(struct timeval *tv, __timezone_ptr_t tz)
+{
+ return __generic_vdso_gettimeofday(tv, tz);
+}
+
+#define ARCH_VDSO_GETTIMEOFDAY(tv, tz) __arm_vdso_gettimeofday(tv, tz)
+#define ARCH_VDSO_CLOCK_GETTIME(clock_id, tp) __arm_vdso_clock_gettime(clock_id, tp)
+
+#endif /* defined(__VDSO_SUPPORT__) && !defined(UCLIBC_LDSO) */
+
+#endif /* _DL_SYSCALLS_H */
+
diff --git a/ldso/ldso/arm/elfinterp.c b/ldso/ldso/arm/elfinterp.c
index 4c268356f..9c9a3e8ca 100644
--- a/ldso/ldso/arm/elfinterp.c
+++ b/ldso/ldso/arm/elfinterp.c
@@ -92,7 +92,7 @@ unsigned long _dl_linux_resolver (struct elf_resolve *tpnt, int reloc_offet)
*got_entry = funcval;
#endif
- return got_entry;
+ return (unsigned long)got_entry;
}
#else
unsigned long _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry)
@@ -362,7 +362,7 @@ _dl_do_reloc (struct elf_resolve *tpnt,struct r_scope_elem *scope,
unsigned long reloc_value = *reloc_addr;
if (symbol_addr)
- reloc_value = (unsigned long) _dl_funcdesc_for(symbol_addr + reloc_value, sym_ref.tpnt->loadaddr.got_value);
+ reloc_value = (unsigned long) _dl_funcdesc_for((void *)(symbol_addr + reloc_value), sym_ref.tpnt->loadaddr.got_value);
else
/* Relocation against an
undefined weak symbol:
@@ -429,7 +429,7 @@ _dl_do_lazy_reloc (struct elf_resolve *tpnt, struct r_scope_elem *scope,
{
struct funcdesc_value *dst = (struct funcdesc_value *) reloc_addr;
- dst->entry_point = DL_RELOC_ADDR(tpnt->loadaddr, dst->entry_point);
+ dst->entry_point = (void *)DL_RELOC_ADDR(tpnt->loadaddr, dst->entry_point);
dst->got_value = tpnt->loadaddr.got_value;
}
break;
diff --git a/ldso/ldso/dl-startup.c b/ldso/ldso/dl-startup.c
index 5b992a3a2..e7000bd87 100644
--- a/ldso/ldso/dl-startup.c
+++ b/ldso/ldso/dl-startup.c
@@ -373,7 +373,7 @@ DL_START(unsigned long args)
DL_GET_READY_TO_RUN_EXTRA_ARGS);
- load_vdso(_dl_auxvt[AT_SYSINFO_EHDR].a_un.a_val, envp);
+ load_vdso((void *)_dl_auxvt[AT_SYSINFO_EHDR].a_un.a_val, envp);
/* Transfer control to the application. */
SEND_STDERR_DEBUG("transfering control to application @ ");
diff --git a/ldso/ldso/dl-vdso-calls.h b/ldso/ldso/dl-vdso-calls.h
new file mode 100644
index 000000000..c72f2dadf
--- /dev/null
+++ b/ldso/ldso/dl-vdso-calls.h
@@ -0,0 +1,68 @@
+#ifndef _DL_VDSO_CALLS_H
+#define _DL_VDSO_CALLS_H
+
+#include <sys/time.h>
+#include <sys/syscall.h>
+#include <errno.h>
+#include <time.h>
+
+void __attribute__((weak)) *_get__dl__vdso_clock_gettime(void);
+#if defined(__UCLIBC_USE_TIME64__)
+#include "internal/time64_helpers.h"
+void __attribute__((weak)) *_get__dl__vdso_clock_gettime64(void);
+typedef int (*clock_gettime_func)(clockid_t clock_id, struct __ts64_struct *tp);
+#else
+typedef int (*clock_gettime_func)(clockid_t clock_id, struct timespec *tp);
+#endif
+
+extern int __libc_clock_gettime(clockid_t clock_id, struct timespec *tp);
+
+static int __attribute__ ((used)) __generic_vdso_clock_gettime(clockid_t clock_id, struct timespec *tp);
+static int __attribute__ ((used)) __generic_vdso_clock_gettime(clockid_t clock_id, struct timespec *tp)
+{
+ void *impl = NULL;
+#if defined(__UCLIBC_USE_TIME64__)
+ if (&_get__dl__vdso_clock_gettime64 && (impl = _get__dl__vdso_clock_gettime64())) {
+ struct __ts64_struct __ts64;
+ int __ret = ((clock_gettime_func)impl)(clock_id, &__ts64);
+ if (__ret != 0) {
+ __set_errno(-__ret);
+ return -1;
+ }
+
+ if (tp) {
+ tp->tv_sec = __ts64.tv_sec;
+ tp->tv_nsec = __ts64.tv_nsec;
+ }
+ return 0;
+ }
+
+ /* fallback to syscall */
+ return __libc_clock_gettime(clock_id, tp);
+#else
+ if (&_get__dl__vdso_clock_gettime && (impl = _get__dl__vdso_clock_gettime())) {
+ int __ret = ((clock_gettime_func)impl)(clock_id, tp);
+ if (__ret != 0) {
+ __set_errno(-__ret);
+ return -1;
+ }
+
+ return 0;
+ }
+
+ /* fallback to syscall */
+ return __libc_clock_gettime(clock_id, tp);
+#endif
+}
+
+static int __attribute__ ((used)) __generic_vdso_gettimeofday(struct timeval *tv, __timezone_ptr_t tz)
+{
+ struct timespec ts;
+ int __res = __generic_vdso_clock_gettime(CLOCK_REALTIME, &ts);
+ tv->tv_sec = ts.tv_sec;
+ tv->tv_usec = (suseconds_t)ts.tv_nsec / 1000;
+
+ return __res;
+}
+
+#endif /* _DL_VDSO_CALLS_H */ \ No newline at end of file
diff --git a/ldso/ldso/dl-vdso.c b/ldso/ldso/dl-vdso.c
index c8d724cd0..196cbbb3b 100755
--- a/ldso/ldso/dl-vdso.c
+++ b/ldso/ldso/dl-vdso.c
@@ -1,12 +1,16 @@
#include <elf.h>
-//#include <stdio.h>
#include <string.h>
-
#include "sys/auxv.h"
-//#include <linux/time.h>
-//#include <time.h>
+#define __ARCH_VDSO_GETTIMEOFDAY_NAME "__vdso_gettimeofday"
+#define __ARCH_VDSO_CLOCK_GETTIME_NAME "__vdso_clock_gettime"
+
+#if defined(__UCLIBC_USE_TIME64__)
+#define __ARCH_VDSO_CLOCK_GETTIME64_NAME "__vdso_clock_gettime64"
+#endif
+
+/* Maybe override default vDSO functions names by arch-specific */
#include "ldso.h"
#include "generated/autoconf.h"
@@ -24,7 +28,7 @@
#ifndef __VDSO_SUPPORT__
- void load_vdso( uint32_t sys_info_ehdr, char **envp ){
+ void load_vdso(void *sys_info_ehdr, char **envp ){
#ifdef __SUPPORT_LD_DEBUG__
if ( _dl_debug_vdso != 0 ){
_dl_dprintf(2,"_dl_vdso support not enabled\n" );
@@ -34,21 +38,34 @@
}
#else
+void *_dl__vdso_gettimeofday = 0;
+void *_dl__vdso_clock_gettime = 0;
+#if defined(__UCLIBC_USE_TIME64__)
+void *_dl__vdso_clock_gettime64 = 0;
+#endif
-
-
-
-//typedef long (*gtod_t)(struct timeval *tv, struct timezone *tz);
-void* _dl__vdso_gettimeofday = 0;
-
-
-//typedef long (*clock_gettime_t)(int clk_id, struct timespec *tp);
-void* _dl__vdso_clock_gettime = 0;
+void *_get__dl__vdso_clock_gettime(void);
+void *_get__dl__vdso_clock_gettime(void)
+{
+ return _dl__vdso_clock_gettime;
+}
+#if defined(__UCLIBC_USE_TIME64__)
+void *_get__dl__vdso_clock_gettime64(void);
+void *_get__dl__vdso_clock_gettime64(void)
+{
+ return _dl__vdso_clock_gettime64;
+}
+#endif
+void *_get__dl__vdso_gettimeofday(void);
+void *_get__dl__vdso_gettimeofday(void)
+{
+ return _dl__vdso_gettimeofday;
+}
-typedef struct{
+typedef struct {
void* base_addr;
@@ -75,7 +92,7 @@ typedef struct{
char* vers_strings[10];
-}elf_infos;
+} elf_infos;
/*
* the raise() dummy function is needed because of divisons in this code
@@ -111,13 +128,10 @@ static ELF(Shdr) *vdso_get_sec_header( elf_infos* elf, int index ){
}
-
-void load_vdso( uint32_t sys_info_ehdr, char **envp ){
+void load_vdso(void *sys_info_ehdr, char **envp ){
elf_infos vdso_infos;
-
-
-
+
if ( sys_info_ehdr == 0 ){
#ifdef __SUPPORT_LD_DEBUG__
if ( _dl_debug_vdso != 0 ){
@@ -137,22 +151,16 @@ void load_vdso( uint32_t sys_info_ehdr, char **envp ){
#endif
return;
}
-
-
+
_dl_memset( &vdso_infos, 0 , sizeof( elf_infos ) );
-
-
+
vdso_infos.base_addr = (void*)sys_info_ehdr;
vdso_infos.hdr = (ELF(Ehdr)*)vdso_infos.base_addr;
-
- //printf("base : %p\n",vdso_infos.base_addr);
-
+
if ( 0 != vdso_check_elf_header( &vdso_infos ) ){
return;
}
-
-
-
+
ELF(Shdr) *sec_header = vdso_get_sec_header( &vdso_infos, vdso_infos.hdr->e_shstrndx);
vdso_infos.section_header_strtab = ( vdso_infos.base_addr + sec_header->sh_offset );
@@ -307,10 +315,7 @@ void load_vdso( uint32_t sys_info_ehdr, char **envp ){
if (ELF64_ST_TYPE(sym->st_info) != STT_FUNC)
continue;
-
-
char* name = vdso_infos.dynstr_table + sym->st_name;
- char* vers = vdso_infos.vers_strings[ vdso_infos.versym_table[i] ];
void* func_addr = (void*)( vdso_infos.base_addr + sym->st_value );
// the function name is patched to zero if the kernel has no timer which is
@@ -324,10 +329,7 @@ void load_vdso( uint32_t sys_info_ehdr, char **envp ){
continue;
}
- //printf(" %s@@%s\n", name , vers );
-
- //print_sym( sym );
- if ( 0 == _dl_strcmp( name, "__vdso_gettimeofday" ) ){
+ if ( 0 == _dl_strcmp( name, __ARCH_VDSO_GETTIMEOFDAY_NAME ) ){
_dl__vdso_gettimeofday = func_addr;
#ifdef __SUPPORT_LD_DEBUG__
if ( _dl_debug_vdso != 0 ){
@@ -336,8 +338,7 @@ void load_vdso( uint32_t sys_info_ehdr, char **envp ){
#endif
continue;
}
-
- if ( 0 == _dl_strcmp( name, "__vdso_clock_gettime" ) ){
+ if ( 0 == _dl_strcmp( name, __ARCH_VDSO_CLOCK_GETTIME_NAME ) ){
_dl__vdso_clock_gettime = func_addr;
#ifdef __SUPPORT_LD_DEBUG__
if ( _dl_debug_vdso != 0 ){
@@ -346,17 +347,26 @@ void load_vdso( uint32_t sys_info_ehdr, char **envp ){
#endif
continue;
}
+
+#if defined(__UCLIBC_USE_TIME64__)
+ if ( 0 == _dl_strcmp( name, __ARCH_VDSO_CLOCK_GETTIME64_NAME ) ){
+ _dl__vdso_clock_gettime64 = func_addr;
+#ifdef __SUPPORT_LD_DEBUG__
+ if ( _dl_debug_vdso != 0 ){
+ _dl_dprintf(2," %s at address %p\n", name, func_addr );
+ }
+#endif
+ continue;
+ }
+#endif /* defined(__UCLIBC_USE_TIME64__) */
#ifdef __SUPPORT_LD_DEBUG__
if ( _dl_debug_vdso != 0 ){
_dl_dprintf(2," <%s> not handled\n", name );
}
#endif
-
-
- }
-
+ }
}
#endif // __VDSO_SUPPORT__
diff --git a/ldso/ldso/fdpic/dl-inlines.h b/ldso/ldso/fdpic/dl-inlines.h
index 89e7a9a68..6a31ef3e6 100644
--- a/ldso/ldso/fdpic/dl-inlines.h
+++ b/ldso/ldso/fdpic/dl-inlines.h
@@ -102,7 +102,7 @@ __dl_update_loadaddr_hdr(struct elf32_fdpic_loadaddr loadaddr, void *addr,
#if defined (__SUPPORT_LD_DEBUG__)
if (_dl_debug)
- _dl_dprintf(_dl_debug_file, "%i: changed mapping %x at %x (old %x), size %x\n",
+ _dl_dprintf(_dl_debug_file, "%i: changed mapping %x at %x (old %p), size %x\n",
loadaddr.map->nsegs - 1,
segdata->p_vaddr, segdata->addr, oldaddr, segdata->p_memsz);
#endif
@@ -177,7 +177,7 @@ _dl_funcdesc_for (void *entry_point, void *got_value)
tpnt->funcdesc_ht = ht;
}
- entry = htab_find_slot(ht, entry_point, 1, hash_pointer, eq_pointer);
+ entry = (struct funcdesc_value **)htab_find_slot(ht, entry_point, 1, hash_pointer, eq_pointer);
if (entry == NULL)
_dl_exit(1);
diff --git a/ldso/ldso/fdpic/dl-sysdep.h b/ldso/ldso/fdpic/dl-sysdep.h
index 6ab303b37..81694dc76 100644
--- a/ldso/ldso/fdpic/dl-sysdep.h
+++ b/ldso/ldso/fdpic/dl-sysdep.h
@@ -108,7 +108,7 @@ struct funcdesc_ht;
&& ELF32_ST_TYPE((SYM)->st_info) == STT_FUNC \
? _dl_funcdesc_for ((void *)DL_RELOC_ADDR ((TPNT)->loadaddr, (SYM)->st_value), \
(TPNT)->loadaddr.got_value) \
- : DL_RELOC_ADDR ((TPNT)->loadaddr, (SYM)->st_value))
+ : (void*)DL_RELOC_ADDR ((TPNT)->loadaddr, (SYM)->st_value))
#define DL_GET_READY_TO_RUN_EXTRA_PARMS \
, struct elf32_fdpic_loadmap *dl_boot_progmap, Elf32_Addr dl_boot_got_pointer
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 */
diff --git a/ldso/ldso/mips/dl-syscalls.h b/ldso/ldso/mips/dl-syscalls.h
index f40c4fd31..d8407f17c 100644
--- a/ldso/ldso/mips/dl-syscalls.h
+++ b/ldso/ldso/mips/dl-syscalls.h
@@ -1 +1,28 @@
-/* stub for arch-specific syscall issues */
+/* 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)) __mips_vdso_clock_gettime(clockid_t clock_id, struct timespec *tp);
+static int __attribute__ ((used)) __mips_vdso_clock_gettime(clockid_t clock_id, struct timespec *tp)
+{
+ return __generic_vdso_clock_gettime(clock_id, tp);
+}
+
+static int __attribute__ ((used)) __mips_vdso_gettimeofday(struct timeval *tv, __timezone_ptr_t tz);
+static int __attribute__ ((used)) __mips_vdso_gettimeofday(struct timeval *tv, __timezone_ptr_t tz)
+{
+ return __generic_vdso_gettimeofday(tv, tz);
+}
+
+#define ARCH_VDSO_GETTIMEOFDAY(tv, tz) __mips_vdso_gettimeofday(tv, tz)
+#define ARCH_VDSO_CLOCK_GETTIME(clock_id, tp) __mips_vdso_clock_gettime(clock_id, tp)
+
+#endif /* defined(__VDSO_SUPPORT__) && !defined(UCLIBC_LDSO) */
+
+#endif /* _DL_SYSCALLS_H */
+
diff --git a/ldso/ldso/x86_64/dl-syscalls.h b/ldso/ldso/x86_64/dl-syscalls.h
index f40c4fd31..3f953aa83 100644
--- a/ldso/ldso/x86_64/dl-syscalls.h
+++ b/ldso/ldso/x86_64/dl-syscalls.h
@@ -1 +1,28 @@
-/* stub for arch-specific syscall issues */
+/* 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_64_vdso_clock_gettime(clockid_t clock_id, struct timespec *tp);
+static int __attribute__ ((used)) __x86_64_vdso_clock_gettime(clockid_t clock_id, struct timespec *tp)
+{
+ return __generic_vdso_clock_gettime(clock_id, tp);
+}
+
+static int __attribute__ ((used)) __x86_64_vdso_gettimeofday(struct timeval *tv, __timezone_ptr_t tz);
+static int __attribute__ ((used)) __x86_64_vdso_gettimeofday(struct timeval *tv, __timezone_ptr_t tz)
+{
+ return __generic_vdso_gettimeofday(tv, tz);
+}
+
+#define ARCH_VDSO_GETTIMEOFDAY(tv, tz) __x86_64_vdso_gettimeofday(tv, tz)
+#define ARCH_VDSO_CLOCK_GETTIME(clock_id, tp) __x86_64_vdso_clock_gettime(clock_id, tp)
+
+#endif /* defined(__VDSO_SUPPORT__) && !defined(UCLIBC_LDSO) */
+
+#endif /* _DL_SYSCALLS_H */
+