diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-07-03 03:23:20 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-07-03 03:23:20 +0000 |
commit | a0446356a9b382bc52504442731cd0d7a6d937eb (patch) | |
tree | 229bdd19e5bb9114f215cc625f86357fd7417e1c /libc/sysdeps/linux/mips/clone.S | |
parent | fc465161b6c07f5838c2ec6dd822944c39fa77bb (diff) |
Fix clone so it compiles
-Erik
Diffstat (limited to 'libc/sysdeps/linux/mips/clone.S')
-rw-r--r-- | libc/sysdeps/linux/mips/clone.S | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/libc/sysdeps/linux/mips/clone.S b/libc/sysdeps/linux/mips/clone.S index 6f6a6c5b7..4091f6b65 100644 --- a/libc/sysdeps/linux/mips/clone.S +++ b/libc/sysdeps/linux/mips/clone.S @@ -21,14 +21,21 @@ and invokes a function in the right context after its all over. */ #include <asm/unistd.h> -#include <sysdep.h> +#include <sys/regdef.h> #define _ERRNO_H 1 #include <bits/errno.h> +#include <asm/asm.h> /* int clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg) */ .text -NESTED(__clone,4*SZREG,sp) +.globl __clone ; + .align 2; + .type __clone,@function; + .ent __clone, 0; + +__clone: + .frame sp, 4*SZREG, sp #ifdef __PIC__ .set noreorder .cpload $25 @@ -66,7 +73,7 @@ NESTED(__clone,4*SZREG,sp) /* Successful return from the parent */ addiu sp,32 - ret + j $31 ; nop /* Something bad happened -- no child created */ error: @@ -77,13 +84,17 @@ error: #else j __syscall_error #endif - END(__clone) + .end __clone /* Load up the arguments to the function. Put this block of code in its own function so that we can terminate the stack trace with our debug info. */ -ENTRY(__thread_start) +.globl __thread_start; + .align 2; + .ent __thread_start, 0; + +__thread_start: /* cp is already loaded. */ .cprestore 16 /* The stackframe has been created on entry of clone(). */ @@ -102,6 +113,7 @@ ENTRY(__thread_start) #else jal _exit #endif - END(__thread_start) + .end __thread_start -weak_alias(__clone, clone) +.weak clone; + clone = __clone |