From 97ccf8a19c24a35680c83168c34c7caf3356f7ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwenol=C3=A9=20Beauchesne?= Date: Wed, 15 Dec 2004 12:56:31 +0000 Subject: ia64 fixes: fork, pipe, syscall weak symnames --- mdk-stage1/dietlibc/ia64/fork.S | 16 +++++++++++++--- mdk-stage1/dietlibc/ia64/pipe.S | 2 ++ mdk-stage1/dietlibc/ia64/start.S | 2 +- mdk-stage1/dietlibc/ia64/syscalls.h | 12 ++++++++++++ 4 files changed, 28 insertions(+), 4 deletions(-) diff --git a/mdk-stage1/dietlibc/ia64/fork.S b/mdk-stage1/dietlibc/ia64/fork.S index 3b253a80b..213be16ec 100644 --- a/mdk-stage1/dietlibc/ia64/fork.S +++ b/mdk-stage1/dietlibc/ia64/fork.S @@ -1,8 +1,18 @@ #include "syscalls.h" +#include +#define SIGCLD 17 -.text -.globl fork + .text + .globl fork + .proc fork + .weak __libc_fork + .type fork,@function + .type __libc_fork,@function fork: +__libc_fork: + alloc r2=ar.pfs,0,0,2,0 + mov out0=SIGCLD + mov out1=0 + ;; mov r15 = __NR_clone - mov r32 = 17 br __unified_syscall diff --git a/mdk-stage1/dietlibc/ia64/pipe.S b/mdk-stage1/dietlibc/ia64/pipe.S index c3bf4570b..57a72424c 100644 --- a/mdk-stage1/dietlibc/ia64/pipe.S +++ b/mdk-stage1/dietlibc/ia64/pipe.S @@ -10,8 +10,10 @@ pipe: break.i 0x100000 ld8 r2 = [r12] cmp.eq p7,p6=-1,r10 + ;; (p6) st4 [r2] = r8,4 mov r8 = r0 + ;; (p7) br.cond.spnt.few __error_unified_syscall (p6) st4 [r2] = r9 (p6) br.ret.sptk.few b0 diff --git a/mdk-stage1/dietlibc/ia64/start.S b/mdk-stage1/dietlibc/ia64/start.S index dbacb25f6..5a4cf9b05 100644 --- a/mdk-stage1/dietlibc/ia64/start.S +++ b/mdk-stage1/dietlibc/ia64/start.S @@ -40,6 +40,6 @@ _start: br.call.sptk.few rp = main /* call main */ ;; mov r32 = r8 /* store return code */ - br _exit /* branch to _exit */ + br exit /* branch to exit */ .endp _start .size _start, . - _start diff --git a/mdk-stage1/dietlibc/ia64/syscalls.h b/mdk-stage1/dietlibc/ia64/syscalls.h index 65eda0ed2..17acafc75 100644 --- a/mdk-stage1/dietlibc/ia64/syscalls.h +++ b/mdk-stage1/dietlibc/ia64/syscalls.h @@ -222,6 +222,17 @@ #define __NR_epoll_create 1243 #define __NR_epoll_ctl 1244 #define __NR_epoll_wait 1245 +#define __NR_restart_syscall 1246 +#define __NR_semtimedop 1247 +#define __NR_sys_timer_create 1248 +#define __NR_sys_timer_settime 1249 +#define __NR_sys_timer_gettime 1250 +#define __NR_sys_timer_getoverrun 1251 +#define __NR_sys_timer_delete 1252 +#define __NR_sys_clock_settime 1253 +#define __NR_sys_clock_gettime 1254 +#define __NR_sys_clock_getres 1255 +#define __NR_sys_clock_nanosleep 1256 #define syscall(name, sym) \ .text; \ @@ -236,6 +247,7 @@ sym: \ wsym: \ .globl sym; \ sym: \ +wsym: ; \ mov r15 = __NR_##name; \ br __unified_syscall; -- cgit v1.2.1