diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/arm/clone.S')
-rw-r--r-- | sysdeps/unix/sysv/linux/arm/clone.S | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/sysdeps/unix/sysv/linux/arm/clone.S b/sysdeps/unix/sysv/linux/arm/clone.S index 460a8f5ae8..288b734256 100644 --- a/sysdeps/unix/sysv/linux/arm/clone.S +++ b/sysdeps/unix/sysv/linux/arm/clone.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996-2016 Free Software Foundation, Inc. +/* Copyright (C) 1996-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Pat Beirne <patb@corelcomputer.com> @@ -24,9 +24,6 @@ #define _ERRNO_H 1 #include <bits/errno.h> -#define CLONE_VM 0x00000100 -#define CLONE_THREAD 0x00010000 - /* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg, pid_t *ptid, struct user_desc *tls, pid_t *ctid); */ @@ -70,27 +67,16 @@ PSEUDO_END (__clone) 1: .fnstart .cantunwind - tst ip, #CLONE_THREAD - bne 3f - GET_TLS (lr) - mov r1, r0 - tst ip, #CLONE_VM - ldr r7, =SYS_ify(getpid) - ite ne - movne r0, #-1 - swieq 0x0 - NEGOFF_ADJ_BASE (r1, TID_OFFSET) - str r0, NEGOFF_OFF1 (r1, TID_OFFSET) - str r0, NEGOFF_OFF2 (r1, PID_OFFSET, TID_OFFSET) -3: @ pick the function arg and call address off the stack and execute ldr r0, [sp, #4] ldr ip, [sp], #8 BLX (ip) @ and we are done, passing the return value through r0 - b PLTJMP(HIDDEN_JUMPTARGET(_exit)) + ldr r7, =SYS_ify(exit) + swi 0x0 .fnend +libc_hidden_def (__clone) weak_alias (__clone, clone) |