summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/x86_64/clone.S
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-06-29 00:56:09 +0000
committerMike Frysinger <vapier@gentoo.org>2005-06-29 00:56:09 +0000
commit69ec4a5d65cdd4a2fdf2c94e1861464fa2caf7ce (patch)
tree45eb64f3ded1eb81dc606532c75038d445ea3be7 /libc/sysdeps/linux/x86_64/clone.S
parent0f9f0d5305631211e03edbff44c6c3b5fc03e41f (diff)
add syscall error handling with jockes simple errno setting solution
Diffstat (limited to 'libc/sysdeps/linux/x86_64/clone.S')
-rw-r--r--libc/sysdeps/linux/x86_64/clone.S18
1 files changed, 9 insertions, 9 deletions
diff --git a/libc/sysdeps/linux/x86_64/clone.S b/libc/sysdeps/linux/x86_64/clone.S
index 9d244d018..65d0c53fd 100644
--- a/libc/sysdeps/linux/x86_64/clone.S
+++ b/libc/sysdeps/linux/x86_64/clone.S
@@ -48,17 +48,17 @@
r8: thread pointer */
- .text
+.text
.globl __clone;
.type __clone,@function
-.align 4;
+.align 4
__clone:
/* Sanity check arguments. */
movq $-EINVAL,%rax
testq %rdi,%rdi /* no NULL function pointers */
- jz __syscall_error
+ jz __error
testq %rsi,%rsi /* no NULL stack pointers */
- jz __syscall_error
+ jz __error
/* Insert the argument onto the new stack. */
subq $16,%rsi
@@ -73,12 +73,12 @@ __clone:
movq %r8, %rdx
movq %r9, %r8
movq 8(%rsp), %r10
- movq $__NR_clone,%rax
+ movq __NR_clone,%rax
syscall
testq %rax,%rax
- jl __syscall_error
+ jl __error
jz L(thread_start)
L(pseudo_end):
@@ -110,7 +110,7 @@ L(thread_start):
movq %rax, %rdi
call HIDDEN_JUMPTARGET (_exit)
- cfi_startproc;
-PSEUDO_END (BP_SYM (__clone))
+.size __clone,.-__clone
-weak_alias (BP_SYM (__clone), BP_SYM (clone))
+.weak clone
+ clone = __clone