diff options
author | Christian Heim <phreak@gentoo.org> | 2007-06-09 14:15:29 +0000 |
---|---|---|
committer | Christian Heim <phreak@gentoo.org> | 2007-06-09 14:15:29 +0000 |
commit | 8896aafde9cfdb01996f1a98fdb2de49238b3549 (patch) | |
tree | 87e21b9be1bb89ae5b9167bf63e06b0a8c8611c4 /dietlibc | |
parent | Renaming 156_ppc64_dot-suckage.patch to 160_ppc64_dot-suckage.patch, adding 1... (diff) | |
download | misc-8896aafde9cfdb01996f1a98fdb2de49238b3549.tar.gz misc-8896aafde9cfdb01996f1a98fdb2de49238b3549.tar.bz2 misc-8896aafde9cfdb01996f1a98fdb2de49238b3549.zip |
Fixing a bug in 150_ppc_rename-powerpc.patch and 155_ppc64_rename-powerpc64.patch, where the respective Makefile.add still contains ppc instead of powerpc (thanks to Jose Costa in #179408).
svn path=/; revision=552
Diffstat (limited to 'dietlibc')
-rw-r--r-- | dietlibc/patches/0.30-r2/150_ppc_rename-powerpc.patch | 459 | ||||
-rw-r--r-- | dietlibc/patches/0.30-r2/155_ppc64_rename-powerpc64.patch | 473 |
2 files changed, 469 insertions, 463 deletions
diff --git a/dietlibc/patches/0.30-r2/150_ppc_rename-powerpc.patch b/dietlibc/patches/0.30-r2/150_ppc_rename-powerpc.patch index a7d3903..cb709b3 100644 --- a/dietlibc/patches/0.30-r2/150_ppc_rename-powerpc.patch +++ b/dietlibc/patches/0.30-r2/150_ppc_rename-powerpc.patch @@ -1,27 +1,29 @@ -diff -NurpP dietlibc-0.30-execstack/diet.c dietlibc-0.30-ppc-rename/diet.c ---- dietlibc-0.30-execstack/diet.c 2006-04-04 05:47:21.000000000 +0200 -+++ dietlibc-0.30-ppc-rename/diet.c 2006-09-07 12:32:01.080419500 +0200 -@@ -35,7 +35,7 @@ static const char* Os[] = { - "arm","-Os","-fomit-frame-pointer",0, - "mips","-Os","-fomit-frame-pointer","-mno-abicalls","-fno-pic","-G","0",0, - "mipsel","-Os","-fomit-frame-pointer","-mno-abicalls","-fno-pic","-G","0",0, -- "ppc","-Os","-fomit-frame-pointer","-mpowerpc-gpopt","-mpowerpc-gfxopt",0, -+ "powerpc","-Os","-fomit-frame-pointer","-mpowerpc-gpopt","-mpowerpc-gfxopt",0, - "ppc64","-Os","-fomit-frame-pointer","-mpowerpc-gpopt","-mpowerpc-gfxopt",0, - "s390","-Os","-fomit-frame-pointer",0, - "s390x","-Os","-fomit-frame-pointer",0, -@@ -151,7 +151,7 @@ int main(int argc,char *argv[]) { - #endif - #endif - #ifdef __powerpc__ -- shortplatform="ppc"; -+ shortplatform="powerpc"; - #endif - #ifdef __powerpc64__ - shortplatform="ppc64"; -diff -NurpP dietlibc-0.30-execstack/Makefile dietlibc-0.30-ppc-rename/Makefile ---- dietlibc-0.30-execstack/Makefile 2006-06-18 20:32:28.000000000 +0200 -+++ dietlibc-0.30-ppc-rename/Makefile 2006-09-07 12:44:19.878766750 +0200 +--- + Makefile | 17 +- + diet.c | 4 + powerpc/Makefile.add | 3 + powerpc/__longjmp.S | 63 ++++++++++ + powerpc/__testandset.S | 16 ++ + powerpc/clone.S | 52 ++++++++ + powerpc/mmap.c | 40 ++++++ + powerpc/setjmp.S | 60 +++++++++ + powerpc/start.S | 56 +++++++++ + powerpc/syscalls.h | 299 +++++++++++++++++++++++++++++++++++++++++++++++++ + powerpc/unified.S | 44 +++++++ + ppc/Makefile.add | 3 + ppc/__longjmp.S | 63 ---------- + ppc/__testandset.S | 16 -- + ppc/clone.S | 52 -------- + ppc/mmap.c | 40 ------ + ppc/setjmp.S | 60 --------- + ppc/start.S | 56 --------- + ppc/syscalls.h | 299 ------------------------------------------------- + ppc/unified.S | 44 ------- + syscalls.h | 2 + 21 files changed, 645 insertions(+), 644 deletions(-) + +--- a/Makefile ++++ b/Makefile @@ -24,7 +24,11 @@ ifeq ($(MYARCH),alpha) ARCH=alpha else @@ -43,7 +45,7 @@ diff -NurpP dietlibc-0.30-execstack/Makefile dietlibc-0.30-ppc-rename/Makefile # ARCH=$(MYARCH) -@@ -385,7 +390,7 @@ uninstall: +@@ -375,7 +380,7 @@ uninstall: for i in `find include -name \*.h`; do rm -f $(DESTDIR)$(prefix)/$$i; done -rmdir $(DESTDIR)$(ILIBDIR) $(DESTDIR)$(MAN1DIR) $(DESTDIR)$(BINDIR) @@ -52,7 +54,7 @@ diff -NurpP dietlibc-0.30-execstack/Makefile dietlibc-0.30-ppc-rename/Makefile .PHONY: x86_64 ia64 ppc64 s390x arm sparc alpha mips parisc s390 sparc64 x86_64 ia64 ppc64 s390x: -@@ -398,7 +403,7 @@ else +@@ -388,7 +393,7 @@ else $(MAKE) ARCH=$@ CROSS=$@-linux- all endif @@ -61,7 +63,7 @@ diff -NurpP dietlibc-0.30-execstack/Makefile dietlibc-0.30-ppc-rename/Makefile ifeq ($(MYARCH),ppc64) $(MAKE) ARCH=$@ CC="$(CC) -m32" all else -@@ -412,15 +417,11 @@ mipsel: +@@ -402,15 +407,11 @@ mipsel: mips-gnu: $(MAKE) ARCH=$@ CROSS=$@-linux-gnu- all @@ -78,65 +80,34 @@ diff -NurpP dietlibc-0.30-execstack/Makefile dietlibc-0.30-ppc-rename/Makefile cross: $(MAKE) $(subst $(ARCH),,$(CROSS_ARCH)) -diff -NurpP dietlibc-0.30-execstack/powerpc/clone.S dietlibc-0.30-ppc-rename/powerpc/clone.S ---- dietlibc-0.30-execstack/powerpc/clone.S 1970-01-01 01:00:00.000000000 +0100 -+++ dietlibc-0.30-ppc-rename/powerpc/clone.S 2006-09-07 12:24:13.119173000 +0200 -@@ -0,0 +1,52 @@ -+#include <dietfeatures.h> -+#include "syscalls.h" -+#include <errno.h> -+ -+.text -+.weak clone -+clone: -+.global __clone -+__clone: -+ cmpwi 4,0 /* check have non null child_stack pointer */ -+ cmpwi cr1, 3,0 /* check have non null thread_funcion */ -+ cror eq,4*cr1+eq,eq /* now if eq is set one is or both are zero */ -+ beq .Lclone_error -+ -+ stwu 1,-32(1) /* alloc some space on the stack */ -+ stmw 29, 16(1) /* save r29,r30,r31 on stack */ -+ -+ rlwinm 4,4,0,0,27 /* mask out lower 4 bits */ -+ -+ /* move parameter to positions clone wants them */ -+ mr 29,3 /* r29 = r3 fn */ -+ mr 30,4 /* r30 = r4 stack */ -+ mr 31,6 /* r31 = r6 arg */ -+ mr 3, 5 /* r3 = r5 flags */ -+ -+ li 0, __NR_clone /* load syscall nr. */ -+ sc -+ -+ cmpwi cr1,3,0 /* compare return of syscall with 0 */ -+ crandc 4*cr1+eq,4*cr1+eq,so -+ bne .Lclone_parent /* return was non zero -> .Lclone_parent */ -+ -+ /* we are the cloned process */ -+ mr 1, 30 /* set stack pointer */ -+ mtctr 29 /* set count register to fn ? */ -+ mr 3, 31 /* set argument */ -+ bctrl /* branch trough count register and link */ -+ b _exit /* exit thread */ -+ -+.Lclone_parent: -+ lmw 29,16(1) /* restore saved registers */ -+ addi 1, 1,32 /* free stack */ -+ bnslr+ /* had cloned a thread so return to parent */ -+ b error_unified_syscall -+ -+.Lclone_error: -+ li 3, EINVAL -+ b error_unified_syscall +--- a/diet.c ++++ b/diet.c +@@ -35,7 +35,7 @@ static const char* Os[] = { + "arm","-Os","-fomit-frame-pointer",0, + "mips","-Os","-fomit-frame-pointer","-mno-abicalls","-fno-pic","-G","0",0, + "mipsel","-Os","-fomit-frame-pointer","-mno-abicalls","-fno-pic","-G","0",0, +- "ppc","-Os","-fomit-frame-pointer","-mpowerpc-gpopt","-mpowerpc-gfxopt",0, ++ "powerpc","-Os","-fomit-frame-pointer","-mpowerpc-gpopt","-mpowerpc-gfxopt",0, + "ppc64","-Os","-fomit-frame-pointer","-mpowerpc-gpopt","-mpowerpc-gfxopt",0, + "s390","-Os","-fomit-frame-pointer",0, + "s390x","-Os","-fomit-frame-pointer",0, +@@ -151,7 +151,7 @@ int main(int argc,char *argv[]) { + #endif + #endif + #ifdef __powerpc__ +- shortplatform="ppc"; ++ shortplatform="powerpc"; + #endif + #ifdef __powerpc64__ + shortplatform="ppc64"; +--- /dev/null ++++ b/powerpc/Makefile.add +@@ -0,0 +1,3 @@ + -+#ifdef __ELF__ -+.section .note.GNU-stack,"",%progbits -+#endif -diff -NurpP dietlibc-0.30-execstack/powerpc/__longjmp.S dietlibc-0.30-ppc-rename/powerpc/__longjmp.S ---- dietlibc-0.30-execstack/powerpc/__longjmp.S 1970-01-01 01:00:00.000000000 +0100 -+++ dietlibc-0.30-ppc-rename/powerpc/__longjmp.S 2006-09-07 12:24:13.119173000 +0200 ++CFLAGS+=-mpowerpc-gpopt -mpowerpc-gfxopt -Os ++VPATH:=powerpc:syscalls.s:$(VPATH) +--- /dev/null ++++ b/powerpc/__longjmp.S @@ -0,0 +1,63 @@ +#include <setjmp.h> + @@ -201,16 +172,82 @@ diff -NurpP dietlibc-0.30-execstack/powerpc/__longjmp.S dietlibc-0.30-ppc-rename +#ifdef __ELF__ +.section .note.GNU-stack,"",%progbits +#endif -diff -NurpP dietlibc-0.30-execstack/powerpc/Makefile.add dietlibc-0.30-ppc-rename/powerpc/Makefile.add ---- dietlibc-0.30-execstack/powerpc/Makefile.add 1970-01-01 01:00:00.000000000 +0100 -+++ dietlibc-0.30-ppc-rename/powerpc/Makefile.add 2001-01-30 16:01:20.000000000 +0100 -@@ -0,0 +1,3 @@ +--- /dev/null ++++ b/powerpc/__testandset.S +@@ -0,0 +1,16 @@ ++.global __testandset ++.type __testandset,@function ++.align 2 ++__testandset: ++1: lwarx 5,0,3 ++ li 0,1 ++ stwcx. 0,0,3 ++ bne- 1b ++ mr 3,5 ++ blr ++.size __testandset,.-__testandset + -+CFLAGS+=-mpowerpc-gpopt -mpowerpc-gfxopt -Os -+VPATH:=ppc:syscalls.s:$(VPATH) -diff -NurpP dietlibc-0.30-execstack/powerpc/mmap.c dietlibc-0.30-ppc-rename/powerpc/mmap.c ---- dietlibc-0.30-execstack/powerpc/mmap.c 1970-01-01 01:00:00.000000000 +0100 -+++ dietlibc-0.30-ppc-rename/powerpc/mmap.c 2001-06-18 23:08:07.000000000 +0200 ++ ++#ifdef __ELF__ ++.section .note.GNU-stack,"",%progbits ++#endif +--- /dev/null ++++ b/powerpc/clone.S +@@ -0,0 +1,52 @@ ++#include <dietfeatures.h> ++#include "syscalls.h" ++#include <errno.h> ++ ++.text ++.weak clone ++clone: ++.global __clone ++__clone: ++ cmpwi 4,0 /* check have non null child_stack pointer */ ++ cmpwi cr1, 3,0 /* check have non null thread_funcion */ ++ cror eq,4*cr1+eq,eq /* now if eq is set one is or both are zero */ ++ beq .Lclone_error ++ ++ stwu 1,-32(1) /* alloc some space on the stack */ ++ stmw 29, 16(1) /* save r29,r30,r31 on stack */ ++ ++ rlwinm 4,4,0,0,27 /* mask out lower 4 bits */ ++ ++ /* move parameter to positions clone wants them */ ++ mr 29,3 /* r29 = r3 fn */ ++ mr 30,4 /* r30 = r4 stack */ ++ mr 31,6 /* r31 = r6 arg */ ++ mr 3, 5 /* r3 = r5 flags */ ++ ++ li 0, __NR_clone /* load syscall nr. */ ++ sc ++ ++ cmpwi cr1,3,0 /* compare return of syscall with 0 */ ++ crandc 4*cr1+eq,4*cr1+eq,so ++ bne .Lclone_parent /* return was non zero -> .Lclone_parent */ ++ ++ /* we are the cloned process */ ++ mr 1, 30 /* set stack pointer */ ++ mtctr 29 /* set count register to fn ? */ ++ mr 3, 31 /* set argument */ ++ bctrl /* branch trough count register and link */ ++ b _exit /* exit thread */ ++ ++.Lclone_parent: ++ lmw 29,16(1) /* restore saved registers */ ++ addi 1, 1,32 /* free stack */ ++ bnslr+ /* had cloned a thread so return to parent */ ++ b error_unified_syscall ++ ++.Lclone_error: ++ li 3, EINVAL ++ b error_unified_syscall ++ ++#ifdef __ELF__ ++.section .note.GNU-stack,"",%progbits ++#endif +--- /dev/null ++++ b/powerpc/mmap.c @@ -0,0 +1,40 @@ +#include "dietfeatures.h" +#include <sys/types.h> @@ -252,9 +289,8 @@ diff -NurpP dietlibc-0.30-execstack/powerpc/mmap.c dietlibc-0.30-ppc-rename/powe + return (__sc_err & 0x10000000 ? errno = __sc_ret, __sc_ret = -1 : 0), + (int) __sc_ret; +} -diff -NurpP dietlibc-0.30-execstack/powerpc/setjmp.S dietlibc-0.30-ppc-rename/powerpc/setjmp.S ---- dietlibc-0.30-execstack/powerpc/setjmp.S 1970-01-01 01:00:00.000000000 +0100 -+++ dietlibc-0.30-ppc-rename/powerpc/setjmp.S 2006-09-07 12:24:13.119173000 +0200 +--- /dev/null ++++ b/powerpc/setjmp.S @@ -0,0 +1,60 @@ +#include <setjmp.h> + @@ -316,9 +352,8 @@ diff -NurpP dietlibc-0.30-execstack/powerpc/setjmp.S dietlibc-0.30-ppc-rename/po +#ifdef __ELF__ +.section .note.GNU-stack,"",%progbits +#endif -diff -NurpP dietlibc-0.30-execstack/powerpc/start.S dietlibc-0.30-ppc-rename/powerpc/start.S ---- dietlibc-0.30-execstack/powerpc/start.S 1970-01-01 01:00:00.000000000 +0100 -+++ dietlibc-0.30-ppc-rename/powerpc/start.S 2006-09-07 12:24:13.119173000 +0200 +--- /dev/null ++++ b/powerpc/start.S @@ -0,0 +1,56 @@ +#include "dietfeatures.h" + @@ -376,9 +411,8 @@ diff -NurpP dietlibc-0.30-execstack/powerpc/start.S dietlibc-0.30-ppc-rename/pow +#ifdef __ELF__ +.section .note.GNU-stack,"",%progbits +#endif -diff -NurpP dietlibc-0.30-execstack/powerpc/syscalls.h dietlibc-0.30-ppc-rename/powerpc/syscalls.h ---- dietlibc-0.30-execstack/powerpc/syscalls.h 1970-01-01 01:00:00.000000000 +0100 -+++ dietlibc-0.30-ppc-rename/powerpc/syscalls.h 2005-09-21 09:33:08.000000000 +0200 +--- /dev/null ++++ b/powerpc/syscalls.h @@ -0,0 +1,299 @@ + +#define __NR_exit 1 @@ -679,29 +713,8 @@ diff -NurpP dietlibc-0.30-execstack/powerpc/syscalls.h dietlibc-0.30-ppc-rename/ + li 0,__NR_##name; \ + b __unified_syscall + -diff -NurpP dietlibc-0.30-execstack/powerpc/__testandset.S dietlibc-0.30-ppc-rename/powerpc/__testandset.S ---- dietlibc-0.30-execstack/powerpc/__testandset.S 1970-01-01 01:00:00.000000000 +0100 -+++ dietlibc-0.30-ppc-rename/powerpc/__testandset.S 2006-09-07 12:24:13.119173000 +0200 -@@ -0,0 +1,16 @@ -+.global __testandset -+.type __testandset,@function -+.align 2 -+__testandset: -+1: lwarx 5,0,3 -+ li 0,1 -+ stwcx. 0,0,3 -+ bne- 1b -+ mr 3,5 -+ blr -+.size __testandset,.-__testandset -+ -+ -+#ifdef __ELF__ -+.section .note.GNU-stack,"",%progbits -+#endif -diff -NurpP dietlibc-0.30-execstack/powerpc/unified.S dietlibc-0.30-ppc-rename/powerpc/unified.S ---- dietlibc-0.30-execstack/powerpc/unified.S 1970-01-01 01:00:00.000000000 +0100 -+++ dietlibc-0.30-ppc-rename/powerpc/unified.S 2006-09-07 12:24:13.119173000 +0200 +--- /dev/null ++++ b/powerpc/unified.S @@ -0,0 +1,44 @@ +#include <dietfeatures.h> +#include "syscalls.h" @@ -747,65 +760,14 @@ diff -NurpP dietlibc-0.30-execstack/powerpc/unified.S dietlibc-0.30-ppc-rename/p +#ifdef __ELF__ +.section .note.GNU-stack,"",%progbits +#endif -diff -NurpP dietlibc-0.30-execstack/ppc/clone.S dietlibc-0.30-ppc-rename/ppc/clone.S ---- dietlibc-0.30-execstack/ppc/clone.S 2006-09-07 12:24:13.119173750 +0200 -+++ dietlibc-0.30-ppc-rename/ppc/clone.S 1970-01-01 01:00:00.000000000 +0100 -@@ -1,52 +0,0 @@ --#include <dietfeatures.h> --#include "syscalls.h" --#include <errno.h> -- --.text --.weak clone --clone: --.global __clone --__clone: -- cmpwi 4,0 /* check have non null child_stack pointer */ -- cmpwi cr1, 3,0 /* check have non null thread_funcion */ -- cror eq,4*cr1+eq,eq /* now if eq is set one is or both are zero */ -- beq .Lclone_error -- -- stwu 1,-32(1) /* alloc some space on the stack */ -- stmw 29, 16(1) /* save r29,r30,r31 on stack */ -- -- rlwinm 4,4,0,0,27 /* mask out lower 4 bits */ -- -- /* move parameter to positions clone wants them */ -- mr 29,3 /* r29 = r3 fn */ -- mr 30,4 /* r30 = r4 stack */ -- mr 31,6 /* r31 = r6 arg */ -- mr 3, 5 /* r3 = r5 flags */ -- -- li 0, __NR_clone /* load syscall nr. */ -- sc -- -- cmpwi cr1,3,0 /* compare return of syscall with 0 */ -- crandc 4*cr1+eq,4*cr1+eq,so -- bne .Lclone_parent /* return was non zero -> .Lclone_parent */ -- -- /* we are the cloned process */ -- mr 1, 30 /* set stack pointer */ -- mtctr 29 /* set count register to fn ? */ -- mr 3, 31 /* set argument */ -- bctrl /* branch trough count register and link */ -- b _exit /* exit thread */ -- --.Lclone_parent: -- lmw 29,16(1) /* restore saved registers */ -- addi 1, 1,32 /* free stack */ -- bnslr+ /* had cloned a thread so return to parent */ -- b error_unified_syscall -- --.Lclone_error: -- li 3, EINVAL -- b error_unified_syscall +--- a/ppc/Makefile.add ++++ /dev/null +@@ -1,3 +0,0 @@ - --#ifdef __ELF__ --.section .note.GNU-stack,"",%progbits --#endif -diff -NurpP dietlibc-0.30-execstack/ppc/__longjmp.S dietlibc-0.30-ppc-rename/ppc/__longjmp.S ---- dietlibc-0.30-execstack/ppc/__longjmp.S 2006-09-07 12:24:13.119173750 +0200 -+++ dietlibc-0.30-ppc-rename/ppc/__longjmp.S 1970-01-01 01:00:00.000000000 +0100 +-CFLAGS+=-mpowerpc-gpopt -mpowerpc-gfxopt -Os +-VPATH:=ppc:syscalls.s:$(VPATH) +--- a/ppc/__longjmp.S ++++ /dev/null @@ -1,63 +0,0 @@ -#include <setjmp.h> - @@ -870,16 +832,82 @@ diff -NurpP dietlibc-0.30-execstack/ppc/__longjmp.S dietlibc-0.30-ppc-rename/ppc -#ifdef __ELF__ -.section .note.GNU-stack,"",%progbits -#endif -diff -NurpP dietlibc-0.30-execstack/ppc/Makefile.add dietlibc-0.30-ppc-rename/ppc/Makefile.add ---- dietlibc-0.30-execstack/ppc/Makefile.add 2001-01-30 16:01:20.000000000 +0100 -+++ dietlibc-0.30-ppc-rename/ppc/Makefile.add 1970-01-01 01:00:00.000000000 +0100 -@@ -1,3 +0,0 @@ +--- a/ppc/__testandset.S ++++ /dev/null +@@ -1,16 +0,0 @@ +-.global __testandset +-.type __testandset,@function +-.align 2 +-__testandset: +-1: lwarx 5,0,3 +- li 0,1 +- stwcx. 0,0,3 +- bne- 1b +- mr 3,5 +- blr +-.size __testandset,.-__testandset - --CFLAGS+=-mpowerpc-gpopt -mpowerpc-gfxopt -Os --VPATH:=ppc:syscalls.s:$(VPATH) -diff -NurpP dietlibc-0.30-execstack/ppc/mmap.c dietlibc-0.30-ppc-rename/ppc/mmap.c ---- dietlibc-0.30-execstack/ppc/mmap.c 2001-06-18 23:08:07.000000000 +0200 -+++ dietlibc-0.30-ppc-rename/ppc/mmap.c 1970-01-01 01:00:00.000000000 +0100 +- +-#ifdef __ELF__ +-.section .note.GNU-stack,"",%progbits +-#endif +--- a/ppc/clone.S ++++ /dev/null +@@ -1,52 +0,0 @@ +-#include <dietfeatures.h> +-#include "syscalls.h" +-#include <errno.h> +- +-.text +-.weak clone +-clone: +-.global __clone +-__clone: +- cmpwi 4,0 /* check have non null child_stack pointer */ +- cmpwi cr1, 3,0 /* check have non null thread_funcion */ +- cror eq,4*cr1+eq,eq /* now if eq is set one is or both are zero */ +- beq .Lclone_error +- +- stwu 1,-32(1) /* alloc some space on the stack */ +- stmw 29, 16(1) /* save r29,r30,r31 on stack */ +- +- rlwinm 4,4,0,0,27 /* mask out lower 4 bits */ +- +- /* move parameter to positions clone wants them */ +- mr 29,3 /* r29 = r3 fn */ +- mr 30,4 /* r30 = r4 stack */ +- mr 31,6 /* r31 = r6 arg */ +- mr 3, 5 /* r3 = r5 flags */ +- +- li 0, __NR_clone /* load syscall nr. */ +- sc +- +- cmpwi cr1,3,0 /* compare return of syscall with 0 */ +- crandc 4*cr1+eq,4*cr1+eq,so +- bne .Lclone_parent /* return was non zero -> .Lclone_parent */ +- +- /* we are the cloned process */ +- mr 1, 30 /* set stack pointer */ +- mtctr 29 /* set count register to fn ? */ +- mr 3, 31 /* set argument */ +- bctrl /* branch trough count register and link */ +- b _exit /* exit thread */ +- +-.Lclone_parent: +- lmw 29,16(1) /* restore saved registers */ +- addi 1, 1,32 /* free stack */ +- bnslr+ /* had cloned a thread so return to parent */ +- b error_unified_syscall +- +-.Lclone_error: +- li 3, EINVAL +- b error_unified_syscall +- +-#ifdef __ELF__ +-.section .note.GNU-stack,"",%progbits +-#endif +--- a/ppc/mmap.c ++++ /dev/null @@ -1,40 +0,0 @@ -#include "dietfeatures.h" -#include <sys/types.h> @@ -921,9 +949,8 @@ diff -NurpP dietlibc-0.30-execstack/ppc/mmap.c dietlibc-0.30-ppc-rename/ppc/mmap - return (__sc_err & 0x10000000 ? errno = __sc_ret, __sc_ret = -1 : 0), - (int) __sc_ret; -} -diff -NurpP dietlibc-0.30-execstack/ppc/setjmp.S dietlibc-0.30-ppc-rename/ppc/setjmp.S ---- dietlibc-0.30-execstack/ppc/setjmp.S 2006-09-07 12:24:13.119173750 +0200 -+++ dietlibc-0.30-ppc-rename/ppc/setjmp.S 1970-01-01 01:00:00.000000000 +0100 +--- a/ppc/setjmp.S ++++ /dev/null @@ -1,60 +0,0 @@ -#include <setjmp.h> - @@ -985,9 +1012,8 @@ diff -NurpP dietlibc-0.30-execstack/ppc/setjmp.S dietlibc-0.30-ppc-rename/ppc/se -#ifdef __ELF__ -.section .note.GNU-stack,"",%progbits -#endif -diff -NurpP dietlibc-0.30-execstack/ppc/start.S dietlibc-0.30-ppc-rename/ppc/start.S ---- dietlibc-0.30-execstack/ppc/start.S 2006-09-07 12:24:13.119173750 +0200 -+++ dietlibc-0.30-ppc-rename/ppc/start.S 1970-01-01 01:00:00.000000000 +0100 +--- a/ppc/start.S ++++ /dev/null @@ -1,56 +0,0 @@ -#include "dietfeatures.h" - @@ -1045,9 +1071,8 @@ diff -NurpP dietlibc-0.30-execstack/ppc/start.S dietlibc-0.30-ppc-rename/ppc/sta -#ifdef __ELF__ -.section .note.GNU-stack,"",%progbits -#endif -diff -NurpP dietlibc-0.30-execstack/ppc/syscalls.h dietlibc-0.30-ppc-rename/ppc/syscalls.h ---- dietlibc-0.30-execstack/ppc/syscalls.h 2005-09-21 09:33:08.000000000 +0200 -+++ dietlibc-0.30-ppc-rename/ppc/syscalls.h 1970-01-01 01:00:00.000000000 +0100 +--- a/ppc/syscalls.h ++++ /dev/null @@ -1,299 +0,0 @@ - -#define __NR_exit 1 @@ -1348,29 +1373,8 @@ diff -NurpP dietlibc-0.30-execstack/ppc/syscalls.h dietlibc-0.30-ppc-rename/ppc/ - li 0,__NR_##name; \ - b __unified_syscall - -diff -NurpP dietlibc-0.30-execstack/ppc/__testandset.S dietlibc-0.30-ppc-rename/ppc/__testandset.S ---- dietlibc-0.30-execstack/ppc/__testandset.S 2006-09-07 12:24:13.119173750 +0200 -+++ dietlibc-0.30-ppc-rename/ppc/__testandset.S 1970-01-01 01:00:00.000000000 +0100 -@@ -1,16 +0,0 @@ --.global __testandset --.type __testandset,@function --.align 2 --__testandset: --1: lwarx 5,0,3 -- li 0,1 -- stwcx. 0,0,3 -- bne- 1b -- mr 3,5 -- blr --.size __testandset,.-__testandset -- -- --#ifdef __ELF__ --.section .note.GNU-stack,"",%progbits --#endif -diff -NurpP dietlibc-0.30-execstack/ppc/unified.S dietlibc-0.30-ppc-rename/ppc/unified.S ---- dietlibc-0.30-execstack/ppc/unified.S 2006-09-07 12:24:13.119173750 +0200 -+++ dietlibc-0.30-ppc-rename/ppc/unified.S 1970-01-01 01:00:00.000000000 +0100 +--- a/ppc/unified.S ++++ /dev/null @@ -1,44 +0,0 @@ -#include <dietfeatures.h> -#include "syscalls.h" @@ -1416,9 +1420,8 @@ diff -NurpP dietlibc-0.30-execstack/ppc/unified.S dietlibc-0.30-ppc-rename/ppc/u -#ifdef __ELF__ -.section .note.GNU-stack,"",%progbits -#endif -diff -NurpP dietlibc-0.30-execstack/syscalls.h dietlibc-0.30-ppc-rename/syscalls.h ---- dietlibc-0.30-execstack/syscalls.h 2005-03-15 09:51:22.000000000 +0100 -+++ dietlibc-0.30-ppc-rename/syscalls.h 2006-09-07 12:28:54.384751750 +0200 +--- a/syscalls.h ++++ b/syscalls.h @@ -15,7 +15,7 @@ #include "ppc64/syscalls.h" diff --git a/dietlibc/patches/0.30-r2/155_ppc64_rename-powerpc64.patch b/dietlibc/patches/0.30-r2/155_ppc64_rename-powerpc64.patch index b894e18..1f8f2fa 100644 --- a/dietlibc/patches/0.30-r2/155_ppc64_rename-powerpc64.patch +++ b/dietlibc/patches/0.30-r2/155_ppc64_rename-powerpc64.patch @@ -1,27 +1,29 @@ -diff -NurpP dietlibc-0.30-ppc-rename/diet.c dietlibc-0.30-ppc64-rename/diet.c ---- dietlibc-0.30-ppc-rename/diet.c 2006-09-07 12:32:01.080419500 +0200 -+++ dietlibc-0.30-ppc64-rename/diet.c 2006-09-07 12:35:38.679351000 +0200 -@@ -36,7 +36,7 @@ static const char* Os[] = { - "mips","-Os","-fomit-frame-pointer","-mno-abicalls","-fno-pic","-G","0",0, - "mipsel","-Os","-fomit-frame-pointer","-mno-abicalls","-fno-pic","-G","0",0, - "powerpc","-Os","-fomit-frame-pointer","-mpowerpc-gpopt","-mpowerpc-gfxopt",0, -- "ppc64","-Os","-fomit-frame-pointer","-mpowerpc-gpopt","-mpowerpc-gfxopt",0, -+ "powerpc64","-Os","-fomit-frame-pointer","-mpowerpc-gpopt","-mpowerpc-gfxopt",0, - "s390","-Os","-fomit-frame-pointer",0, - "s390x","-Os","-fomit-frame-pointer",0, - "sh","-Os","-fomit-frame-pointer",0, -@@ -154,7 +154,7 @@ int main(int argc,char *argv[]) { - shortplatform="powerpc"; - #endif - #ifdef __powerpc64__ -- shortplatform="ppc64"; -+ shortplatform="powerpc64"; - #endif - #ifdef __i386__ - shortplatform="i386"; -diff -NurpP dietlibc-0.30-ppc-rename/Makefile dietlibc-0.30-ppc64-rename/Makefile ---- dietlibc-0.30-ppc-rename/Makefile 2006-09-07 12:44:19.878766750 +0200 -+++ dietlibc-0.30-ppc64-rename/Makefile 2006-09-07 12:44:54.108906000 +0200 +--- + Makefile | 13 + + diet.c | 4 + powerpc64/Makefile.add | 5 + powerpc64/__longjmp.S | 58 ++++++++ + powerpc64/__testandset.S | 16 ++ + powerpc64/clone.S | 56 ++++++++ + powerpc64/setjmp.S | 63 +++++++++ + powerpc64/start.S | 95 ++++++++++++++ + powerpc64/syscalls.h | 317 +++++++++++++++++++++++++++++++++++++++++++++++ + powerpc64/umount.S | 12 + + powerpc64/unified.S | 75 +++++++++++ + ppc64/Makefile.add | 5 + ppc64/__longjmp.S | 58 -------- + ppc64/__testandset.S | 16 -- + ppc64/clone.S | 56 -------- + ppc64/setjmp.S | 63 --------- + ppc64/start.S | 95 -------------- + ppc64/syscalls.h | 317 ----------------------------------------------- + ppc64/umount.S | 12 - + ppc64/unified.S | 75 ----------- + syscalls.h | 2 + 21 files changed, 709 insertions(+), 704 deletions(-) + +--- a/Makefile ++++ b/Makefile @@ -31,7 +31,11 @@ ifeq ($(MYARCH),powerpc) ARCH=powerpc else @@ -43,7 +45,7 @@ diff -NurpP dietlibc-0.30-ppc-rename/Makefile dietlibc-0.30-ppc64-rename/Makefil # ARCH=$(MYARCH) -@@ -391,9 +396,9 @@ uninstall: +@@ -381,9 +386,9 @@ uninstall: -rmdir $(DESTDIR)$(ILIBDIR) $(DESTDIR)$(MAN1DIR) $(DESTDIR)$(BINDIR) .PHONY: sparc powerpc mips arm alpha i386 parisc mipsel powerpc s390 sparc64 @@ -55,7 +57,7 @@ diff -NurpP dietlibc-0.30-ppc-rename/Makefile dietlibc-0.30-ppc64-rename/Makefil $(MAKE) ARCH=$@ CROSS=$@-linux- all i386: -@@ -404,7 +409,7 @@ else +@@ -394,7 +399,7 @@ else endif powerpc: @@ -64,69 +66,36 @@ diff -NurpP dietlibc-0.30-ppc-rename/Makefile dietlibc-0.30-ppc64-rename/Makefil $(MAKE) ARCH=$@ CC="$(CC) -m32" all else $(MAKE) ARCH=$@ CROSS=$@-linux- all -diff -NurpP dietlibc-0.30-ppc-rename/powerpc64/clone.S dietlibc-0.30-ppc64-rename/powerpc64/clone.S ---- dietlibc-0.30-ppc-rename/powerpc64/clone.S 1970-01-01 01:00:00.000000000 +0100 -+++ dietlibc-0.30-ppc64-rename/powerpc64/clone.S 2006-09-07 12:24:13.091172000 +0200 -@@ -0,0 +1,56 @@ -+#include <dietfeatures.h> -+#include "syscalls.h" -+#include <errno.h> -+ -+.text -+.weak clone -+clone: -+.global __clone -+__clone: -+ cmpwi 4,0 /* check have non null child_stack pointer */ -+ cmpwi cr1, 3,0 /* check have non null thread_funcion */ -+ cror eq,4*cr1+eq,eq /* now if eq is set one is or both are zero */ -+ beq .Lclone_error -+ -+ stdu 1,-64(1) /* alloc some space on the stack */ -+ std 29, 16(1) /* save r29,r30,r31 on stack */ -+ std 30, 24(1) -+ std 31, 32(1) -+ -+ rlwinm 4,4,0,0,27 /* mask out lower 4 bits */ -+ -+ /* move parameter to positions clone wants them */ -+ mr 29,3 /* r29 = r3 fn */ -+ mr 30,4 /* r30 = r4 stack */ -+ mr 31,6 /* r31 = r6 arg */ -+ mr 3, 5 /* r3 = r5 flags */ -+ -+ li 0, __NR_clone /* load syscall nr. */ -+ sc -+ -+ cmpwi cr1,3,0 /* compare return of syscall with 0 */ -+ crandc 4*cr1+eq,4*cr1+eq,so -+ bne .Lclone_parent /* return was non zero -> .Lclone_parent */ -+ -+ /* we are the cloned process */ -+ mr 1, 30 /* set stack pointer */ -+ mtctr 29 /* set count register to fn ? */ -+ mr 3, 31 /* set argument */ -+ bctrl /* branch trough count register and link */ -+ b _exit /* exit thread */ -+ -+.Lclone_parent: -+ ld 29,16(1) /* restore saved registers */ -+ ld 30,24(1) -+ ld 31,32(1) -+ addi 1, 1,64 /* free stack */ -+ bnslr+ /* had cloned a thread so return to parent */ -+ b error_unified_syscall +--- a/diet.c ++++ b/diet.c +@@ -36,7 +36,7 @@ static const char* Os[] = { + "mips","-Os","-fomit-frame-pointer","-mno-abicalls","-fno-pic","-G","0",0, + "mipsel","-Os","-fomit-frame-pointer","-mno-abicalls","-fno-pic","-G","0",0, + "powerpc","-Os","-fomit-frame-pointer","-mpowerpc-gpopt","-mpowerpc-gfxopt",0, +- "ppc64","-Os","-fomit-frame-pointer","-mpowerpc-gpopt","-mpowerpc-gfxopt",0, ++ "powerpc64","-Os","-fomit-frame-pointer","-mpowerpc-gpopt","-mpowerpc-gfxopt",0, + "s390","-Os","-fomit-frame-pointer",0, + "s390x","-Os","-fomit-frame-pointer",0, + "sh","-Os","-fomit-frame-pointer",0, +@@ -154,7 +154,7 @@ int main(int argc,char *argv[]) { + shortplatform="powerpc"; + #endif + #ifdef __powerpc64__ +- shortplatform="ppc64"; ++ shortplatform="powerpc64"; + #endif + #ifdef __i386__ + shortplatform="i386"; +--- /dev/null ++++ b/powerpc64/Makefile.add +@@ -0,0 +1,5 @@ + -+.Lclone_error: -+ li 3, EINVAL -+ b error_unified_syscall ++CFLAGS+=-Os -mpowerpc64 ++VPATH:=powerpc64:syscalls.s:$(VPATH) + -+#ifdef __ELF__ -+.section .note.GNU-stack,"",%progbits -+#endif -diff -NurpP dietlibc-0.30-ppc-rename/powerpc64/__longjmp.S dietlibc-0.30-ppc64-rename/powerpc64/__longjmp.S ---- dietlibc-0.30-ppc-rename/powerpc64/__longjmp.S 1970-01-01 01:00:00.000000000 +0100 -+++ dietlibc-0.30-ppc64-rename/powerpc64/__longjmp.S 2006-09-07 12:24:13.091172000 +0200 ++CC+=-m64 +--- /dev/null ++++ b/powerpc64/__longjmp.S @@ -0,0 +1,58 @@ +#include <setjmp.h> + @@ -186,18 +155,86 @@ diff -NurpP dietlibc-0.30-ppc-rename/powerpc64/__longjmp.S dietlibc-0.30-ppc64-r +#ifdef __ELF__ +.section .note.GNU-stack,"",%progbits +#endif -diff -NurpP dietlibc-0.30-ppc-rename/powerpc64/Makefile.add dietlibc-0.30-ppc64-rename/powerpc64/Makefile.add ---- dietlibc-0.30-ppc-rename/powerpc64/Makefile.add 1970-01-01 01:00:00.000000000 +0100 -+++ dietlibc-0.30-ppc64-rename/powerpc64/Makefile.add 2006-05-07 06:16:59.000000000 +0200 -@@ -0,0 +1,5 @@ +--- /dev/null ++++ b/powerpc64/__testandset.S +@@ -0,0 +1,16 @@ ++.global __testandset ++.type __testandset,@function ++.align 2 ++__testandset: ++1: lwarx 5,0,3 ++ li 0,1 ++ stwcx. 0,0,3 ++ bne- 1b ++ mr 3,5 ++ blr ++.size __testandset,.-__testandset + -+CFLAGS+=-Os -mpowerpc64 -+VPATH:=ppc64:syscalls.s:$(VPATH) + -+CC+=-m64 -diff -NurpP dietlibc-0.30-ppc-rename/powerpc64/setjmp.S dietlibc-0.30-ppc64-rename/powerpc64/setjmp.S ---- dietlibc-0.30-ppc-rename/powerpc64/setjmp.S 1970-01-01 01:00:00.000000000 +0100 -+++ dietlibc-0.30-ppc64-rename/powerpc64/setjmp.S 2006-09-07 12:24:13.091172000 +0200 ++#ifdef __ELF__ ++.section .note.GNU-stack,"",%progbits ++#endif +--- /dev/null ++++ b/powerpc64/clone.S +@@ -0,0 +1,56 @@ ++#include <dietfeatures.h> ++#include "syscalls.h" ++#include <errno.h> ++ ++.text ++.weak clone ++clone: ++.global __clone ++__clone: ++ cmpwi 4,0 /* check have non null child_stack pointer */ ++ cmpwi cr1, 3,0 /* check have non null thread_funcion */ ++ cror eq,4*cr1+eq,eq /* now if eq is set one is or both are zero */ ++ beq .Lclone_error ++ ++ stdu 1,-64(1) /* alloc some space on the stack */ ++ std 29, 16(1) /* save r29,r30,r31 on stack */ ++ std 30, 24(1) ++ std 31, 32(1) ++ ++ rlwinm 4,4,0,0,27 /* mask out lower 4 bits */ ++ ++ /* move parameter to positions clone wants them */ ++ mr 29,3 /* r29 = r3 fn */ ++ mr 30,4 /* r30 = r4 stack */ ++ mr 31,6 /* r31 = r6 arg */ ++ mr 3, 5 /* r3 = r5 flags */ ++ ++ li 0, __NR_clone /* load syscall nr. */ ++ sc ++ ++ cmpwi cr1,3,0 /* compare return of syscall with 0 */ ++ crandc 4*cr1+eq,4*cr1+eq,so ++ bne .Lclone_parent /* return was non zero -> .Lclone_parent */ ++ ++ /* we are the cloned process */ ++ mr 1, 30 /* set stack pointer */ ++ mtctr 29 /* set count register to fn ? */ ++ mr 3, 31 /* set argument */ ++ bctrl /* branch trough count register and link */ ++ b _exit /* exit thread */ ++ ++.Lclone_parent: ++ ld 29,16(1) /* restore saved registers */ ++ ld 30,24(1) ++ ld 31,32(1) ++ addi 1, 1,64 /* free stack */ ++ bnslr+ /* had cloned a thread so return to parent */ ++ b error_unified_syscall ++ ++.Lclone_error: ++ li 3, EINVAL ++ b error_unified_syscall ++ ++#ifdef __ELF__ ++.section .note.GNU-stack,"",%progbits ++#endif +--- /dev/null ++++ b/powerpc64/setjmp.S @@ -0,0 +1,63 @@ +#include <setjmp.h> + @@ -262,9 +299,8 @@ diff -NurpP dietlibc-0.30-ppc-rename/powerpc64/setjmp.S dietlibc-0.30-ppc64-rena +#ifdef __ELF__ +.section .note.GNU-stack,"",%progbits +#endif -diff -NurpP dietlibc-0.30-ppc-rename/powerpc64/start.S dietlibc-0.30-ppc64-rename/powerpc64/start.S ---- dietlibc-0.30-ppc-rename/powerpc64/start.S 1970-01-01 01:00:00.000000000 +0100 -+++ dietlibc-0.30-ppc64-rename/powerpc64/start.S 2006-09-07 12:24:13.091172000 +0200 +--- /dev/null ++++ b/powerpc64/start.S @@ -0,0 +1,95 @@ +#include "dietfeatures.h" + @@ -361,9 +397,8 @@ diff -NurpP dietlibc-0.30-ppc-rename/powerpc64/start.S dietlibc-0.30-ppc64-renam +#ifdef __ELF__ +.section .note.GNU-stack,"",%progbits +#endif -diff -NurpP dietlibc-0.30-ppc-rename/powerpc64/syscalls.h dietlibc-0.30-ppc64-rename/powerpc64/syscalls.h ---- dietlibc-0.30-ppc-rename/powerpc64/syscalls.h 1970-01-01 01:00:00.000000000 +0100 -+++ dietlibc-0.30-ppc64-rename/powerpc64/syscalls.h 2005-09-21 09:33:08.000000000 +0200 +--- /dev/null ++++ b/powerpc64/syscalls.h @@ -0,0 +1,317 @@ + +#define __NR_exit 1 @@ -682,29 +717,8 @@ diff -NurpP dietlibc-0.30-ppc-rename/powerpc64/syscalls.h dietlibc-0.30-ppc64-re + li 0,__NR_##name; \ + b __unified_syscall + -diff -NurpP dietlibc-0.30-ppc-rename/powerpc64/__testandset.S dietlibc-0.30-ppc64-rename/powerpc64/__testandset.S ---- dietlibc-0.30-ppc-rename/powerpc64/__testandset.S 1970-01-01 01:00:00.000000000 +0100 -+++ dietlibc-0.30-ppc64-rename/powerpc64/__testandset.S 2006-09-07 12:24:13.091172000 +0200 -@@ -0,0 +1,16 @@ -+.global __testandset -+.type __testandset,@function -+.align 2 -+__testandset: -+1: lwarx 5,0,3 -+ li 0,1 -+ stwcx. 0,0,3 -+ bne- 1b -+ mr 3,5 -+ blr -+.size __testandset,.-__testandset -+ -+ -+#ifdef __ELF__ -+.section .note.GNU-stack,"",%progbits -+#endif -diff -NurpP dietlibc-0.30-ppc-rename/powerpc64/umount.S dietlibc-0.30-ppc64-rename/powerpc64/umount.S ---- dietlibc-0.30-ppc-rename/powerpc64/umount.S 1970-01-01 01:00:00.000000000 +0100 -+++ dietlibc-0.30-ppc64-rename/powerpc64/umount.S 2006-09-07 12:24:13.091172000 +0200 +--- /dev/null ++++ b/powerpc64/umount.S @@ -0,0 +1,12 @@ +#include "syscalls.h" + @@ -718,9 +732,8 @@ diff -NurpP dietlibc-0.30-ppc-rename/powerpc64/umount.S dietlibc-0.30-ppc64-rena +#ifdef __ELF__ +.section .note.GNU-stack,"",%progbits +#endif -diff -NurpP dietlibc-0.30-ppc-rename/powerpc64/unified.S dietlibc-0.30-ppc64-rename/powerpc64/unified.S ---- dietlibc-0.30-ppc-rename/powerpc64/unified.S 1970-01-01 01:00:00.000000000 +0100 -+++ dietlibc-0.30-ppc64-rename/powerpc64/unified.S 2006-09-07 12:24:13.091172000 +0200 +--- /dev/null ++++ b/powerpc64/unified.S @@ -0,0 +1,75 @@ +#include <dietfeatures.h> +#include "syscalls.h" @@ -797,69 +810,16 @@ diff -NurpP dietlibc-0.30-ppc-rename/powerpc64/unified.S dietlibc-0.30-ppc64-ren +#ifdef __ELF__ +.section .note.GNU-stack,"",%progbits +#endif -diff -NurpP dietlibc-0.30-ppc-rename/ppc64/clone.S dietlibc-0.30-ppc64-rename/ppc64/clone.S ---- dietlibc-0.30-ppc-rename/ppc64/clone.S 2006-09-07 12:24:13.091172000 +0200 -+++ dietlibc-0.30-ppc64-rename/ppc64/clone.S 1970-01-01 01:00:00.000000000 +0100 -@@ -1,56 +0,0 @@ --#include <dietfeatures.h> --#include "syscalls.h" --#include <errno.h> -- --.text --.weak clone --clone: --.global __clone --__clone: -- cmpwi 4,0 /* check have non null child_stack pointer */ -- cmpwi cr1, 3,0 /* check have non null thread_funcion */ -- cror eq,4*cr1+eq,eq /* now if eq is set one is or both are zero */ -- beq .Lclone_error -- -- stdu 1,-64(1) /* alloc some space on the stack */ -- std 29, 16(1) /* save r29,r30,r31 on stack */ -- std 30, 24(1) -- std 31, 32(1) -- -- rlwinm 4,4,0,0,27 /* mask out lower 4 bits */ -- -- /* move parameter to positions clone wants them */ -- mr 29,3 /* r29 = r3 fn */ -- mr 30,4 /* r30 = r4 stack */ -- mr 31,6 /* r31 = r6 arg */ -- mr 3, 5 /* r3 = r5 flags */ -- -- li 0, __NR_clone /* load syscall nr. */ -- sc -- -- cmpwi cr1,3,0 /* compare return of syscall with 0 */ -- crandc 4*cr1+eq,4*cr1+eq,so -- bne .Lclone_parent /* return was non zero -> .Lclone_parent */ -- -- /* we are the cloned process */ -- mr 1, 30 /* set stack pointer */ -- mtctr 29 /* set count register to fn ? */ -- mr 3, 31 /* set argument */ -- bctrl /* branch trough count register and link */ -- b _exit /* exit thread */ -- --.Lclone_parent: -- ld 29,16(1) /* restore saved registers */ -- ld 30,24(1) -- ld 31,32(1) -- addi 1, 1,64 /* free stack */ -- bnslr+ /* had cloned a thread so return to parent */ -- b error_unified_syscall +--- a/ppc64/Makefile.add ++++ /dev/null +@@ -1,5 +0,0 @@ - --.Lclone_error: -- li 3, EINVAL -- b error_unified_syscall +-CFLAGS+=-Os -mpowerpc64 +-VPATH:=ppc64:syscalls.s:$(VPATH) - --#ifdef __ELF__ --.section .note.GNU-stack,"",%progbits --#endif -diff -NurpP dietlibc-0.30-ppc-rename/ppc64/__longjmp.S dietlibc-0.30-ppc64-rename/ppc64/__longjmp.S ---- dietlibc-0.30-ppc-rename/ppc64/__longjmp.S 2006-09-07 12:24:13.091172000 +0200 -+++ dietlibc-0.30-ppc64-rename/ppc64/__longjmp.S 1970-01-01 01:00:00.000000000 +0100 +-CC+=-m64 +--- a/ppc64/__longjmp.S ++++ /dev/null @@ -1,58 +0,0 @@ -#include <setjmp.h> - @@ -919,18 +879,86 @@ diff -NurpP dietlibc-0.30-ppc-rename/ppc64/__longjmp.S dietlibc-0.30-ppc64-renam -#ifdef __ELF__ -.section .note.GNU-stack,"",%progbits -#endif -diff -NurpP dietlibc-0.30-ppc-rename/ppc64/Makefile.add dietlibc-0.30-ppc64-rename/ppc64/Makefile.add ---- dietlibc-0.30-ppc-rename/ppc64/Makefile.add 2006-05-07 06:16:59.000000000 +0200 -+++ dietlibc-0.30-ppc64-rename/ppc64/Makefile.add 1970-01-01 01:00:00.000000000 +0100 -@@ -1,5 +0,0 @@ +--- a/ppc64/__testandset.S ++++ /dev/null +@@ -1,16 +0,0 @@ +-.global __testandset +-.type __testandset,@function +-.align 2 +-__testandset: +-1: lwarx 5,0,3 +- li 0,1 +- stwcx. 0,0,3 +- bne- 1b +- mr 3,5 +- blr +-.size __testandset,.-__testandset - --CFLAGS+=-Os -mpowerpc64 --VPATH:=ppc64:syscalls.s:$(VPATH) - --CC+=-m64 -diff -NurpP dietlibc-0.30-ppc-rename/ppc64/setjmp.S dietlibc-0.30-ppc64-rename/ppc64/setjmp.S ---- dietlibc-0.30-ppc-rename/ppc64/setjmp.S 2006-09-07 12:24:13.091172000 +0200 -+++ dietlibc-0.30-ppc64-rename/ppc64/setjmp.S 1970-01-01 01:00:00.000000000 +0100 +-#ifdef __ELF__ +-.section .note.GNU-stack,"",%progbits +-#endif +--- a/ppc64/clone.S ++++ /dev/null +@@ -1,56 +0,0 @@ +-#include <dietfeatures.h> +-#include "syscalls.h" +-#include <errno.h> +- +-.text +-.weak clone +-clone: +-.global __clone +-__clone: +- cmpwi 4,0 /* check have non null child_stack pointer */ +- cmpwi cr1, 3,0 /* check have non null thread_funcion */ +- cror eq,4*cr1+eq,eq /* now if eq is set one is or both are zero */ +- beq .Lclone_error +- +- stdu 1,-64(1) /* alloc some space on the stack */ +- std 29, 16(1) /* save r29,r30,r31 on stack */ +- std 30, 24(1) +- std 31, 32(1) +- +- rlwinm 4,4,0,0,27 /* mask out lower 4 bits */ +- +- /* move parameter to positions clone wants them */ +- mr 29,3 /* r29 = r3 fn */ +- mr 30,4 /* r30 = r4 stack */ +- mr 31,6 /* r31 = r6 arg */ +- mr 3, 5 /* r3 = r5 flags */ +- +- li 0, __NR_clone /* load syscall nr. */ +- sc +- +- cmpwi cr1,3,0 /* compare return of syscall with 0 */ +- crandc 4*cr1+eq,4*cr1+eq,so +- bne .Lclone_parent /* return was non zero -> .Lclone_parent */ +- +- /* we are the cloned process */ +- mr 1, 30 /* set stack pointer */ +- mtctr 29 /* set count register to fn ? */ +- mr 3, 31 /* set argument */ +- bctrl /* branch trough count register and link */ +- b _exit /* exit thread */ +- +-.Lclone_parent: +- ld 29,16(1) /* restore saved registers */ +- ld 30,24(1) +- ld 31,32(1) +- addi 1, 1,64 /* free stack */ +- bnslr+ /* had cloned a thread so return to parent */ +- b error_unified_syscall +- +-.Lclone_error: +- li 3, EINVAL +- b error_unified_syscall +- +-#ifdef __ELF__ +-.section .note.GNU-stack,"",%progbits +-#endif +--- a/ppc64/setjmp.S ++++ /dev/null @@ -1,63 +0,0 @@ -#include <setjmp.h> - @@ -995,9 +1023,8 @@ diff -NurpP dietlibc-0.30-ppc-rename/ppc64/setjmp.S dietlibc-0.30-ppc64-rename/p -#ifdef __ELF__ -.section .note.GNU-stack,"",%progbits -#endif -diff -NurpP dietlibc-0.30-ppc-rename/ppc64/start.S dietlibc-0.30-ppc64-rename/ppc64/start.S ---- dietlibc-0.30-ppc-rename/ppc64/start.S 2006-09-07 12:24:13.091172000 +0200 -+++ dietlibc-0.30-ppc64-rename/ppc64/start.S 1970-01-01 01:00:00.000000000 +0100 +--- a/ppc64/start.S ++++ /dev/null @@ -1,95 +0,0 @@ -#include "dietfeatures.h" - @@ -1094,9 +1121,8 @@ diff -NurpP dietlibc-0.30-ppc-rename/ppc64/start.S dietlibc-0.30-ppc64-rename/pp -#ifdef __ELF__ -.section .note.GNU-stack,"",%progbits -#endif -diff -NurpP dietlibc-0.30-ppc-rename/ppc64/syscalls.h dietlibc-0.30-ppc64-rename/ppc64/syscalls.h ---- dietlibc-0.30-ppc-rename/ppc64/syscalls.h 2005-09-21 09:33:08.000000000 +0200 -+++ dietlibc-0.30-ppc64-rename/ppc64/syscalls.h 1970-01-01 01:00:00.000000000 +0100 +--- a/ppc64/syscalls.h ++++ /dev/null @@ -1,317 +0,0 @@ - -#define __NR_exit 1 @@ -1415,29 +1441,8 @@ diff -NurpP dietlibc-0.30-ppc-rename/ppc64/syscalls.h dietlibc-0.30-ppc64-rename - li 0,__NR_##name; \ - b __unified_syscall - -diff -NurpP dietlibc-0.30-ppc-rename/ppc64/__testandset.S dietlibc-0.30-ppc64-rename/ppc64/__testandset.S ---- dietlibc-0.30-ppc-rename/ppc64/__testandset.S 2006-09-07 12:24:13.091172000 +0200 -+++ dietlibc-0.30-ppc64-rename/ppc64/__testandset.S 1970-01-01 01:00:00.000000000 +0100 -@@ -1,16 +0,0 @@ --.global __testandset --.type __testandset,@function --.align 2 --__testandset: --1: lwarx 5,0,3 -- li 0,1 -- stwcx. 0,0,3 -- bne- 1b -- mr 3,5 -- blr --.size __testandset,.-__testandset -- -- --#ifdef __ELF__ --.section .note.GNU-stack,"",%progbits --#endif -diff -NurpP dietlibc-0.30-ppc-rename/ppc64/umount.S dietlibc-0.30-ppc64-rename/ppc64/umount.S ---- dietlibc-0.30-ppc-rename/ppc64/umount.S 2006-09-07 12:24:13.091172000 +0200 -+++ dietlibc-0.30-ppc64-rename/ppc64/umount.S 1970-01-01 01:00:00.000000000 +0100 +--- a/ppc64/umount.S ++++ /dev/null @@ -1,12 +0,0 @@ -#include "syscalls.h" - @@ -1451,9 +1456,8 @@ diff -NurpP dietlibc-0.30-ppc-rename/ppc64/umount.S dietlibc-0.30-ppc64-rename/p -#ifdef __ELF__ -.section .note.GNU-stack,"",%progbits -#endif -diff -NurpP dietlibc-0.30-ppc-rename/ppc64/unified.S dietlibc-0.30-ppc64-rename/ppc64/unified.S ---- dietlibc-0.30-ppc-rename/ppc64/unified.S 2006-09-07 12:24:13.091172000 +0200 -+++ dietlibc-0.30-ppc64-rename/ppc64/unified.S 1970-01-01 01:00:00.000000000 +0100 +--- a/ppc64/unified.S ++++ /dev/null @@ -1,75 +0,0 @@ -#include <dietfeatures.h> -#include "syscalls.h" @@ -1530,9 +1534,8 @@ diff -NurpP dietlibc-0.30-ppc-rename/ppc64/unified.S dietlibc-0.30-ppc64-rename/ -#ifdef __ELF__ -.section .note.GNU-stack,"",%progbits -#endif -diff -NurpP dietlibc-0.30-ppc-rename/syscalls.h dietlibc-0.30-ppc64-rename/syscalls.h ---- dietlibc-0.30-ppc-rename/syscalls.h 2006-09-07 12:28:54.384751750 +0200 -+++ dietlibc-0.30-ppc64-rename/syscalls.h 2006-09-07 12:35:50.997959250 +0200 +--- a/syscalls.h ++++ b/syscalls.h @@ -12,7 +12,7 @@ #endif |