summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/nios2/clone.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/nios2/clone.S')
-rw-r--r--sysdeps/unix/sysv/linux/nios2/clone.S17
1 files changed, 3 insertions, 14 deletions
diff --git a/sysdeps/unix/sysv/linux/nios2/clone.S b/sysdeps/unix/sysv/linux/nios2/clone.S
index 7929dfa48a..2ba825888c 100644
--- a/sysdeps/unix/sysv/linux/nios2/clone.S
+++ b/sysdeps/unix/sysv/linux/nios2/clone.S
@@ -25,8 +25,6 @@
#include <bits/errno.h>
#include <tcb-offsets.h>
-#define CLONE_VM 0x00000100
-
/* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg,
void *parent_tidptr, void *tls, void *child_tidptr) */
@@ -75,18 +73,9 @@ thread_start:
/* Call the user's function. */
callr r5
- /* _exit with the result. */
- mov r4, r2
-#ifdef PIC
- nextpc r22
-1: movhi r8, %hiadj(_gp_got - 1b)
- addi r8, r8, %lo(_gp_got - 1b)
- add r22, r22, r8
- ldw r8, %call(HIDDEN_JUMPTARGET(_exit))(r22)
- jmp r8
-#else
- jmpi _exit
-#endif
+ /* exit with the result. */
+ movi r2, SYS_ify (exit)
+ trap
cfi_endproc
cfi_startproc