summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/syscalls.c
diff options
context:
space:
mode:
Diffstat (limited to 'mdk-stage1/dietlibc/syscalls.c')
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/_llseek.c5
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/_newselect.c6
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/access.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/chdir.c3
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/chmod.c5
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/chown.c5
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/chroot.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/clone.c1
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/close.c3
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/dup.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/dup2.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/execve.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/exit.c3
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/fchdir.c3
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/fchmod.c5
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/fchown.c5
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/fcntl.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/flock.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/fork.c6
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/fsync.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/ftruncate.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/getcwd.c5
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/getdents.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/getegid.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/geteuid.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/getgid.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/getgroups.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/getpgid.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/getpid.c3
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/getppid.c3
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/getpriority.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/getresgid.c8
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/getresuid.c8
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/getrlimit.c3
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/getrusage.c3
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/getsid.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/gettimeofday.c5
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/getuid.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/ioctl.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/kill.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/lchown.c5
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/link.c5
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/lseek.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/mkdir.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/mknod.c5
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/mount.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/mprotect.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/mremap.c5
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/munmap.c5
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/nanosleep.c5
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/open.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/pipe.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/poll.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/read.c3
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/readlink.c5
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/reboot.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/rename.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/rmdir.c3
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/setdomainname.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/setgid.c3
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/setgroups.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/sethostname.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/setitimer.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/setpgid.c3
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/setpriority.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/setregid.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/setresgid.c8
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/setresuid.c8
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/setreuid.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/setrlimit.c3
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/setsid.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/setuid.c3
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/sigaction.c3
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/signal.c3
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/sigpending.c3
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/sigprocmask.c3
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/sigsuspend.c3
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/socketcall.c3
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/swapoff.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/swapon.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/symlink.c3
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/sync.c3
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/syslog.c3
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/time.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/truncate.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/umask.c5
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/umount.c3
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/uname.c5
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/unlink.c3
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/utime.c3
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/vhangup.c3
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/wait4.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/waitpid.c4
-rw-r--r--mdk-stage1/dietlibc/syscalls.c/write.c3
94 files changed, 381 insertions, 0 deletions
diff --git a/mdk-stage1/dietlibc/syscalls.c/_llseek.c b/mdk-stage1/dietlibc/syscalls.c/_llseek.c
new file mode 100644
index 000000000..fdf49eba5
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/_llseek.c
@@ -0,0 +1,5 @@
+#include <unistd.h>
+#include <sys/types.h>
+#include "syscalls.h"
+
+_syscall5(int,_llseek,uint,fd,ulong,hi,ulong,lo,loff_t*,res,uint,wh);
diff --git a/mdk-stage1/dietlibc/syscalls.c/_newselect.c b/mdk-stage1/dietlibc/syscalls.c/_newselect.c
new file mode 100644
index 000000000..cb42193bd
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/_newselect.c
@@ -0,0 +1,6 @@
+#include <linux/types.h>
+#include <linux/time.h>
+#include "syscalls.h"
+
+_syscall5(int,_newselect,int,n,fd_set *,rd,fd_set *,wr,fd_set *,ex,struct timeval *,timeval);
+
diff --git a/mdk-stage1/dietlibc/syscalls.c/access.c b/mdk-stage1/dietlibc/syscalls.c/access.c
new file mode 100644
index 000000000..80944733a
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/access.c
@@ -0,0 +1,4 @@
+#include <linux/types.h>
+#include "syscalls.h"
+
+_syscall2(int,access,const char*,pathname,int,mode)
diff --git a/mdk-stage1/dietlibc/syscalls.c/chdir.c b/mdk-stage1/dietlibc/syscalls.c/chdir.c
new file mode 100644
index 000000000..a679f528d
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/chdir.c
@@ -0,0 +1,3 @@
+#include "syscalls.h"
+
+_syscall1(int,chdir,void*,path)
diff --git a/mdk-stage1/dietlibc/syscalls.c/chmod.c b/mdk-stage1/dietlibc/syscalls.c/chmod.c
new file mode 100644
index 000000000..80ad33b40
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/chmod.c
@@ -0,0 +1,5 @@
+#include <linux/types.h>
+#include "syscalls.h"
+
+_syscall2(int,chmod,const char * ,path,mode_t,mode)
+
diff --git a/mdk-stage1/dietlibc/syscalls.c/chown.c b/mdk-stage1/dietlibc/syscalls.c/chown.c
new file mode 100644
index 000000000..5a9352684
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/chown.c
@@ -0,0 +1,5 @@
+#include <linux/types.h>
+#include "syscalls.h"
+
+_syscall3(int,chown,char*,path,uid_t,owner,gid_t,group)
+
diff --git a/mdk-stage1/dietlibc/syscalls.c/chroot.c b/mdk-stage1/dietlibc/syscalls.c/chroot.c
new file mode 100644
index 000000000..ab39f7ebe
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/chroot.c
@@ -0,0 +1,4 @@
+#include "syscalls.h"
+
+_syscall1(int,chroot,void*,path)
+
diff --git a/mdk-stage1/dietlibc/syscalls.c/clone.c b/mdk-stage1/dietlibc/syscalls.c/clone.c
new file mode 100644
index 000000000..985eee4c8
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/clone.c
@@ -0,0 +1 @@
+#warning "No CLONE support yet"
diff --git a/mdk-stage1/dietlibc/syscalls.c/close.c b/mdk-stage1/dietlibc/syscalls.c/close.c
new file mode 100644
index 000000000..a7d7f0076
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/close.c
@@ -0,0 +1,3 @@
+#include "syscalls.h"
+
+_syscall1(int,close,int,fd)
diff --git a/mdk-stage1/dietlibc/syscalls.c/dup.c b/mdk-stage1/dietlibc/syscalls.c/dup.c
new file mode 100644
index 000000000..9c28f0bd6
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/dup.c
@@ -0,0 +1,4 @@
+#include "syscalls.h"
+
+_syscall1(int,dup,int,fd)
+
diff --git a/mdk-stage1/dietlibc/syscalls.c/dup2.c b/mdk-stage1/dietlibc/syscalls.c/dup2.c
new file mode 100644
index 000000000..399314aa8
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/dup2.c
@@ -0,0 +1,4 @@
+#include "syscalls.h"
+
+_syscall2(int,dup2,int,one,int,two)
+
diff --git a/mdk-stage1/dietlibc/syscalls.c/execve.c b/mdk-stage1/dietlibc/syscalls.c/execve.c
new file mode 100644
index 000000000..c2bac0117
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/execve.c
@@ -0,0 +1,4 @@
+#include "syscalls.h"
+
+_syscall3(int,execve,const char *,fn,void *,argv,void *,envp)
+
diff --git a/mdk-stage1/dietlibc/syscalls.c/exit.c b/mdk-stage1/dietlibc/syscalls.c/exit.c
new file mode 100644
index 000000000..87087c939
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/exit.c
@@ -0,0 +1,3 @@
+#include "syscalls.h"
+
+_syscall1(int,exit,int,exitcode)
diff --git a/mdk-stage1/dietlibc/syscalls.c/fchdir.c b/mdk-stage1/dietlibc/syscalls.c/fchdir.c
new file mode 100644
index 000000000..b3a41dc7a
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/fchdir.c
@@ -0,0 +1,3 @@
+#include "syscalls.h"
+
+_syscall1(int,fchdir,int,fd)
diff --git a/mdk-stage1/dietlibc/syscalls.c/fchmod.c b/mdk-stage1/dietlibc/syscalls.c/fchmod.c
new file mode 100644
index 000000000..09e52b6c7
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/fchmod.c
@@ -0,0 +1,5 @@
+#include <linux/types.h>
+#include "syscalls.h"
+
+_syscall2(int,fchmod,int,filedes,mode_t,mode)
+
diff --git a/mdk-stage1/dietlibc/syscalls.c/fchown.c b/mdk-stage1/dietlibc/syscalls.c/fchown.c
new file mode 100644
index 000000000..58923a137
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/fchown.c
@@ -0,0 +1,5 @@
+#include <linux/types.h>
+#include "syscalls.h"
+
+_syscall3(int,fchown,int,fd,uid_t,owner,gid_t,group)
+
diff --git a/mdk-stage1/dietlibc/syscalls.c/fcntl.c b/mdk-stage1/dietlibc/syscalls.c/fcntl.c
new file mode 100644
index 000000000..b21be9531
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/fcntl.c
@@ -0,0 +1,4 @@
+#include "syscalls.h"
+
+_syscall3(int,fcntl,int,fd,int,cmd,long,arg)
+
diff --git a/mdk-stage1/dietlibc/syscalls.c/flock.c b/mdk-stage1/dietlibc/syscalls.c/flock.c
new file mode 100644
index 000000000..6fcb336ef
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/flock.c
@@ -0,0 +1,4 @@
+#include "syscalls.h"
+
+_syscall2(int,flock,int,fd,int,op)
+
diff --git a/mdk-stage1/dietlibc/syscalls.c/fork.c b/mdk-stage1/dietlibc/syscalls.c/fork.c
new file mode 100644
index 000000000..1d4b892b6
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/fork.c
@@ -0,0 +1,6 @@
+#include "syscalls.h"
+
+#ifndef __sparc__
+
+_syscall0(int,fork)
+#endif
diff --git a/mdk-stage1/dietlibc/syscalls.c/fsync.c b/mdk-stage1/dietlibc/syscalls.c/fsync.c
new file mode 100644
index 000000000..db6198b8a
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/fsync.c
@@ -0,0 +1,4 @@
+#include "syscalls.h"
+
+_syscall1(int,fsync,int,fd)
+
diff --git a/mdk-stage1/dietlibc/syscalls.c/ftruncate.c b/mdk-stage1/dietlibc/syscalls.c/ftruncate.c
new file mode 100644
index 000000000..5f002a899
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/ftruncate.c
@@ -0,0 +1,4 @@
+#include <sys/types.h>
+#include "syscalls.h"
+
+_syscall2(int,ftruncate,int,fd,off_t,length)
diff --git a/mdk-stage1/dietlibc/syscalls.c/getcwd.c b/mdk-stage1/dietlibc/syscalls.c/getcwd.c
new file mode 100644
index 000000000..9e5e4a3e2
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/getcwd.c
@@ -0,0 +1,5 @@
+#include "syscalls.h"
+
+/* this syscall exists since Linux 2.1.92 */
+
+_syscall2(int,getcwd,char*,buf,unsigned long,size)
diff --git a/mdk-stage1/dietlibc/syscalls.c/getdents.c b/mdk-stage1/dietlibc/syscalls.c/getdents.c
new file mode 100644
index 000000000..be941b21e
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/getdents.c
@@ -0,0 +1,4 @@
+#include "syscalls.h"
+
+_syscall3(int, getdents, unsigned int, fd, void *, dirp, unsigned int, count);
+
diff --git a/mdk-stage1/dietlibc/syscalls.c/getegid.c b/mdk-stage1/dietlibc/syscalls.c/getegid.c
new file mode 100644
index 000000000..3213d640c
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/getegid.c
@@ -0,0 +1,4 @@
+#include <linux/types.h>
+#include "syscalls.h"
+
+_syscall0(gid_t,getegid)
diff --git a/mdk-stage1/dietlibc/syscalls.c/geteuid.c b/mdk-stage1/dietlibc/syscalls.c/geteuid.c
new file mode 100644
index 000000000..5b31a3cca
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/geteuid.c
@@ -0,0 +1,4 @@
+#include <linux/types.h>
+#include "syscalls.h"
+
+_syscall0(uid_t,geteuid)
diff --git a/mdk-stage1/dietlibc/syscalls.c/getgid.c b/mdk-stage1/dietlibc/syscalls.c/getgid.c
new file mode 100644
index 000000000..2f7d96286
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/getgid.c
@@ -0,0 +1,4 @@
+#include <linux/types.h>
+#include "syscalls.h"
+
+_syscall0(gid_t,getgid)
diff --git a/mdk-stage1/dietlibc/syscalls.c/getgroups.c b/mdk-stage1/dietlibc/syscalls.c/getgroups.c
new file mode 100644
index 000000000..3e4d6797a
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/getgroups.c
@@ -0,0 +1,4 @@
+#include <linux/types.h>
+#include "syscalls.h"
+
+_syscall2(int,getgroups,int,size,int*,list)
diff --git a/mdk-stage1/dietlibc/syscalls.c/getpgid.c b/mdk-stage1/dietlibc/syscalls.c/getpgid.c
new file mode 100644
index 000000000..0b4ff528b
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/getpgid.c
@@ -0,0 +1,4 @@
+#include <linux/types.h>
+#include "syscalls.h"
+
+_syscall1(pid_t,getpgid,pid_t,pid)
diff --git a/mdk-stage1/dietlibc/syscalls.c/getpid.c b/mdk-stage1/dietlibc/syscalls.c/getpid.c
new file mode 100644
index 000000000..d60a8db9a
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/getpid.c
@@ -0,0 +1,3 @@
+#include "syscalls.h"
+
+_syscall0(int,getpid)
diff --git a/mdk-stage1/dietlibc/syscalls.c/getppid.c b/mdk-stage1/dietlibc/syscalls.c/getppid.c
new file mode 100644
index 000000000..ee87a8eae
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/getppid.c
@@ -0,0 +1,3 @@
+#include "syscalls.h"
+
+_syscall0(int,getppid)
diff --git a/mdk-stage1/dietlibc/syscalls.c/getpriority.c b/mdk-stage1/dietlibc/syscalls.c/getpriority.c
new file mode 100644
index 000000000..6f94bcf42
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/getpriority.c
@@ -0,0 +1,4 @@
+#include "syscalls.h"
+
+_syscall3(int,getpriority,int,which,int,who)
+
diff --git a/mdk-stage1/dietlibc/syscalls.c/getresgid.c b/mdk-stage1/dietlibc/syscalls.c/getresgid.c
new file mode 100644
index 000000000..264ec7dce
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/getresgid.c
@@ -0,0 +1,8 @@
+#include <linux/types.h>
+#include "syscalls.h"
+
+#ifdef __NR_getresgid
+
+_syscall3(int,getresgid,gid_t*,rgid,gid_t*,egid,gid_t*,sgid)
+
+#endif
diff --git a/mdk-stage1/dietlibc/syscalls.c/getresuid.c b/mdk-stage1/dietlibc/syscalls.c/getresuid.c
new file mode 100644
index 000000000..74e2daec2
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/getresuid.c
@@ -0,0 +1,8 @@
+#include <linux/types.h>
+#include "syscalls.h"
+
+#ifdef __getresuid
+
+_syscall3(int,getresuid,uid_t*,ruid,uid_t*,euid,uid_t*,suid)
+
+#endif
diff --git a/mdk-stage1/dietlibc/syscalls.c/getrlimit.c b/mdk-stage1/dietlibc/syscalls.c/getrlimit.c
new file mode 100644
index 000000000..635b2baf4
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/getrlimit.c
@@ -0,0 +1,3 @@
+#include "syscalls.h"
+
+_syscall2(int,getrlimit,int,resource,void*,rlim)
diff --git a/mdk-stage1/dietlibc/syscalls.c/getrusage.c b/mdk-stage1/dietlibc/syscalls.c/getrusage.c
new file mode 100644
index 000000000..815d3e617
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/getrusage.c
@@ -0,0 +1,3 @@
+#include "syscalls.h"
+
+_syscall2(int,getrusage,int,who,void*,rusage)
diff --git a/mdk-stage1/dietlibc/syscalls.c/getsid.c b/mdk-stage1/dietlibc/syscalls.c/getsid.c
new file mode 100644
index 000000000..69974c36c
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/getsid.c
@@ -0,0 +1,4 @@
+#include <linux/types.h>
+#include "syscalls.h"
+
+_syscall1(pid_t,getsid,pid_t,pid)
diff --git a/mdk-stage1/dietlibc/syscalls.c/gettimeofday.c b/mdk-stage1/dietlibc/syscalls.c/gettimeofday.c
new file mode 100644
index 000000000..5f4931a0c
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/gettimeofday.c
@@ -0,0 +1,5 @@
+#include <linux/types.h>
+#include <linux/time.h>
+#include "syscalls.h"
+
+_syscall2(int,gettimeofday,struct timeval *,tv,void *,tz)
diff --git a/mdk-stage1/dietlibc/syscalls.c/getuid.c b/mdk-stage1/dietlibc/syscalls.c/getuid.c
new file mode 100644
index 000000000..bf38447a6
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/getuid.c
@@ -0,0 +1,4 @@
+#include <linux/types.h>
+#include "syscalls.h"
+
+_syscall0(uid_t,getuid)
diff --git a/mdk-stage1/dietlibc/syscalls.c/ioctl.c b/mdk-stage1/dietlibc/syscalls.c/ioctl.c
new file mode 100644
index 000000000..1612109d3
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/ioctl.c
@@ -0,0 +1,4 @@
+#include "syscalls.h"
+
+_syscall3(int,ioctl,int,fd,int,request,void *,argp)
+
diff --git a/mdk-stage1/dietlibc/syscalls.c/kill.c b/mdk-stage1/dietlibc/syscalls.c/kill.c
new file mode 100644
index 000000000..e56b0ac1b
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/kill.c
@@ -0,0 +1,4 @@
+#include <linux/types.h>
+#include "syscalls.h"
+
+_syscall2(int,kill,pid_t,pid,int,sig)
diff --git a/mdk-stage1/dietlibc/syscalls.c/lchown.c b/mdk-stage1/dietlibc/syscalls.c/lchown.c
new file mode 100644
index 000000000..976d2ee1f
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/lchown.c
@@ -0,0 +1,5 @@
+#include <linux/types.h>
+#include "syscalls.h"
+
+_syscall3(int,lchown,char*,path,uid_t,owner,gid_t,group)
+
diff --git a/mdk-stage1/dietlibc/syscalls.c/link.c b/mdk-stage1/dietlibc/syscalls.c/link.c
new file mode 100644
index 000000000..ab9b427d9
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/link.c
@@ -0,0 +1,5 @@
+#include <linux/types.h>
+#include "syscalls.h"
+
+_syscall2(int,link,const char *,a,const char *,b)
+
diff --git a/mdk-stage1/dietlibc/syscalls.c/lseek.c b/mdk-stage1/dietlibc/syscalls.c/lseek.c
new file mode 100644
index 000000000..9925a2185
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/lseek.c
@@ -0,0 +1,4 @@
+#include "syscalls.h"
+
+_syscall3(unsigned long,lseek,int,fd,unsigned long,offset,int,whence)
+
diff --git a/mdk-stage1/dietlibc/syscalls.c/mkdir.c b/mdk-stage1/dietlibc/syscalls.c/mkdir.c
new file mode 100644
index 000000000..aac682c99
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/mkdir.c
@@ -0,0 +1,4 @@
+#include <linux/types.h>
+#include "syscalls.h"
+
+_syscall2(int,mkdir,void*,path,mode_t,mode)
diff --git a/mdk-stage1/dietlibc/syscalls.c/mknod.c b/mdk-stage1/dietlibc/syscalls.c/mknod.c
new file mode 100644
index 000000000..00e836b73
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/mknod.c
@@ -0,0 +1,5 @@
+#include <linux/types.h>
+#include "syscalls.h"
+
+_syscall3(int,mknod,const char*,pathname,mode_t,mode,dev_t,dev)
+
diff --git a/mdk-stage1/dietlibc/syscalls.c/mount.c b/mdk-stage1/dietlibc/syscalls.c/mount.c
new file mode 100644
index 000000000..2d71ee812
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/mount.c
@@ -0,0 +1,4 @@
+#include "syscalls.h"
+
+_syscall5(int,mount,const char *,spec,const char *,dir,const char *,type,unsigned long,rwflag,const void *,data);
+
diff --git a/mdk-stage1/dietlibc/syscalls.c/mprotect.c b/mdk-stage1/dietlibc/syscalls.c/mprotect.c
new file mode 100644
index 000000000..634a12089
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/mprotect.c
@@ -0,0 +1,4 @@
+#include <linux/types.h>
+#include "syscalls.h"
+
+_syscall3(int,mprotect,const void *,addr, size_t, len, int, prot)
diff --git a/mdk-stage1/dietlibc/syscalls.c/mremap.c b/mdk-stage1/dietlibc/syscalls.c/mremap.c
new file mode 100644
index 000000000..37d066bac
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/mremap.c
@@ -0,0 +1,5 @@
+#include <linux/types.h>
+#include "syscalls.h"
+
+_syscall4(int,mremap,void*,old_address,size_t,old_size,size_t,new_size,unsigned long,flags)
+
diff --git a/mdk-stage1/dietlibc/syscalls.c/munmap.c b/mdk-stage1/dietlibc/syscalls.c/munmap.c
new file mode 100644
index 000000000..40bc98270
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/munmap.c
@@ -0,0 +1,5 @@
+#include <linux/types.h>
+#include "syscalls.h"
+
+_syscall2(int,munmap,void*,start,size_t,len)
+
diff --git a/mdk-stage1/dietlibc/syscalls.c/nanosleep.c b/mdk-stage1/dietlibc/syscalls.c/nanosleep.c
new file mode 100644
index 000000000..71aca1f09
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/nanosleep.c
@@ -0,0 +1,5 @@
+#include <linux/types.h>
+#include <linux/time.h>
+#include "syscalls.h"
+
+_syscall2(int,nanosleep,struct timeval *,in,struct timeval *,out)
diff --git a/mdk-stage1/dietlibc/syscalls.c/open.c b/mdk-stage1/dietlibc/syscalls.c/open.c
new file mode 100644
index 000000000..8b3ccfcc3
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/open.c
@@ -0,0 +1,4 @@
+#include <linux/types.h>
+#include "syscalls.h"
+
+_syscall3(int,open,const char *,fn,int,flags,mode_t,mode)
diff --git a/mdk-stage1/dietlibc/syscalls.c/pipe.c b/mdk-stage1/dietlibc/syscalls.c/pipe.c
new file mode 100644
index 000000000..42197c881
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/pipe.c
@@ -0,0 +1,4 @@
+#include <linux/types.h>
+#include "syscalls.h"
+
+_syscall1(int,pipe,int *,filedes)
diff --git a/mdk-stage1/dietlibc/syscalls.c/poll.c b/mdk-stage1/dietlibc/syscalls.c/poll.c
new file mode 100644
index 000000000..10d0d1f78
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/poll.c
@@ -0,0 +1,4 @@
+#include <linux/types.h>
+#include "syscalls.h"
+
+_syscall3(int,poll,void *,ufds,int,nfds,int,timeout)
diff --git a/mdk-stage1/dietlibc/syscalls.c/read.c b/mdk-stage1/dietlibc/syscalls.c/read.c
new file mode 100644
index 000000000..f5532054e
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/read.c
@@ -0,0 +1,3 @@
+#include "syscalls.h"
+
+_syscall3(int,read,int,fd,const char *,buf,unsigned long,count)
diff --git a/mdk-stage1/dietlibc/syscalls.c/readlink.c b/mdk-stage1/dietlibc/syscalls.c/readlink.c
new file mode 100644
index 000000000..482f8fe27
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/readlink.c
@@ -0,0 +1,5 @@
+#include "syscalls.h"
+#include <linux/types.h>
+
+_syscall3(int,readlink,char*,path,char*,buf,size_t,bufsiz)
+
diff --git a/mdk-stage1/dietlibc/syscalls.c/reboot.c b/mdk-stage1/dietlibc/syscalls.c/reboot.c
new file mode 100644
index 000000000..0ad474894
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/reboot.c
@@ -0,0 +1,4 @@
+#include "syscalls.h"
+
+_syscall3(int,reboot,int,magic,int,magic_too,int,flag)
+
diff --git a/mdk-stage1/dietlibc/syscalls.c/rename.c b/mdk-stage1/dietlibc/syscalls.c/rename.c
new file mode 100644
index 000000000..f86d50728
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/rename.c
@@ -0,0 +1,4 @@
+#include "syscalls.h"
+
+_syscall2(int,rename,char*,oldpath,char*,newpath)
+
diff --git a/mdk-stage1/dietlibc/syscalls.c/rmdir.c b/mdk-stage1/dietlibc/syscalls.c/rmdir.c
new file mode 100644
index 000000000..303885264
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/rmdir.c
@@ -0,0 +1,3 @@
+#include "syscalls.h"
+
+_syscall1(int,rmdir,void*,path)
diff --git a/mdk-stage1/dietlibc/syscalls.c/setdomainname.c b/mdk-stage1/dietlibc/syscalls.c/setdomainname.c
new file mode 100644
index 000000000..83d3aa8b8
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/setdomainname.c
@@ -0,0 +1,4 @@
+#include "syscalls.h"
+
+_syscall2(int,setdomainname,const char *,name,int,len)
+
diff --git a/mdk-stage1/dietlibc/syscalls.c/setgid.c b/mdk-stage1/dietlibc/syscalls.c/setgid.c
new file mode 100644
index 000000000..1f7263aeb
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/setgid.c
@@ -0,0 +1,3 @@
+#include "syscalls.h"
+
+_syscall1(int,setgid,int,gid)
diff --git a/mdk-stage1/dietlibc/syscalls.c/setgroups.c b/mdk-stage1/dietlibc/syscalls.c/setgroups.c
new file mode 100644
index 000000000..fed3b85c1
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/setgroups.c
@@ -0,0 +1,4 @@
+#include "syscalls.h"
+
+_syscall2(int,setgroups,int,size,const int*,list)
+
diff --git a/mdk-stage1/dietlibc/syscalls.c/sethostname.c b/mdk-stage1/dietlibc/syscalls.c/sethostname.c
new file mode 100644
index 000000000..e4b736f87
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/sethostname.c
@@ -0,0 +1,4 @@
+#include "syscalls.h"
+
+_syscall2(int,sethostname,const char *,name,int,len)
+
diff --git a/mdk-stage1/dietlibc/syscalls.c/setitimer.c b/mdk-stage1/dietlibc/syscalls.c/setitimer.c
new file mode 100644
index 000000000..28935cab7
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/setitimer.c
@@ -0,0 +1,4 @@
+#include "syscalls.h"
+
+_syscall3(int,setitimer,int,which,void *,value,void *,ovalue)
+
diff --git a/mdk-stage1/dietlibc/syscalls.c/setpgid.c b/mdk-stage1/dietlibc/syscalls.c/setpgid.c
new file mode 100644
index 000000000..66fbf82dd
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/setpgid.c
@@ -0,0 +1,3 @@
+#include "syscalls.h"
+
+_syscall2(int,setpgid,int,name,int,len)
diff --git a/mdk-stage1/dietlibc/syscalls.c/setpriority.c b/mdk-stage1/dietlibc/syscalls.c/setpriority.c
new file mode 100644
index 000000000..bc04227d2
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/setpriority.c
@@ -0,0 +1,4 @@
+#include "syscalls.h"
+
+_syscall3(int,setpriority,int,which,int,who,int,prio)
+
diff --git a/mdk-stage1/dietlibc/syscalls.c/setregid.c b/mdk-stage1/dietlibc/syscalls.c/setregid.c
new file mode 100644
index 000000000..c6911aca8
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/setregid.c
@@ -0,0 +1,4 @@
+#include <linux/types.h>
+#include "syscalls.h"
+
+_syscall2(int,setregid,gid_t,rgid,gid_t,egid)
diff --git a/mdk-stage1/dietlibc/syscalls.c/setresgid.c b/mdk-stage1/dietlibc/syscalls.c/setresgid.c
new file mode 100644
index 000000000..817fd2942
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/setresgid.c
@@ -0,0 +1,8 @@
+#include <linux/types.h>
+#include "syscalls.h"
+
+#ifdef __NR_setresgid
+
+_syscall3(int,setresgid,gid_t*,rgid,gid_t*,egid,gid_t*,sgid)
+
+#endif
diff --git a/mdk-stage1/dietlibc/syscalls.c/setresuid.c b/mdk-stage1/dietlibc/syscalls.c/setresuid.c
new file mode 100644
index 000000000..7073d8ac2
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/setresuid.c
@@ -0,0 +1,8 @@
+#include <linux/types.h>
+#include "syscalls.h"
+
+#ifdef __NR_setresuid
+
+_syscall3(int,setresuid,uid_t*,ruid,uid_t*,euid,uid_t*,suid)
+
+#endif
diff --git a/mdk-stage1/dietlibc/syscalls.c/setreuid.c b/mdk-stage1/dietlibc/syscalls.c/setreuid.c
new file mode 100644
index 000000000..c0c23a12d
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/setreuid.c
@@ -0,0 +1,4 @@
+#include <linux/types.h>
+#include "syscalls.h"
+
+_syscall2(int,setreuid,uid_t,ruid,uid_t,euid)
diff --git a/mdk-stage1/dietlibc/syscalls.c/setrlimit.c b/mdk-stage1/dietlibc/syscalls.c/setrlimit.c
new file mode 100644
index 000000000..213234282
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/setrlimit.c
@@ -0,0 +1,3 @@
+#include "syscalls.h"
+
+_syscall2(int,setrlimit,int,resource,void*,rlim)
diff --git a/mdk-stage1/dietlibc/syscalls.c/setsid.c b/mdk-stage1/dietlibc/syscalls.c/setsid.c
new file mode 100644
index 000000000..4b35a1316
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/setsid.c
@@ -0,0 +1,4 @@
+#include <linux/types.h>
+#include "syscalls.h"
+
+_syscall0(pid_t,setsid)
diff --git a/mdk-stage1/dietlibc/syscalls.c/setuid.c b/mdk-stage1/dietlibc/syscalls.c/setuid.c
new file mode 100644
index 000000000..620876c9f
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/setuid.c
@@ -0,0 +1,3 @@
+#include "syscalls.h"
+
+_syscall1(int,setuid,int,uid)
diff --git a/mdk-stage1/dietlibc/syscalls.c/sigaction.c b/mdk-stage1/dietlibc/syscalls.c/sigaction.c
new file mode 100644
index 000000000..cfa5c683f
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/sigaction.c
@@ -0,0 +1,3 @@
+#include "syscalls.h"
+
+_syscall3(int,sigaction,int,signum,void*,act,void*,oldact)
diff --git a/mdk-stage1/dietlibc/syscalls.c/signal.c b/mdk-stage1/dietlibc/syscalls.c/signal.c
new file mode 100644
index 000000000..1a913be45
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/signal.c
@@ -0,0 +1,3 @@
+#include "syscalls.h"
+
+_syscall2(int,signal,int,num,void *,len)
diff --git a/mdk-stage1/dietlibc/syscalls.c/sigpending.c b/mdk-stage1/dietlibc/syscalls.c/sigpending.c
new file mode 100644
index 000000000..08fb23991
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/sigpending.c
@@ -0,0 +1,3 @@
+#include "syscalls.h"
+
+_syscall1(int,sigpending,void*,set)
diff --git a/mdk-stage1/dietlibc/syscalls.c/sigprocmask.c b/mdk-stage1/dietlibc/syscalls.c/sigprocmask.c
new file mode 100644
index 000000000..e9dcc2d67
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/sigprocmask.c
@@ -0,0 +1,3 @@
+#include "syscalls.h"
+
+_syscall3(int,sigprocmask,int,how,void*,set,void*,oldset)
diff --git a/mdk-stage1/dietlibc/syscalls.c/sigsuspend.c b/mdk-stage1/dietlibc/syscalls.c/sigsuspend.c
new file mode 100644
index 000000000..0fe90e623
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/sigsuspend.c
@@ -0,0 +1,3 @@
+#include "syscalls.h"
+
+_syscall1(int,sigsuspend,void*,mask)
diff --git a/mdk-stage1/dietlibc/syscalls.c/socketcall.c b/mdk-stage1/dietlibc/syscalls.c/socketcall.c
new file mode 100644
index 000000000..eee1ae86d
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/socketcall.c
@@ -0,0 +1,3 @@
+#include "syscalls.h"
+
+_syscall2(int,socketcall,int,code,unsigned long *, args)
diff --git a/mdk-stage1/dietlibc/syscalls.c/swapoff.c b/mdk-stage1/dietlibc/syscalls.c/swapoff.c
new file mode 100644
index 000000000..e1daa89a9
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/swapoff.c
@@ -0,0 +1,4 @@
+#include "syscalls.h"
+
+_syscall1(int,swapoff,const char *,fn)
+
diff --git a/mdk-stage1/dietlibc/syscalls.c/swapon.c b/mdk-stage1/dietlibc/syscalls.c/swapon.c
new file mode 100644
index 000000000..543e41e79
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/swapon.c
@@ -0,0 +1,4 @@
+#include <linux/types.h>
+#include "syscalls.h"
+
+_syscall2(int,swapon,const char*,path,int,swapflags)
diff --git a/mdk-stage1/dietlibc/syscalls.c/symlink.c b/mdk-stage1/dietlibc/syscalls.c/symlink.c
new file mode 100644
index 000000000..b3f4d0b1c
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/symlink.c
@@ -0,0 +1,3 @@
+#include "syscalls.h"
+
+_syscall2(int,symlink,const char *,a,const char *,b)
diff --git a/mdk-stage1/dietlibc/syscalls.c/sync.c b/mdk-stage1/dietlibc/syscalls.c/sync.c
new file mode 100644
index 000000000..cca17461f
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/sync.c
@@ -0,0 +1,3 @@
+#include "syscalls.h"
+
+_syscall0(int,sync)
diff --git a/mdk-stage1/dietlibc/syscalls.c/syslog.c b/mdk-stage1/dietlibc/syscalls.c/syslog.c
new file mode 100644
index 000000000..aace870ea
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/syslog.c
@@ -0,0 +1,3 @@
+#include "syscalls.h"
+
+_syscall3(int,syslog,int, type, char *, buf, int, len);
diff --git a/mdk-stage1/dietlibc/syscalls.c/time.c b/mdk-stage1/dietlibc/syscalls.c/time.c
new file mode 100644
index 000000000..dc15b28f9
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/time.c
@@ -0,0 +1,4 @@
+#include <linux/types.h>
+#include "syscalls.h"
+
+_syscall1(time_t,time,time_t*,path)
diff --git a/mdk-stage1/dietlibc/syscalls.c/truncate.c b/mdk-stage1/dietlibc/syscalls.c/truncate.c
new file mode 100644
index 000000000..721bd7134
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/truncate.c
@@ -0,0 +1,4 @@
+#include <linux/types.h>
+#include "syscalls.h"
+
+_syscall2(int,truncate,const char*,path,off_t,length)
diff --git a/mdk-stage1/dietlibc/syscalls.c/umask.c b/mdk-stage1/dietlibc/syscalls.c/umask.c
new file mode 100644
index 000000000..506038243
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/umask.c
@@ -0,0 +1,5 @@
+#include <linux/types.h>
+#include "syscalls.h"
+
+_syscall1(int,umask,mode_t,mask)
+
diff --git a/mdk-stage1/dietlibc/syscalls.c/umount.c b/mdk-stage1/dietlibc/syscalls.c/umount.c
new file mode 100644
index 000000000..4d3ef7637
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/umount.c
@@ -0,0 +1,3 @@
+#include "syscalls.h"
+
+_syscall1(int,umount,const char *,dir)
diff --git a/mdk-stage1/dietlibc/syscalls.c/uname.c b/mdk-stage1/dietlibc/syscalls.c/uname.c
new file mode 100644
index 000000000..68f135007
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/uname.c
@@ -0,0 +1,5 @@
+#include <linux/types.h>
+#include "syscalls.h"
+
+_syscall1(int,uname,void *,utsname)
+
diff --git a/mdk-stage1/dietlibc/syscalls.c/unlink.c b/mdk-stage1/dietlibc/syscalls.c/unlink.c
new file mode 100644
index 000000000..860ccebbf
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/unlink.c
@@ -0,0 +1,3 @@
+#include "syscalls.h"
+
+_syscall1(int,unlink,const char *,fn)
diff --git a/mdk-stage1/dietlibc/syscalls.c/utime.c b/mdk-stage1/dietlibc/syscalls.c/utime.c
new file mode 100644
index 000000000..185bdf9e8
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/utime.c
@@ -0,0 +1,3 @@
+#include "syscalls.h"
+
+_syscall2(int,utime,void*,filename,void*,buf)
diff --git a/mdk-stage1/dietlibc/syscalls.c/vhangup.c b/mdk-stage1/dietlibc/syscalls.c/vhangup.c
new file mode 100644
index 000000000..bb0669765
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/vhangup.c
@@ -0,0 +1,3 @@
+#include "syscalls.h"
+
+_syscall0(int,vhangup)
diff --git a/mdk-stage1/dietlibc/syscalls.c/wait4.c b/mdk-stage1/dietlibc/syscalls.c/wait4.c
new file mode 100644
index 000000000..4ae7eabcd
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/wait4.c
@@ -0,0 +1,4 @@
+#include <linux/types.h>
+#include "syscalls.h"
+
+_syscall4(int,wait4,pid_t,pid,int *,status,int,opts,void *,rusage)
diff --git a/mdk-stage1/dietlibc/syscalls.c/waitpid.c b/mdk-stage1/dietlibc/syscalls.c/waitpid.c
new file mode 100644
index 000000000..b7167f9ce
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/waitpid.c
@@ -0,0 +1,4 @@
+#include <linux/types.h>
+#include "syscalls.h"
+
+_syscall3(int,waitpid,int,pid,int *,status,int,options)
diff --git a/mdk-stage1/dietlibc/syscalls.c/write.c b/mdk-stage1/dietlibc/syscalls.c/write.c
new file mode 100644
index 000000000..d1f7347d5
--- /dev/null
+++ b/mdk-stage1/dietlibc/syscalls.c/write.c
@@ -0,0 +1,3 @@
+#include "syscalls.h"
+
+_syscall3(int,write,int,fd,const char *,buf,unsigned long,count)