about summary refs log tree commit diff
path: root/linuxthreads/sysdeps/unix/sysv/linux/x86_64/vfork.S
diff options
context:
space:
mode:
Diffstat (limited to 'linuxthreads/sysdeps/unix/sysv/linux/x86_64/vfork.S')
-rw-r--r--linuxthreads/sysdeps/unix/sysv/linux/x86_64/vfork.S8
1 files changed, 7 insertions, 1 deletions
diff --git a/linuxthreads/sysdeps/unix/sysv/linux/x86_64/vfork.S b/linuxthreads/sysdeps/unix/sysv/linux/x86_64/vfork.S
index 3e867a6211..28989eaa14 100644
--- a/linuxthreads/sysdeps/unix/sysv/linux/x86_64/vfork.S
+++ b/linuxthreads/sysdeps/unix/sysv/linux/x86_64/vfork.S
@@ -27,7 +27,13 @@
 
 ENTRY (__vfork)
 
-	SINGLE_THREAD_P
+#ifdef SHARED
+	cmpq	$0, __libc_pthread_functions(%rip)
+#else
+	.weak	__pthread_fork
+	movq	$__pthread_fork, %eax
+	testq	%rax, %rax
+#endif
 	jne	HIDDEN_JUMPTARGET (__fork)
 
 	/* Pop the return PC value into RDI.  We need a register that