| Index: tests/test_patching_input.S
|
| diff --git a/tests/test_patching_input.S b/tests/test_patching_input.S
|
| index 3e7126d331b1611c792c1496728f0263c223b17b..e2406035d57c8f325c823a307e34c970851ec1b4 100644
|
| --- a/tests/test_patching_input.S
|
| +++ b/tests/test_patching_input.S
|
| @@ -22,5 +22,43 @@ my_getpid:
|
| ret
|
| my_getpid_end:
|
|
|
| +
|
| + // These routines call the vsyscall page, which is present on
|
| + // x86-64 only.
|
| +
|
| +#if defined(__x86_64__)
|
| +
|
| + .global my_vgettimeofday
|
| + .global my_vgettimeofday_end
|
| +my_vgettimeofday:
|
| + sub $8, %rsp // Align the stack
|
| + mov $0xffffffffff600000, %rax
|
| + call *%rax
|
| + add $8, %rsp
|
| + ret
|
| +my_vgettimeofday_end:
|
| +
|
| + .global my_vtime
|
| + .global my_vtime_end
|
| +my_vtime:
|
| + sub $8, %rsp // Align the stack
|
| + mov $0xffffffffff600400, %rax
|
| + call *%rax
|
| + add $8, %rsp
|
| + ret
|
| +my_vtime_end:
|
| +
|
| + .global my_vgetcpu
|
| + .global my_vgetcpu_end
|
| +my_vgetcpu:
|
| + sub $8, %rsp // Align the stack
|
| + mov $0xffffffffff600800, %rax
|
| + call *%rax
|
| + add $8, %rsp
|
| + ret
|
| +my_vgetcpu_end:
|
| +
|
| +#endif
|
| +
|
| // Tell Linux not to disable no-execute protection for the process.
|
| .section .note.GNU-stack,"",@progbits
|
|
|