# if defined(VGP_amd64_linux)
&& act.from_addr != 0xFFFFFFFFFF600000ULL
&& act.from_addr != 0xFFFFFFFFFF600400ULL
+ && act.from_addr != 0xFFFFFFFFFF600800ULL
# endif
) {
what = "redirection from-address is in non-executable area";
/* Redirect vsyscalls to local versions */
add_hardwired_active(
0xFFFFFFFFFF600000ULL,
- (Addr)&VG_(amd64_linux_REDIR_FOR_vgettimeofday)
+ (Addr)&VG_(amd64_linux_REDIR_FOR_vgettimeofday)
);
- add_hardwired_active(
+ add_hardwired_active(
0xFFFFFFFFFF600400ULL,
- (Addr)&VG_(amd64_linux_REDIR_FOR_vtime)
+ (Addr)&VG_(amd64_linux_REDIR_FOR_vtime)
+ );
+ add_hardwired_active(
+ 0xFFFFFFFFFF600800ULL,
+ (Addr)&VG_(amd64_linux_REDIR_FOR_vgetcpu)
);
/* If we're using memcheck, use these intercepts right from
.LfnE3:
.size VG_(amd64_linux_REDIR_FOR_vtime), .-.LfnB3
+.global VG_(amd64_linux_REDIR_FOR_vgetcpu)
+.type VG_(amd64_linux_REDIR_FOR_vgetcpu), @function
+VG_(amd64_linux_REDIR_FOR_vgetcpu):
+.LfnB4:
+ movq $__NR_getcpu, %rax
+ syscall
+ ret
+.LfnE4:
+.size VG_(amd64_linux_REDIR_FOR_vgetcpu), .-.LfnB4
+
/* There's no particular reason that this needs to be handwritten
assembly, but since that's what this file contains, here's a
simple strlen implementation (written in C and compiled by gcc.)
.global VG_(amd64_linux_REDIR_FOR_strlen)
.type VG_(amd64_linux_REDIR_FOR_strlen), @function
VG_(amd64_linux_REDIR_FOR_strlen):
-.LfnB4:
+.LfnB5:
xorl %eax, %eax
cmpb $0, (%rdi)
movq %rdi, %rdx
movq %rdx, %rax
subq %rdi, %rax
.L41: ret
-.LfnE4:
+.LfnE5:
.size VG_(amd64_linux_REDIR_FOR_strlen), .-VG_(amd64_linux_REDIR_FOR_strlen)
-/* A CIE for the above three functions, followed by their FDEs */
+/* A CIE for the above four functions, followed by their FDEs */
.section .eh_frame,"a",@progbits
.Lframe1:
.long .LEcie1-.LScie1
.uleb128 0x0
.align 8
.LEfde4:
+.LSfde5:
+ .long .LEfde5-.LASfde5
+.LASfde5:
+ .long .LASfde5-.Lframe1
+ .long .LfnB5
+ .long .LfnE5-.LfnB5
+ .uleb128 0x0
+ .align 8
+.LEfde5:
.previous
.global VG_(trampoline_stuff_end)
extern Addr VG_(amd64_linux_SUBST_FOR_rt_sigreturn);
extern Addr VG_(amd64_linux_REDIR_FOR_vgettimeofday);
extern Addr VG_(amd64_linux_REDIR_FOR_vtime);
+extern Addr VG_(amd64_linux_REDIR_FOR_vgetcpu);
extern UInt VG_(amd64_linux_REDIR_FOR_strlen)( void* );
#endif