From 808694e8a330e32741b7781467610d8cec99ae6e Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 8 Dec 2006 22:53:40 +0000 Subject: Richard Sandiford writes: add support for init/fini arrays in shared flat libraries --- libc/sysdeps/linux/m68k/clone.S | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'libc/sysdeps/linux/m68k/clone.S') diff --git a/libc/sysdeps/linux/m68k/clone.S b/libc/sysdeps/linux/m68k/clone.S index 8ef916e91..7eddff10c 100644 --- a/libc/sysdeps/linux/m68k/clone.S +++ b/libc/sysdeps/linux/m68k/clone.S @@ -8,6 +8,7 @@ #include #include #include +#include "m68k_pic.S" /* int _clone(int (*fn)(void *arg), void *child_stack, int flags, void *arg); */ @@ -21,11 +22,11 @@ clone: movel 4(%sp), %d1 /* no NULL function pointers */ movel %d1, %a0 tstl %d1 - jbeq __syscall_error + beq.w __syscall_error_trampoline movel 8(%sp), %d1 /* no NULL stack pointers */ movel %d1, %a1 tstl %d1 - jbeq __syscall_error + beq.w __syscall_error_trampoline /* Allocate space and copy the argument onto the new stack. */ movel 16(%sp), -(%a1) @@ -50,7 +51,7 @@ clone: #endif tstl %d0 - jbmi __syscall_error + bmi.w __syscall_error_trampoline beq.w thread_start rts @@ -62,3 +63,7 @@ thread_start: movel #__NR_exit, %d0 trap #0 /*jsr exit*/ + +__syscall_error_trampoline: + JUMP __syscall_error,%a0 + -- cgit v1.2.3