summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/x86_64/clone.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/x86_64/clone.S')
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/clone.S20
1 files changed, 4 insertions, 16 deletions
diff --git a/sysdeps/unix/sysv/linux/x86_64/clone.S b/sysdeps/unix/sysv/linux/x86_64/clone.S
index 382568a3e9..34bebe0c00 100644
--- a/sysdeps/unix/sysv/linux/x86_64/clone.S
+++ b/sysdeps/unix/sysv/linux/x86_64/clone.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2016 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,9 +23,6 @@
#include <bits/errno.h>
#include <asm-syntax.h>
-#define CLONE_VM 0x00000100
-#define CLONE_THREAD 0x00010000
-
/* The userland implementation is:
int clone (int (*fn)(void *arg), void *child_stack, int flags, void *arg),
the kernel entry is:
@@ -92,27 +89,18 @@ L(thread_start):
the outermost frame obviously. */
xorl %ebp, %ebp
- testq $CLONE_THREAD, %rdi
- jne 1f
- testq $CLONE_VM, %rdi
- movl $-1, %eax
- jne 2f
- movl $SYS_ify(getpid), %eax
- syscall
-2: movl %eax, %fs:PID
- movl %eax, %fs:TID
-1:
-
/* Set up arguments for the function call. */
popq %rax /* Function to call. */
popq %rdi /* Argument. */
call *%rax
/* Call exit with return value from function call. */
movq %rax, %rdi
- call HIDDEN_JUMPTARGET (_exit)
+ movl $SYS_ify(exit), %eax
+ syscall
cfi_endproc;
cfi_startproc;
PSEUDO_END (__clone)
+libc_hidden_def (__clone)
weak_alias (__clone, clone)