diff options
Diffstat (limited to 'tests/tcg/x86_64/vsyscall.c')
-rw-r--r-- | tests/tcg/x86_64/vsyscall.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/tcg/x86_64/vsyscall.c b/tests/tcg/x86_64/vsyscall.c new file mode 100644 index 0000000000..786b047053 --- /dev/null +++ b/tests/tcg/x86_64/vsyscall.c @@ -0,0 +1,12 @@ +#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; +} |