diff options
author | Joakim Tjernlund <joakim.tjernlund@transmode.se> | 2005-08-17 20:04:05 +0000 |
---|---|---|
committer | Joakim Tjernlund <joakim.tjernlund@transmode.se> | 2005-08-17 20:04:05 +0000 |
commit | 5deaf349d32208d6b1cad2363109a24d88b293bb (patch) | |
tree | 9a566f03563e1876cc1f727440279038f87ab43e /libc | |
parent | d4057a47cac54336b4d16f098f83e1f7b6e4ab6e (diff) |
Make uClibc vfork() use kernels vfork() instead of fork().
Diffstat (limited to 'libc')
-rw-r--r-- | libc/sysdeps/linux/powerpc/Makefile | 4 | ||||
-rw-r--r-- | libc/sysdeps/linux/powerpc/vfork.S | 23 |
2 files changed, 25 insertions, 2 deletions
diff --git a/libc/sysdeps/linux/powerpc/Makefile b/libc/sysdeps/linux/powerpc/Makefile index eb212bac0..4c345c00f 100644 --- a/libc/sysdeps/linux/powerpc/Makefile +++ b/libc/sysdeps/linux/powerpc/Makefile @@ -25,10 +25,10 @@ SCRT_OBJ = $(patsubst %,S%, $(CRT_OBJ)) CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o SSRC=__longjmp.S setjmp.S bsd-setjmp.S bsd-_setjmp.S brk.S \ - clone.S __uClibc_syscall.S syscall.S + clone.S __uClibc_syscall.S syscall.S vfork.S SOBJS=$(patsubst %.S,%.o, $(SSRC)) -CSRC=mmap.c vfork.c __syscall_error.c pread_write.c ioctl.c +CSRC=mmap.c __syscall_error.c pread_write.c ioctl.c COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(SOBJS) $(COBJS) diff --git a/libc/sysdeps/linux/powerpc/vfork.S b/libc/sysdeps/linux/powerpc/vfork.S new file mode 100644 index 000000000..67d8aaeac --- /dev/null +++ b/libc/sysdeps/linux/powerpc/vfork.S @@ -0,0 +1,23 @@ +#include <sys/syscall.h> + +#ifndef __NR_vfork + +/* No vfork so use fork instead */ +.weak vfork ; vfork = __libc_fork + +#else + +.text +.global __vfork +.type __vfork,@function +.type __syscall_error,@function + +__vfork: + li 0, __NR_vfork + sc + bnslr+ + b __syscall_error +.size __vfork,.-__vfork + +.weak vfork ; vfork = __vfork +#endif |