summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S')
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S25
1 files changed, 4 insertions, 21 deletions
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S
index c8c6de8229..a4c8bbeac0 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S
@@ -1,5 +1,5 @@
/* Wrapper around clone system call. PowerPC64 version.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-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
@@ -20,9 +20,6 @@
#define _ERRNO_H 1
#include <bits/errno.h>
-#define CLONE_VM 0x00000100
-#define CLONE_THREAD 0x00010000
-
/* This is the only really unusual system call in PPC linux, but not
because of any weirdness in the system call itself; because of
all the freaky stuff we have to do to make the call useful. */
@@ -78,32 +75,17 @@ ENTRY (__clone)
crandc cr1*4+eq,cr1*4+eq,cr0*4+so
bne- cr1,L(parent) /* The '-' is to minimise the race. */
- andis. r0,r29,CLONE_THREAD>>16
- bne+ cr0,L(oldpid)
- andi. r0,r29,CLONE_VM
- li r3,-1
- bne- cr0,L(nomoregetpid)
- DO_CALL(SYS_ify(getpid))
-L(nomoregetpid):
- stw r3,TID(r13)
- stw r3,PID(r13)
-L(oldpid):
-
std r2,FRAME_TOC_SAVE(r1)
/* Call procedure. */
PPC64_LOAD_FUNCPTR r30
mr r3,r31
bctrl
ld r2,FRAME_TOC_SAVE(r1)
- /* Call _exit with result from procedure. */
-#ifdef SHARED
- b JUMPTARGET(__GI__exit)
-#else
- b JUMPTARGET(_exit)
+
+ DO_CALL(SYS_ify(exit))
/* We won't ever get here but provide a nop so that the linker
will insert a toc adjusting stub if necessary. */
nop
-#endif
L(badargs):
cfi_startproc
@@ -126,4 +108,5 @@ L(parent):
END (__clone)
+libc_hidden_def (__clone)
weak_alias (__clone, clone)