You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
qemu/tests/tcg/x86_64/vsyscall.c

13 lines
249 B
C

#include <stdio.h>
#include <time.h>
#define VSYSCALL_PAGE 0xffffffffff600000
#define TIME_OFFSET 0x400
typedef time_t (*time_func)(time_t *);
int main(void)
{
printf("%ld\n", ((time_func)(VSYSCALL_PAGE + TIME_OFFSET))(NULL));
return 0;
}