/[vps]/dietlibc/patches/0.30_pre20060501-r1/03_all_ppc-rename.patch
Gentoo

Contents of /dietlibc/patches/0.30_pre20060501-r1/03_all_ppc-rename.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 352 - (show annotations) (download)
Tue May 2 15:11:48 2006 UTC (8 years, 3 months ago) by phreak
File size: 81089 byte(s)
Starting -r1 patch series for the cvs snapshot, that should fix my diet.ld.conf "bug"
1 diff -NurpP dietlibc-0.30_pre20060501.orig/diet.c dietlibc-0.30_pre20060501-ppc-rename/diet.c
2 --- dietlibc-0.30_pre20060501.orig/diet.c 2006-04-04 05:47:21.000000000 +0200
3 +++ dietlibc-0.30_pre20060501-ppc-rename/diet.c 2006-05-01 12:22:21.566468000 +0200
4 @@ -35,8 +35,8 @@ static const char* Os[] = {
5 "arm","-Os","-fomit-frame-pointer",0,
6 "mips","-Os","-fomit-frame-pointer","-mno-abicalls","-fno-pic","-G","0",0,
7 "mipsel","-Os","-fomit-frame-pointer","-mno-abicalls","-fno-pic","-G","0",0,
8 - "ppc","-Os","-fomit-frame-pointer","-mpowerpc-gpopt","-mpowerpc-gfxopt",0,
9 - "ppc64","-Os","-fomit-frame-pointer","-mpowerpc-gpopt","-mpowerpc-gfxopt",0,
10 + "powerpc","-Os","-fomit-frame-pointer","-mpowerpc-gpopt","-mpowerpc-gfxopt",0,
11 + "powerpc64","-Os","-fomit-frame-pointer","-mpowerpc-gpopt","-mpowerpc-gfxopt",0,
12 "s390","-Os","-fomit-frame-pointer",0,
13 "s390x","-Os","-fomit-frame-pointer",0,
14 "sh","-Os","-fomit-frame-pointer",0,
15 @@ -151,10 +151,10 @@ int main(int argc,char *argv[]) {
16 #endif
17 #endif
18 #ifdef __powerpc__
19 - shortplatform="ppc";
20 + shortplatform="powerpc";
21 #endif
22 #ifdef __powerpc64__
23 - shortplatform="ppc64";
24 + shortplatform="powerpc64";
25 #endif
26 #ifdef __i386__
27 shortplatform="i386";
28 diff -NurpP dietlibc-0.30_pre20060501.orig/Makefile dietlibc-0.30_pre20060501-ppc-rename/Makefile
29 --- dietlibc-0.30_pre20060501.orig/Makefile 2006-04-04 07:35:14.000000000 +0200
30 +++ dietlibc-0.30_pre20060501-ppc-rename/Makefile 2006-05-01 12:22:21.566468000 +0200
31 @@ -24,10 +24,10 @@ ifeq ($(MYARCH),alpha)
32 ARCH=alpha
33 else
34 ifeq ($(MYARCH),ppc)
35 -ARCH=ppc
36 +ARCH=powerpc
37 else
38 ifeq ($(MYARCH),ppc64)
39 -ARCH=ppc64
40 +ARCH=powerpc64
41 else
42 ifeq ($(MYARCH),arm)
43 ARCH=arm
44 @@ -385,10 +385,10 @@ uninstall:
45 for i in `find include -name \*.h`; do rm -f $(DESTDIR)$(prefix)/$$i; done
46 -rmdir $(DESTDIR)$(ILIBDIR) $(DESTDIR)$(MAN1DIR) $(DESTDIR)$(BINDIR)
47
48 -.PHONY: sparc ppc mips arm alpha i386 parisc mipsel powerpc s390 sparc64
49 -.PHONY: x86_64 ia64 ppc64 s390x
50 +.PHONY: sparc powerpc mips arm alpha i386 parisc mipsel powerpc s390 sparc64
51 +.PHONY: x86_64 ia64 powerpc64 s390x
52
53 -arm sparc ppc alpha mips parisc s390 sparc64 x86_64 ia64 ppc64 s390x:
54 +arm sparc powerpc alpha mips parisc s390 sparc64 x86_64 ia64 powerpc64 s390x:
55 $(MAKE) ARCH=$@ CROSS=$@-linux- all
56
57 i386:
58 @@ -405,15 +405,11 @@ mipsel:
59 mips-gnu:
60 $(MAKE) ARCH=$@ CROSS=$@-linux-gnu- all
61
62 -# Some people named their cross compiler toolchain powerpc-linux-gcc
63 -powerpc:
64 - $(MAKE) ARCH=ppc CROSS=powerpc-linux- all
65 -
66 hppa:
67 ln -sf bin-parisc bin-hppa
68 $(MAKE) ARCH=parisc CROSS=hppa-linux- all
69
70 -CROSS_ARCH=arm sparc ppc alpha i386 mips sparc64 x86_64 s390 parisc
71 +CROSS_ARCH=arm sparc powerpc alpha i386 mips sparc64 x86_64 s390 parisc
72 cross:
73 $(MAKE) $(subst $(ARCH),,$(CROSS_ARCH))
74
75 diff -NurpP dietlibc-0.30_pre20060501.orig/powerpc/clone.S dietlibc-0.30_pre20060501-ppc-rename/powerpc/clone.S
76 --- dietlibc-0.30_pre20060501.orig/powerpc/clone.S 1970-01-01 01:00:00.000000000 +0100
77 +++ dietlibc-0.30_pre20060501-ppc-rename/powerpc/clone.S 2001-12-13 17:05:03.000000000 +0100
78 @@ -0,0 +1,48 @@
79 +#include <dietfeatures.h>
80 +#include "syscalls.h"
81 +#include <errno.h>
82 +
83 +.text
84 +.weak clone
85 +clone:
86 +.global __clone
87 +__clone:
88 + cmpwi 4,0 /* check have non null child_stack pointer */
89 + cmpwi cr1, 3,0 /* check have non null thread_funcion */
90 + cror eq,4*cr1+eq,eq /* now if eq is set one is or both are zero */
91 + beq .Lclone_error
92 +
93 + stwu 1,-32(1) /* alloc some space on the stack */
94 + stmw 29, 16(1) /* save r29,r30,r31 on stack */
95 +
96 + rlwinm 4,4,0,0,27 /* mask out lower 4 bits */
97 +
98 + /* move parameter to positions clone wants them */
99 + mr 29,3 /* r29 = r3 fn */
100 + mr 30,4 /* r30 = r4 stack */
101 + mr 31,6 /* r31 = r6 arg */
102 + mr 3, 5 /* r3 = r5 flags */
103 +
104 + li 0, __NR_clone /* load syscall nr. */
105 + sc
106 +
107 + cmpwi cr1,3,0 /* compare return of syscall with 0 */
108 + crandc 4*cr1+eq,4*cr1+eq,so
109 + bne .Lclone_parent /* return was non zero -> .Lclone_parent */
110 +
111 + /* we are the cloned process */
112 + mr 1, 30 /* set stack pointer */
113 + mtctr 29 /* set count register to fn ? */
114 + mr 3, 31 /* set argument */
115 + bctrl /* branch trough count register and link */
116 + b _exit /* exit thread */
117 +
118 +.Lclone_parent:
119 + lmw 29,16(1) /* restore saved registers */
120 + addi 1, 1,32 /* free stack */
121 + bnslr+ /* had cloned a thread so return to parent */
122 + b error_unified_syscall
123 +
124 +.Lclone_error:
125 + li 3, EINVAL
126 + b error_unified_syscall
127 diff -NurpP dietlibc-0.30_pre20060501.orig/powerpc/__longjmp.S dietlibc-0.30_pre20060501-ppc-rename/powerpc/__longjmp.S
128 --- dietlibc-0.30_pre20060501.orig/powerpc/__longjmp.S 1970-01-01 01:00:00.000000000 +0100
129 +++ dietlibc-0.30_pre20060501-ppc-rename/powerpc/__longjmp.S 2001-01-25 18:23:36.000000000 +0100
130 @@ -0,0 +1,59 @@
131 +#include <setjmp.h>
132 +
133 +
134 +#ifdef PIC
135 +#define JUMPTARGET(name) name##@plt
136 +#else
137 +#define JUMPTARGET(name) name
138 +#endif
139 +
140 +.global __longjmp
141 +.type __longjmp,@function
142 +.align 2
143 +__longjmp:
144 + lwz 1,(JB_GPR1*4)(3)
145 + lwz 2,(JB_GPR2*4)(3)
146 + lwz 0,(JB_LR*4)(3)
147 + lwz 14,((JB_GPRS+0)*4)(3)
148 + lfd 14,((JB_FPRS+0*2)*4)(3)
149 + lwz 15,((JB_GPRS+1)*4)(3)
150 + lfd 15,((JB_FPRS+1*2)*4)(3)
151 + lwz 16,((JB_GPRS+2)*4)(3)
152 + lfd 16,((JB_FPRS+2*2)*4)(3)
153 + lwz 17,((JB_GPRS+3)*4)(3)
154 + lfd 17,((JB_FPRS+3*2)*4)(3)
155 + lwz 18,((JB_GPRS+4)*4)(3)
156 + lfd 18,((JB_FPRS+4*2)*4)(3)
157 + lwz 19,((JB_GPRS+5)*4)(3)
158 + lfd 19,((JB_FPRS+5*2)*4)(3)
159 + lwz 20,((JB_GPRS+6)*4)(3)
160 + lfd 20,((JB_FPRS+6*2)*4)(3)
161 + mtlr 0
162 + lwz 21,((JB_GPRS+7)*4)(3)
163 + lfd 21,((JB_FPRS+7*2)*4)(3)
164 + lwz 22,((JB_GPRS+8)*4)(3)
165 + lfd 22,((JB_FPRS+8*2)*4)(3)
166 + lwz 0,(JB_CR*4)(3)
167 + lwz 23,((JB_GPRS+9)*4)(3)
168 + lfd 23,((JB_FPRS+9*2)*4)(3)
169 + lwz 24,((JB_GPRS+10)*4)(3)
170 + lfd 24,((JB_FPRS+10*2)*4)(3)
171 + lwz 25,((JB_GPRS+11)*4)(3)
172 + lfd 25,((JB_FPRS+11*2)*4)(3)
173 + mtcrf 0xFF,0
174 + lwz 26,((JB_GPRS+12)*4)(3)
175 + lfd 26,((JB_FPRS+12*2)*4)(3)
176 + lwz 27,((JB_GPRS+13)*4)(3)
177 + lfd 27,((JB_FPRS+13*2)*4)(3)
178 + lwz 28,((JB_GPRS+14)*4)(3)
179 + lfd 28,((JB_FPRS+14*2)*4)(3)
180 + lwz 29,((JB_GPRS+15)*4)(3)
181 + lfd 29,((JB_FPRS+15*2)*4)(3)
182 + lwz 30,((JB_GPRS+16)*4)(3)
183 + lfd 30,((JB_FPRS+16*2)*4)(3)
184 + lwz 31,((JB_GPRS+17)*4)(3)
185 + lfd 31,((JB_FPRS+17*2)*4)(3)
186 + mr 3,4
187 + blr
188 +.size __longjmp,.-__longjmp
189 +
190 diff -NurpP dietlibc-0.30_pre20060501.orig/powerpc/Makefile.add dietlibc-0.30_pre20060501-ppc-rename/powerpc/Makefile.add
191 --- dietlibc-0.30_pre20060501.orig/powerpc/Makefile.add 1970-01-01 01:00:00.000000000 +0100
192 +++ dietlibc-0.30_pre20060501-ppc-rename/powerpc/Makefile.add 2001-01-30 16:01:20.000000000 +0100
193 @@ -0,0 +1,3 @@
194 +
195 +CFLAGS+=-mpowerpc-gpopt -mpowerpc-gfxopt -Os
196 +VPATH:=ppc:syscalls.s:$(VPATH)
197 diff -NurpP dietlibc-0.30_pre20060501.orig/powerpc/mmap.c dietlibc-0.30_pre20060501-ppc-rename/powerpc/mmap.c
198 --- dietlibc-0.30_pre20060501.orig/powerpc/mmap.c 1970-01-01 01:00:00.000000000 +0100
199 +++ dietlibc-0.30_pre20060501-ppc-rename/powerpc/mmap.c 2001-06-18 23:08:07.000000000 +0200
200 @@ -0,0 +1,40 @@
201 +#include "dietfeatures.h"
202 +#include <sys/types.h>
203 +#include <errno.h>
204 +#include "syscalls.h"
205 +
206 +int mmap(void*start,size_t length,int prot,int flags,int fd,off_t offset) {
207 + unsigned long __sc_ret, __sc_err;
208 + {
209 + register unsigned long __sc_0 __asm__ ("r0");
210 + register unsigned long __sc_3 __asm__ ("r3");
211 + register unsigned long __sc_4 __asm__ ("r4");
212 + register unsigned long __sc_5 __asm__ ("r5");
213 + register unsigned long __sc_6 __asm__ ("r6");
214 + register unsigned long __sc_7 __asm__ ("r7");
215 + register unsigned long __sc_8 __asm__ ("r8");
216 +
217 + __sc_3 = (unsigned long) (start);
218 + __sc_4 = (unsigned long) (length);
219 + __sc_5 = (unsigned long) (prot);
220 + __sc_6 = (unsigned long) (flags);
221 + __sc_7 = (unsigned long) (fd);
222 + __sc_8 = (unsigned long) (offset);
223 + __sc_0 = __NR_mmap;
224 + __asm__ __volatile__
225 + ("sc \n\t"
226 + "mfcr %1 "
227 + : "=&r" (__sc_3), "=&r" (__sc_0)
228 + : "0" (__sc_3), "1" (__sc_0),
229 + "r" (__sc_4),
230 + "r" (__sc_5),
231 + "r" (__sc_6),
232 + "r" (__sc_7),
233 + "r" (__sc_8)
234 + : "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12");
235 + __sc_ret = __sc_3;
236 + __sc_err = __sc_0;
237 + }
238 + return (__sc_err & 0x10000000 ? errno = __sc_ret, __sc_ret = -1 : 0),
239 + (int) __sc_ret;
240 +}
241 diff -NurpP dietlibc-0.30_pre20060501.orig/powerpc/setjmp.S dietlibc-0.30_pre20060501-ppc-rename/powerpc/setjmp.S
242 --- dietlibc-0.30_pre20060501.orig/powerpc/setjmp.S 1970-01-01 01:00:00.000000000 +0100
243 +++ dietlibc-0.30_pre20060501-ppc-rename/powerpc/setjmp.S 2001-01-09 18:57:44.000000000 +0100
244 @@ -0,0 +1,56 @@
245 +#include <setjmp.h>
246 +
247 +#ifdef PIC
248 +#define JUMPTARGET(name) name##@plt
249 +#else
250 +#define JUMPTARGET(name) name
251 +#endif
252 +
253 +.global __sigsetjmp
254 +.type __sigsetjmp,@function
255 +.align 2
256 +__sigsetjmp:
257 + stw 1,(JB_GPR1*4)(3)
258 + mflr 0
259 + stw 2,(JB_GPR2*4)(3)
260 + stw 14,((JB_GPRS+0)*4)(3)
261 + stfd 14,((JB_FPRS+0*2)*4)(3)
262 + stw 0,(JB_LR*4)(3)
263 + stw 15,((JB_GPRS+1)*4)(3)
264 + stfd 15,((JB_FPRS+1*2)*4)(3)
265 + mfcr 0
266 + stw 16,((JB_GPRS+2)*4)(3)
267 + stfd 16,((JB_FPRS+2*2)*4)(3)
268 + stw 0,(JB_CR*4)(3)
269 + stw 17,((JB_GPRS+3)*4)(3)
270 + stfd 17,((JB_FPRS+3*2)*4)(3)
271 + stw 18,((JB_GPRS+4)*4)(3)
272 + stfd 18,((JB_FPRS+4*2)*4)(3)
273 + stw 19,((JB_GPRS+5)*4)(3)
274 + stfd 19,((JB_FPRS+5*2)*4)(3)
275 + stw 20,((JB_GPRS+6)*4)(3)
276 + stfd 20,((JB_FPRS+6*2)*4)(3)
277 + stw 21,((JB_GPRS+7)*4)(3)
278 + stfd 21,((JB_FPRS+7*2)*4)(3)
279 + stw 22,((JB_GPRS+8)*4)(3)
280 + stfd 22,((JB_FPRS+8*2)*4)(3)
281 + stw 23,((JB_GPRS+9)*4)(3)
282 + stfd 23,((JB_FPRS+9*2)*4)(3)
283 + stw 24,((JB_GPRS+10)*4)(3)
284 + stfd 24,((JB_FPRS+10*2)*4)(3)
285 + stw 25,((JB_GPRS+11)*4)(3)
286 + stfd 25,((JB_FPRS+11*2)*4)(3)
287 + stw 26,((JB_GPRS+12)*4)(3)
288 + stfd 26,((JB_FPRS+12*2)*4)(3)
289 + stw 27,((JB_GPRS+13)*4)(3)
290 + stfd 27,((JB_FPRS+13*2)*4)(3)
291 + stw 28,((JB_GPRS+14)*4)(3)
292 + stfd 28,((JB_FPRS+14*2)*4)(3)
293 + stw 29,((JB_GPRS+15)*4)(3)
294 + stfd 29,((JB_FPRS+15*2)*4)(3)
295 + stw 30,((JB_GPRS+16)*4)(3)
296 + stfd 30,((JB_FPRS+16*2)*4)(3)
297 + stw 31,((JB_GPRS+17)*4)(3)
298 + stfd 31,((JB_FPRS+17*2)*4)(3)
299 + b JUMPTARGET (__sigjmp_save)
300 +.size __sigsetjmp,.-__sigsetjmp
301 diff -NurpP dietlibc-0.30_pre20060501.orig/powerpc/start.S dietlibc-0.30_pre20060501-ppc-rename/powerpc/start.S
302 --- dietlibc-0.30_pre20060501.orig/powerpc/start.S 1970-01-01 01:00:00.000000000 +0100
303 +++ dietlibc-0.30_pre20060501-ppc-rename/powerpc/start.S 2006-04-04 07:35:14.000000000 +0200
304 @@ -0,0 +1,52 @@
305 +#include "dietfeatures.h"
306 +
307 +.text
308 +.global _start
309 +.type _start,@function
310 +_start:
311 + /* Save the stack pointer, in case we're statically linked under Linux. */
312 + mr 9,1
313 + /* Set up an initial stack frame, and clear the LR. */
314 + clrrwi 1,1,4
315 + li 0,0
316 + stwu 1,-16(1)
317 + mtlr 0
318 + stw 0,0(1)
319 +
320 + /* r9 contains the initial stack pointer
321 + argc = (r9)
322 + argv = (r9+4)
323 + envp = argv+(argc+1)*4 */
324 +
325 + lis 14,__libc_stack_end@ha
326 + stw 9,__libc_stack_end@l(14)
327 +
328 + lwzu 3,0(9) /* argc */
329 + addi 4,9,4 /* argv */
330 + add 5,0,3 /* argc... */
331 + addi 5,5,1 /* argc+1...*/
332 + slwi 5,5,2 /* (argc+1)*4 */
333 + add 5,5,4 /* argv+(argc+1)*4 */
334 +
335 + lis 14,environ@ha
336 + stw 5,environ@l(14)
337 +
338 +#ifdef WANT_DYNAMIC
339 + mr 6,7
340 + bl _dyn_start
341 +#else
342 + bl CALL_IN_STARTCODE
343 +#endif
344 + b exit
345 +.size _start,.-_start
346 +
347 +
348 +/* Define a symbol for the first piece of initialized data. */
349 + .section ".data"
350 +__data_start:
351 +
352 +/* this is needed for libgcc_eh.a - see gcc-3.4/gcc/config/rs6000/linux-unwind.h */
353 + .weak __libc_stack_end
354 + .lcomm __libc_stack_end,4,4
355 + .type __libc_stack_end,@object
356 +
357 diff -NurpP dietlibc-0.30_pre20060501.orig/powerpc/syscalls.h dietlibc-0.30_pre20060501-ppc-rename/powerpc/syscalls.h
358 --- dietlibc-0.30_pre20060501.orig/powerpc/syscalls.h 1970-01-01 01:00:00.000000000 +0100
359 +++ dietlibc-0.30_pre20060501-ppc-rename/powerpc/syscalls.h 2005-09-21 09:33:08.000000000 +0200
360 @@ -0,0 +1,299 @@
361 +
362 +#define __NR_exit 1
363 +#define __NR_fork 2
364 +#define __NR_read 3
365 +#define __NR_write 4
366 +#define __NR_open 5
367 +#define __NR_close 6
368 +#define __NR_waitpid 7
369 +#define __NR_creat 8
370 +#define __NR_link 9
371 +#define __NR_unlink 10
372 +#define __NR_execve 11
373 +#define __NR_chdir 12
374 +#define __NR_time 13
375 +#define __NR_mknod 14
376 +#define __NR_chmod 15
377 +#define __NR_lchown 16
378 +#define __NR_break 17
379 +#define __NR_oldstat 18
380 +#define __NR_lseek 19
381 +#define __NR_getpid 20
382 +#define __NR_mount 21
383 +#define __NR_umount 22
384 +#define __NR_setuid 23
385 +#define __NR_getuid 24
386 +#define __NR_stime 25
387 +#define __NR_ptrace 26
388 +#define __NR_alarm 27
389 +#define __NR_oldfstat 28
390 +#define __NR_pause 29
391 +#define __NR_utime 30
392 +#define __NR_stty 31
393 +#define __NR_gtty 32
394 +#define __NR_access 33
395 +#define __NR_nice 34
396 +#define __NR_ftime 35
397 +#define __NR_sync 36
398 +#define __NR_kill 37
399 +#define __NR_rename 38
400 +#define __NR_mkdir 39
401 +#define __NR_rmdir 40
402 +#define __NR_dup 41
403 +#define __NR_pipe 42
404 +#define __NR_times 43
405 +#define __NR_prof 44
406 +#define __NR_brk 45
407 +#define __NR_setgid 46
408 +#define __NR_getgid 47
409 +#define __NR_signal 48
410 +#define __NR_geteuid 49
411 +#define __NR_getegid 50
412 +#define __NR_acct 51
413 +#define __NR_umount2 52
414 +#define __NR_lock 53
415 +#define __NR_ioctl 54
416 +#define __NR_fcntl 55
417 +#define __NR_mpx 56
418 +#define __NR_setpgid 57
419 +#define __NR_ulimit 58
420 +#define __NR_oldolduname 59
421 +#define __NR_umask 60
422 +#define __NR_chroot 61
423 +#define __NR_ustat 62
424 +#define __NR_dup2 63
425 +#define __NR_getppid 64
426 +#define __NR_getpgrp 65
427 +#define __NR_setsid 66
428 +#define __NR_sigaction 67
429 +#define __NR_sgetmask 68
430 +#define __NR_ssetmask 69
431 +#define __NR_setreuid 70
432 +#define __NR_setregid 71
433 +#define __NR_sigsuspend 72
434 +#define __NR_sigpending 73
435 +#define __NR_sethostname 74
436 +#define __NR_setrlimit 75
437 +#define __NR_getrlimit 76
438 +#define __NR_getrusage 77
439 +#define __NR_gettimeofday 78
440 +#define __NR_settimeofday 79
441 +#define __NR_getgroups 80
442 +#define __NR_setgroups 81
443 +#define __NR_select 82
444 +#define __NR_symlink 83
445 +#define __NR_oldlstat 84
446 +#define __NR_readlink 85
447 +#define __NR_uselib 86
448 +#define __NR_swapon 87
449 +#define __NR_reboot 88
450 +#define __NR_readdir 89
451 +#define __NR_mmap 90
452 +#define __NR_munmap 91
453 +#define __NR_truncate 92
454 +#define __NR_ftruncate 93
455 +#define __NR_fchmod 94
456 +#define __NR_fchown 95
457 +#define __NR_getpriority 96
458 +#define __NR_setpriority 97
459 +#define __NR_profil 98
460 +#define __NR_statfs 99
461 +#define __NR_fstatfs 100
462 +#define __NR_ioperm 101
463 +#define __NR_socketcall 102
464 +#define __NR_syslog 103
465 +#define __NR_setitimer 104
466 +#define __NR_getitimer 105
467 +#define __NR_stat 106
468 +#define __NR_lstat 107
469 +#define __NR_fstat 108
470 +#define __NR_olduname 109
471 +#define __NR_iopl 110
472 +#define __NR_vhangup 111
473 +#define __NR_idle 112
474 +#define __NR_vm86 113
475 +#define __NR_wait4 114
476 +#define __NR_swapoff 115
477 +#define __NR_sysinfo 116
478 +#define __NR_ipc 117
479 +#define __NR_fsync 118
480 +#define __NR_sigreturn 119
481 +#define __NR_clone 120
482 +#define __NR_setdomainname 121
483 +#define __NR_uname 122
484 +#define __NR_modify_ldt 123
485 +#define __NR_adjtimex 124
486 +#define __NR_mprotect 125
487 +#define __NR_sigprocmask 126
488 +#define __NR_create_module 127
489 +#define __NR_init_module 128
490 +#define __NR_delete_module 129
491 +#define __NR_get_kernel_syms 130
492 +#define __NR_quotactl 131
493 +#define __NR_getpgid 132
494 +#define __NR_fchdir 133
495 +#define __NR_bdflush 134
496 +#define __NR_sysfs 135
497 +#define __NR_personality 136
498 +#define __NR_afs_syscall 137 /* Syscall for Andrew File System */
499 +#define __NR_setfsuid 138
500 +#define __NR_setfsgid 139
501 +#define __NR__llseek 140
502 +#define __NR_getdents 141
503 +#define __NR__newselect 142
504 +#define __NR_flock 143
505 +#define __NR_msync 144
506 +#define __NR_readv 145
507 +#define __NR_writev 146
508 +#define __NR_getsid 147
509 +#define __NR_fdatasync 148
510 +#define __NR__sysctl 149
511 +#define __NR_mlock 150
512 +#define __NR_munlock 151
513 +#define __NR_mlockall 152
514 +#define __NR_munlockall 153
515 +#define __NR_sched_setparam 154
516 +#define __NR_sched_getparam 155
517 +#define __NR_sched_setscheduler 156
518 +#define __NR_sched_getscheduler 157
519 +#define __NR_sched_yield 158
520 +#define __NR_sched_get_priority_max 159
521 +#define __NR_sched_get_priority_min 160
522 +#define __NR_sched_rr_get_interval 161
523 +#define __NR_nanosleep 162
524 +#define __NR_mremap 163
525 +#define __NR_setresuid 164
526 +#define __NR_getresuid 165
527 +#define __NR_query_module 166
528 +#define __NR_poll 167
529 +#define __NR_nfsservctl 168
530 +#define __NR_setresgid 169
531 +#define __NR_getresgid 170
532 +#define __NR_prctl 171
533 +#define __NR_rt_sigreturn 172
534 +#define __NR_rt_sigaction 173
535 +#define __NR_rt_sigprocmask 174
536 +#define __NR_rt_sigpending 175
537 +#define __NR_rt_sigtimedwait 176
538 +#define __NR_rt_sigqueueinfo 177
539 +#define __NR_rt_sigsuspend 178
540 +#define __NR_pread 179
541 +#define __NR_pwrite 180
542 +#define __NR_chown 181
543 +#define __NR_getcwd 182
544 +#define __NR_capget 183
545 +#define __NR_capset 184
546 +#define __NR_sigaltstack 185
547 +#define __NR_sendfile 186
548 +#define __NR_getpmsg 187 /* some people actually want streams */
549 +#define __NR_putpmsg 188 /* some people actually want streams */
550 +#define __NR_vfork 189
551 +#define __NR_ugetrlimit 190 /* SuS compliant getrlimit */
552 +#define __NR_readahead 191
553 +#define __NR_mmap2 192
554 +#define __NR_truncate64 193
555 +#define __NR_ftruncate64 194
556 +#define __NR_stat64 195
557 +#define __NR_lstat64 196
558 +#define __NR_fstat64 197
559 +#define __NR_pciconfig_read 198
560 +#define __NR_pciconfig_write 199
561 +#define __NR_pciconfig_iobase 200
562 +#define __NR_multiplexer 201
563 +#define __NR_getdents64 202
564 +#define __NR_pivot_root 203
565 +#define __NR_fcntl64 204
566 +#define __NR_madvise 205
567 +#define __NR_mincore 206
568 +#define __NR_gettid 207
569 +#define __NR_tkill 208
570 +#define __NR_setxattr 209
571 +#define __NR_lsetxattr 210
572 +#define __NR_fsetxattr 211
573 +#define __NR_getxattr 212
574 +#define __NR_lgetxattr 213
575 +#define __NR_fgetxattr 214
576 +#define __NR_listxattr 215
577 +#define __NR_llistxattr 216
578 +#define __NR_flistxattr 217
579 +#define __NR_removexattr 218
580 +#define __NR_lremovexattr 219
581 +#define __NR_fremovexattr 220
582 +#define __NR_futex 221
583 +#define __NR_sched_setaffinity 222
584 +#define __NR_sched_getaffinity 223
585 +/* 224 currently unused */
586 +#define __NR_tuxcall 225
587 +#define __NR_sendfile64 226
588 +#define __NR_io_setup 227
589 +#define __NR_io_destroy 228
590 +#define __NR_io_getevents 229
591 +#define __NR_io_submit 230
592 +#define __NR_io_cancel 231
593 +#define __NR_set_tid_address 232
594 +#define __NR_fadvise64 233
595 +#define __NR_exit_group 234
596 +#define __NR_lookup_dcookie 235
597 +#define __NR_epoll_create 236
598 +#define __NR_epoll_ctl 237
599 +#define __NR_epoll_wait 238
600 +#define __NR_remap_file_pages 239
601 +#define __NR_timer_create 240
602 +#define __NR_timer_settime 241
603 +#define __NR_timer_gettime 242
604 +#define __NR_timer_getoverrun 243
605 +#define __NR_timer_delete 244
606 +#define __NR_clock_settime 245
607 +#define __NR_clock_gettime 246
608 +#define __NR_clock_getres 247
609 +#define __NR_clock_nanosleep 248
610 +#define __NR_swapcontext 249
611 +#define __NR_tgkill 250
612 +#define __NR_utimes 251
613 +#define __NR_statfs64 252
614 +#define __NR_fstatfs64 253
615 +#define __NR_fadvise64_64 254
616 +#define __NR_rtas 255
617 +#define __NR_sys_debug_setcontext 256
618 +/* Number 257 is reserved for vserver */
619 +/* Number 258 is reserved for new sys_remap_file_pages */
620 +/* Number 259 is reserved for new sys_mbind */
621 +/* Number 260 is reserved for new sys_get_mempolicy */
622 +/* Number 261 is reserved for new sys_set_mempolicy */
623 +#define __NR_mq_open 262
624 +#define __NR_mq_unlink 263
625 +#define __NR_mq_timedsend 264
626 +#define __NR_mq_timedreceive 265
627 +#define __NR_mq_notify 266
628 +#define __NR_mq_getsetattr 267
629 +#define __NR_kexec_load 268
630 +#define __NR_add_key 269
631 +#define __NR_request_key 270
632 +#define __NR_keyctl 271
633 +#define __NR_waitid 272
634 +#define __NR_ioprio_set 273
635 +#define __NR_ioprio_get 274
636 +#define __NR_inotify_init 275
637 +#define __NR_inotify_add_watch 276
638 +#define __NR_inotify_rm_watch 277
639 +
640 +
641 +#define syscall_weak(name,wsym,sym) \
642 +.text; \
643 +.type wsym,@function; \
644 +.weak wsym; \
645 +wsym: ; \
646 +.type sym,@function; \
647 +.global sym; \
648 +sym: \
649 + li 0,__NR_##name; \
650 + b __unified_syscall
651 +
652 +#define syscall(name,sym) \
653 +.text; \
654 +.type sym,@function; \
655 +.global sym; \
656 +sym: \
657 + li 0,__NR_##name; \
658 + b __unified_syscall
659 +
660 diff -NurpP dietlibc-0.30_pre20060501.orig/powerpc/__testandset.S dietlibc-0.30_pre20060501-ppc-rename/powerpc/__testandset.S
661 --- dietlibc-0.30_pre20060501.orig/powerpc/__testandset.S 1970-01-01 01:00:00.000000000 +0100
662 +++ dietlibc-0.30_pre20060501-ppc-rename/powerpc/__testandset.S 2002-09-16 13:17:01.000000000 +0200
663 @@ -0,0 +1,12 @@
664 +.global __testandset
665 +.type __testandset,@function
666 +.align 2
667 +__testandset:
668 +1: lwarx 5,0,3
669 + li 0,1
670 + stwcx. 0,0,3
671 + bne- 1b
672 + mr 3,5
673 + blr
674 +.size __testandset,.-__testandset
675 +
676 diff -NurpP dietlibc-0.30_pre20060501.orig/powerpc/unified.S dietlibc-0.30_pre20060501-ppc-rename/powerpc/unified.S
677 --- dietlibc-0.30_pre20060501.orig/powerpc/unified.S 1970-01-01 01:00:00.000000000 +0100
678 +++ dietlibc-0.30_pre20060501-ppc-rename/powerpc/unified.S 2002-01-21 16:55:19.000000000 +0100
679 @@ -0,0 +1,40 @@
680 +#include <dietfeatures.h>
681 +#include "syscalls.h"
682 +
683 +.text
684 +.type exit,@function
685 +.weak exit
686 +exit:
687 +.type _exit,@function
688 +.global _exit
689 +_exit:
690 + li 0,__NR_exit
691 +.global __unified_syscall
692 +__unified_syscall:
693 + sc
694 + bnslr+
695 +
696 +.global error_unified_syscall
697 +error_unified_syscall:
698 +#ifdef WANT_THREAD_SAFE
699 + stwu 1,-16(1)
700 + mflr 0
701 + stw 0,20(1)
702 + stw 3,12(1)
703 + bl __errno_location
704 + lwz 0,12(1)
705 + stw 0,0(3)
706 + lwz 0,20(1)
707 + mtlr 0
708 + addi 1,1,16
709 +#else
710 + lis 9,errno@ha
711 + stw 3,errno@l(9)
712 +#endif
713 + li 3,-1
714 +
715 +/* here we go and "reuse" the return for weak-void functions */
716 +#include "dietuglyweaks.h"
717 +
718 + blr
719 +
720 diff -NurpP dietlibc-0.30_pre20060501.orig/powerpc64/clone.S dietlibc-0.30_pre20060501-ppc-rename/powerpc64/clone.S
721 --- dietlibc-0.30_pre20060501.orig/powerpc64/clone.S 1970-01-01 01:00:00.000000000 +0100
722 +++ dietlibc-0.30_pre20060501-ppc-rename/powerpc64/clone.S 2005-05-13 20:39:32.000000000 +0200
723 @@ -0,0 +1,52 @@
724 +#include <dietfeatures.h>
725 +#include "syscalls.h"
726 +#include <errno.h>
727 +
728 +.text
729 +.weak clone
730 +clone:
731 +.global __clone
732 +__clone:
733 + cmpwi 4,0 /* check have non null child_stack pointer */
734 + cmpwi cr1, 3,0 /* check have non null thread_funcion */
735 + cror eq,4*cr1+eq,eq /* now if eq is set one is or both are zero */
736 + beq .Lclone_error
737 +
738 + stdu 1,-64(1) /* alloc some space on the stack */
739 + std 29, 16(1) /* save r29,r30,r31 on stack */
740 + std 30, 24(1)
741 + std 31, 32(1)
742 +
743 + rlwinm 4,4,0,0,27 /* mask out lower 4 bits */
744 +
745 + /* move parameter to positions clone wants them */
746 + mr 29,3 /* r29 = r3 fn */
747 + mr 30,4 /* r30 = r4 stack */
748 + mr 31,6 /* r31 = r6 arg */
749 + mr 3, 5 /* r3 = r5 flags */
750 +
751 + li 0, __NR_clone /* load syscall nr. */
752 + sc
753 +
754 + cmpwi cr1,3,0 /* compare return of syscall with 0 */
755 + crandc 4*cr1+eq,4*cr1+eq,so
756 + bne .Lclone_parent /* return was non zero -> .Lclone_parent */
757 +
758 + /* we are the cloned process */
759 + mr 1, 30 /* set stack pointer */
760 + mtctr 29 /* set count register to fn ? */
761 + mr 3, 31 /* set argument */
762 + bctrl /* branch trough count register and link */
763 + b _exit /* exit thread */
764 +
765 +.Lclone_parent:
766 + ld 29,16(1) /* restore saved registers */
767 + ld 30,24(1)
768 + ld 31,32(1)
769 + addi 1, 1,64 /* free stack */
770 + bnslr+ /* had cloned a thread so return to parent */
771 + b error_unified_syscall
772 +
773 +.Lclone_error:
774 + li 3, EINVAL
775 + b error_unified_syscall
776 diff -NurpP dietlibc-0.30_pre20060501.orig/powerpc64/__longjmp.S dietlibc-0.30_pre20060501-ppc-rename/powerpc64/__longjmp.S
777 --- dietlibc-0.30_pre20060501.orig/powerpc64/__longjmp.S 1970-01-01 01:00:00.000000000 +0100
778 +++ dietlibc-0.30_pre20060501-ppc-rename/powerpc64/__longjmp.S 2005-09-21 09:33:08.000000000 +0200
779 @@ -0,0 +1,54 @@
780 +#include <setjmp.h>
781 +
782 + .quad .__longjmp,.TOC.@tocbase,0
783 + .text
784 + .size __longjmp,24
785 + .type .__longjmp,@function
786 + .globl .__longjmp
787 +.align 2
788 +.__longjmp:
789 + ld 1,(JB_GPR1*8)(3)
790 + ld 2,(JB_GPR2*8)(3)
791 + ld 0,(JB_LR*8)(3)
792 + ld 14,((JB_GPRS+0)*8)(3)
793 + lfd 14,((JB_FPRS+0)*8)(3)
794 + ld 15,((JB_GPRS+1)*8)(3)
795 + lfd 15,((JB_FPRS+1)*8)(3)
796 + ld 16,((JB_GPRS+2)*8)(3)
797 + lfd 16,((JB_FPRS+2)*8)(3)
798 + ld 17,((JB_GPRS+3)*8)(3)
799 + lfd 17,((JB_FPRS+3)*8)(3)
800 + ld 18,((JB_GPRS+4)*8)(3)
801 + lfd 18,((JB_FPRS+4)*8)(3)
802 + ld 19,((JB_GPRS+5)*8)(3)
803 + lfd 19,((JB_FPRS+5)*8)(3)
804 + ld 20,((JB_GPRS+6)*8)(3)
805 + lfd 20,((JB_FPRS+6)*8)(3)
806 + mtlr 0
807 + ld 21,((JB_GPRS+7)*8)(3)
808 + lfd 21,((JB_FPRS+7)*8)(3)
809 + ld 22,((JB_GPRS+8)*8)(3)
810 + lfd 22,((JB_FPRS+8)*8)(3)
811 + ld 0,(JB_CR*8)(3)
812 + ld 23,((JB_GPRS+9)*8)(3)
813 + lfd 23,((JB_FPRS+9)*8)(3)
814 + ld 24,((JB_GPRS+10)*8)(3)
815 + lfd 24,((JB_FPRS+10)*8)(3)
816 + ld 25,((JB_GPRS+11)*8)(3)
817 + lfd 25,((JB_FPRS+11)*8)(3)
818 + mtcrf 0xFF,0
819 + ld 26,((JB_GPRS+12)*8)(3)
820 + lfd 26,((JB_FPRS+12)*8)(3)
821 + ld 27,((JB_GPRS+13)*8)(3)
822 + lfd 27,((JB_FPRS+13)*8)(3)
823 + ld 28,((JB_GPRS+14)*8)(3)
824 + lfd 28,((JB_FPRS+14)*8)(3)
825 + ld 29,((JB_GPRS+15)*8)(3)
826 + lfd 29,((JB_FPRS+15)*8)(3)
827 + ld 30,((JB_GPRS+16)*8)(3)
828 + lfd 30,((JB_FPRS+16)*8)(3)
829 + ld 31,((JB_GPRS+17)*8)(3)
830 + lfd 31,((JB_FPRS+17)*8)(3)
831 + mr 3,4
832 + blr
833 +.size .__longjmp,.-.__longjmp
834 diff -NurpP dietlibc-0.30_pre20060501.orig/powerpc64/Makefile.add dietlibc-0.30_pre20060501-ppc-rename/powerpc64/Makefile.add
835 --- dietlibc-0.30_pre20060501.orig/powerpc64/Makefile.add 1970-01-01 01:00:00.000000000 +0100
836 +++ dietlibc-0.30_pre20060501-ppc-rename/powerpc64/Makefile.add 2003-10-10 15:37:34.000000000 +0200
837 @@ -0,0 +1,3 @@
838 +
839 +CFLAGS+=-Os -mpowerpc64
840 +VPATH:=ppc64:syscalls.s:$(VPATH)
841 diff -NurpP dietlibc-0.30_pre20060501.orig/powerpc64/setjmp.S dietlibc-0.30_pre20060501-ppc-rename/powerpc64/setjmp.S
842 --- dietlibc-0.30_pre20060501.orig/powerpc64/setjmp.S 1970-01-01 01:00:00.000000000 +0100
843 +++ dietlibc-0.30_pre20060501-ppc-rename/powerpc64/setjmp.S 2005-09-21 09:33:08.000000000 +0200
844 @@ -0,0 +1,59 @@
845 +#include <setjmp.h>
846 +
847 +#ifdef PIC
848 +#define JUMPTARGET(name) name##@plt
849 +#else
850 +#define JUMPTARGET(name) .name
851 +#endif
852 +
853 + .quad .__sigsetjmp,.TOC.@tocbase,0
854 + .text
855 + .size __sigsetjmp,24
856 + .type .__sigsetjmp,@function
857 + .globl .__sigsetjmp
858 +.align 2
859 +.__sigsetjmp:
860 + std 1,(JB_GPR1*8)(3)
861 + mflr 0
862 + std 2,(JB_GPR2*8)(3)
863 + std 14,((JB_GPRS+0)*8)(3)
864 + stfd 14,((JB_FPRS+0)*8)(3)
865 + std 0,(JB_LR*8)(3)
866 + std 15,((JB_GPRS+1)*8)(3)
867 + stfd 15,((JB_FPRS+1)*8)(3)
868 + mfcr 0
869 + std 16,((JB_GPRS+2)*8)(3)
870 + stfd 16,((JB_FPRS+2)*8)(3)
871 + std 0,(JB_CR*8)(3)
872 + std 17,((JB_GPRS+3)*8)(3)
873 + stfd 17,((JB_FPRS+3)*8)(3)
874 + std 18,((JB_GPRS+4)*8)(3)
875 + stfd 18,((JB_FPRS+4)*8)(3)
876 + std 19,((JB_GPRS+5)*8)(3)
877 + stfd 19,((JB_FPRS+5)*8)(3)
878 + std 20,((JB_GPRS+6)*8)(3)
879 + stfd 20,((JB_FPRS+6)*8)(3)
880 + std 21,((JB_GPRS+7)*8)(3)
881 + stfd 21,((JB_FPRS+7)*8)(3)
882 + std 22,((JB_GPRS+8)*8)(3)
883 + stfd 22,((JB_FPRS+8)*8)(3)
884 + std 23,((JB_GPRS+9)*8)(3)
885 + stfd 23,((JB_FPRS+9)*8)(3)
886 + std 24,((JB_GPRS+10)*8)(3)
887 + stfd 24,((JB_FPRS+10)*8)(3)
888 + std 25,((JB_GPRS+11)*8)(3)
889 + stfd 25,((JB_FPRS+11)*8)(3)
890 + std 26,((JB_GPRS+12)*8)(3)
891 + stfd 26,((JB_FPRS+12)*8)(3)
892 + std 27,((JB_GPRS+13)*8)(3)
893 + stfd 27,((JB_FPRS+13)*8)(3)
894 + std 28,((JB_GPRS+14)*8)(3)
895 + stfd 28,((JB_FPRS+14)*8)(3)
896 + std 29,((JB_GPRS+15)*8)(3)
897 + stfd 29,((JB_FPRS+15)*8)(3)
898 + std 30,((JB_GPRS+16)*8)(3)
899 + stfd 30,((JB_FPRS+16)*8)(3)
900 + std 31,((JB_GPRS+17)*8)(3)
901 + stfd 31,((JB_FPRS+17)*8)(3)
902 + b JUMPTARGET (__sigjmp_save)
903 +.size .__sigsetjmp,.-.__sigsetjmp
904 diff -NurpP dietlibc-0.30_pre20060501.orig/powerpc64/start.S dietlibc-0.30_pre20060501-ppc-rename/powerpc64/start.S
905 --- dietlibc-0.30_pre20060501.orig/powerpc64/start.S 1970-01-01 01:00:00.000000000 +0100
906 +++ dietlibc-0.30_pre20060501-ppc-rename/powerpc64/start.S 2006-04-04 07:35:14.000000000 +0200
907 @@ -0,0 +1,91 @@
908 +#include "dietfeatures.h"
909 +
910 + .section ".text"
911 + .align 2
912 + .globl ._start
913 + .type ._start,@function
914 + .globl _start
915 + .section ".opd","aw"
916 +_start:
917 + .quad ._start
918 + .quad .TOC.@tocbase, 0
919 + .previous
920 +._start:
921 +
922 +/*
923 + .section ".text"
924 + .align 2
925 + .globl ._start
926 + .type ._start,@function
927 + .globl _start
928 + .section ".opd","aw"
929 +_start:
930 + .quad ._start
931 + .quad .TOC.@tocbase, 0
932 + .previous
933 +._start:
934 +*/
935 + /* Save the stack pointer, in case we're statically linked under Linux. */
936 + mr 9,1
937 + /* Set up an initial stack frame, and clear the LR. */
938 + clrrdi 1,1,4
939 + li 0,0
940 + stdu 1,-128(1)
941 + mtlr 0
942 + std 0,0(1)
943 +
944 + /* r9 contains the initial stack pointer
945 + argc = (r9)
946 + argv = (r9+4)
947 + envp = argv+(argc+1)*4 */
948 +
949 + lis 14,__libc_stack_end@highesta
950 + ori 14,14,__libc_stack_end@highera
951 + sldi 14,14,32
952 + oris 14,14,__libc_stack_end@ha
953 + std 9,__libc_stack_end@l(14)
954 +
955 + ldu 3,0(9) /* argc */
956 + addi 4,9,8 /* argv */
957 + add 5,0,3 /* argc... */
958 + addi 5,5,1 /* argc+1...*/
959 + slwi 5,5,3 /* (argc+1)*8 */
960 + add 5,5,4 /* argv+(argc+1)*8 */
961 +
962 + lis 14,environ@highesta
963 + ori 14,14,environ@highera
964 + sldi 14,14,32
965 + oris 14,14,environ@ha
966 + std 5,environ@l(14)
967 +
968 +#ifdef WANT_DYNAMIC
969 +/* #warning dynamic */
970 + mr 6,7
971 + bl ._dyn_start
972 +#else
973 +/* #warning static */
974 +#define DOTIFY(name) .##name
975 + bl DOTIFY(CALL_IN_STARTCODE)
976 +#endif
977 + b .exit
978 +
979 +.LT_start:
980 + .long 0
981 + .quad 0x000c000000000000 | 0x0000200000000000 | 0x0000004000000000
982 + .long .LT_start-._start
983 + .short .LT_start_name_end-.LT_start_name_start
984 +.LT_start_name_start:
985 + .ascii "_start"
986 +.LT_start_name_end:
987 + .align 2
988 + .size _start,.-_start
989 +
990 +/* Define a symbol for the first piece of initialized data. */
991 + .section ".data"
992 +__data_start:
993 +
994 +/* this is needed for libgcc_eh.a - see gcc-3.4/gcc/config/rs6000/linux-unwind.h */
995 + .weak __libc_stack_end
996 + .lcomm __libc_stack_end,8,8
997 + .type __libc_stack_end,@object
998 +
999 diff -NurpP dietlibc-0.30_pre20060501.orig/powerpc64/syscalls.h dietlibc-0.30_pre20060501-ppc-rename/powerpc64/syscalls.h
1000 --- dietlibc-0.30_pre20060501.orig/powerpc64/syscalls.h 1970-01-01 01:00:00.000000000 +0100
1001 +++ dietlibc-0.30_pre20060501-ppc-rename/powerpc64/syscalls.h 2005-09-21 09:33:08.000000000 +0200
1002 @@ -0,0 +1,317 @@
1003 +
1004 +#define __NR_exit 1
1005 +#define __NR_fork 2
1006 +#define __NR_read 3
1007 +#define __NR_write 4
1008 +#define __NR_open 5
1009 +#define __NR_close 6
1010 +#define __NR_waitpid 7
1011 +#define __NR_creat 8
1012 +#define __NR_link 9
1013 +#define __NR_unlink 10
1014 +#define __NR_execve 11
1015 +#define __NR_chdir 12
1016 +#define __NR_time 13
1017 +#define __NR_mknod 14
1018 +#define __NR_chmod 15
1019 +#define __NR_lchown 16
1020 +#define __NR_break 17
1021 +#define __NR_oldstat 18
1022 +#define __NR_lseek 19
1023 +#define __NR_getpid 20
1024 +#define __NR_mount 21
1025 +#define __NR_umount 22
1026 +#define __NR_setuid 23
1027 +#define __NR_getuid 24
1028 +#define __NR_stime 25
1029 +#define __NR_ptrace 26
1030 +#define __NR_alarm 27
1031 +#define __NR_oldfstat 28
1032 +#define __NR_pause 29
1033 +#define __NR_utime 30
1034 +#define __NR_stty 31
1035 +#define __NR_gtty 32
1036 +#define __NR_access 33
1037 +#define __NR_nice 34
1038 +#define __NR_ftime 35
1039 +#define __NR_sync 36
1040 +#define __NR_kill 37
1041 +#define __NR_rename 38
1042 +#define __NR_mkdir 39
1043 +#define __NR_rmdir 40
1044 +#define __NR_dup 41
1045 +#define __NR_pipe 42
1046 +#define __NR_times 43
1047 +#define __NR_prof 44
1048 +#define __NR_brk 45
1049 +#define __NR_setgid 46
1050 +#define __NR_getgid 47
1051 +#define __NR_signal 48
1052 +#define __NR_geteuid 49
1053 +#define __NR_getegid 50
1054 +#define __NR_acct 51
1055 +#define __NR_umount2 52
1056 +#define __NR_lock 53
1057 +#define __NR_ioctl 54
1058 +#define __NR_fcntl 55
1059 +#define __NR_mpx 56
1060 +#define __NR_setpgid 57
1061 +#define __NR_ulimit 58
1062 +#define __NR_oldolduname 59
1063 +#define __NR_umask 60
1064 +#define __NR_chroot 61
1065 +#define __NR_ustat 62
1066 +#define __NR_dup2 63
1067 +#define __NR_getppid 64
1068 +#define __NR_getpgrp 65
1069 +#define __NR_setsid 66
1070 +#define __NR_sigaction 67
1071 +#define __NR_sgetmask 68
1072 +#define __NR_ssetmask 69
1073 +#define __NR_setreuid 70
1074 +#define __NR_setregid 71
1075 +#define __NR_sigsuspend 72
1076 +#define __NR_sigpending 73
1077 +#define __NR_sethostname 74
1078 +#define __NR_setrlimit 75
1079 +#define __NR_getrlimit 76
1080 +#define __NR_getrusage 77
1081 +#define __NR_gettimeofday 78
1082 +#define __NR_settimeofday 79
1083 +#define __NR_getgroups 80
1084 +#define __NR_setgroups 81
1085 +#define __NR_select 82
1086 +#define __NR_symlink 83
1087 +#define __NR_oldlstat 84
1088 +#define __NR_readlink 85
1089 +#define __NR_uselib 86
1090 +#define __NR_swapon 87
1091 +#define __NR_reboot 88
1092 +#define __NR_readdir 89
1093 +#define __NR_mmap 90
1094 +#define __NR_munmap 91
1095 +#define __NR_truncate 92
1096 +#define __NR_ftruncate 93
1097 +#define __NR_fchmod 94
1098 +#define __NR_fchown 95
1099 +#define __NR_getpriority 96
1100 +#define __NR_setpriority 97
1101 +#define __NR_profil 98
1102 +#define __NR_statfs 99
1103 +#define __NR_fstatfs 100
1104 +#define __NR_ioperm 101
1105 +#define __NR_socketcall 102
1106 +#define __NR_syslog 103
1107 +#define __NR_setitimer 104
1108 +#define __NR_getitimer 105
1109 +#define __NR_stat 106
1110 +#define __NR_lstat 107
1111 +#define __NR_fstat 108
1112 +#define __NR_olduname 109
1113 +#define __NR_iopl 110
1114 +#define __NR_vhangup 111
1115 +#define __NR_idle 112
1116 +#define __NR_vm86 113
1117 +#define __NR_wait4 114
1118 +#define __NR_swapoff 115
1119 +#define __NR_sysinfo 116
1120 +#define __NR_ipc 117
1121 +#define __NR_fsync 118
1122 +#define __NR_sigreturn 119
1123 +#define __NR_clone 120
1124 +#define __NR_setdomainname 121
1125 +#define __NR_uname 122
1126 +#define __NR_modify_ldt 123
1127 +#define __NR_adjtimex 124
1128 +#define __NR_mprotect 125
1129 +#define __NR_sigprocmask 126
1130 +#define __NR_create_module 127
1131 +#define __NR_init_module 128
1132 +#define __NR_delete_module 129
1133 +#define __NR_get_kernel_syms 130
1134 +#define __NR_quotactl 131
1135 +#define __NR_getpgid 132
1136 +#define __NR_fchdir 133
1137 +#define __NR_bdflush 134
1138 +#define __NR_sysfs 135
1139 +#define __NR_personality 136
1140 +#define __NR_afs_syscall 137 /* Syscall for Andrew File System */
1141 +#define __NR_setfsuid 138
1142 +#define __NR_setfsgid 139
1143 +#define __NR__llseek 140
1144 +#define __NR_getdents 141
1145 +#define __NR__newselect 142
1146 +#define __NR_flock 143
1147 +#define __NR_msync 144
1148 +#define __NR_readv 145
1149 +#define __NR_writev 146
1150 +#define __NR_getsid 147
1151 +#define __NR_fdatasync 148
1152 +#define __NR__sysctl 149
1153 +#define __NR_mlock 150
1154 +#define __NR_munlock 151
1155 +#define __NR_mlockall 152
1156 +#define __NR_munlockall 153
1157 +#define __NR_sched_setparam 154
1158 +#define __NR_sched_getparam 155
1159 +#define __NR_sched_setscheduler 156
1160 +#define __NR_sched_getscheduler 157
1161 +#define __NR_sched_yield 158
1162 +#define __NR_sched_get_priority_max 159
1163 +#define __NR_sched_get_priority_min 160
1164 +#define __NR_sched_rr_get_interval 161
1165 +#define __NR_nanosleep 162
1166 +#define __NR_mremap 163
1167 +#define __NR_setresuid 164
1168 +#define __NR_getresuid 165
1169 +#define __NR_query_module 166
1170 +#define __NR_poll 167
1171 +#define __NR_nfsservctl 168
1172 +#define __NR_setresgid 169
1173 +#define __NR_getresgid 170
1174 +#define __NR_prctl 171
1175 +#define __NR_rt_sigreturn 172
1176 +#define __NR_rt_sigaction 173
1177 +#define __NR_rt_sigprocmask 174
1178 +#define __NR_rt_sigpending 175
1179 +#define __NR_rt_sigtimedwait 176
1180 +#define __NR_rt_sigqueueinfo 177
1181 +#define __NR_rt_sigsuspend 178
1182 +#define __NR_pread 179
1183 +#define __NR_pwrite 180
1184 +#define __NR_chown 181
1185 +#define __NR_getcwd 182
1186 +#define __NR_capget 183
1187 +#define __NR_capset 184
1188 +#define __NR_sigaltstack 185
1189 +#define __NR_sendfile 186
1190 +#define __NR_getpmsg 187 /* some people actually want streams */
1191 +#define __NR_putpmsg 188 /* some people actually want streams */
1192 +#define __NR_vfork 189
1193 +#define __NR_ugetrlimit 190 /* SuS compliant getrlimit */
1194 +#define __NR_readahead 191
1195 +/* #define __NR_mmap2 192 32bit only */
1196 +/* #define __NR_truncate64 193 32bit only */
1197 +/* #define __NR_ftruncate64 194 32bit only */
1198 +/* #define __NR_stat64 195 32bit only */
1199 +/* #define __NR_lstat64 196 32bit only */
1200 +/* #define __NR_fstat64 197 32bit only */
1201 +#define __NR_pciconfig_read 198
1202 +#define __NR_pciconfig_write 199
1203 +#define __NR_pciconfig_iobase 200
1204 +#define __NR_multiplexer 201
1205 +#define __NR_getdents64 202
1206 +#define __NR_pivot_root 203
1207 +/* #define __NR_fcntl64 204 32bit only */
1208 +#define __NR_madvise 205
1209 +#define __NR_mincore 206
1210 +#define __NR_gettid 207
1211 +#define __NR_tkill 208
1212 +#define __NR_setxattr 209
1213 +#define __NR_lsetxattr 210
1214 +#define __NR_fsetxattr 211
1215 +#define __NR_getxattr 212
1216 +#define __NR_lgetxattr 213
1217 +#define __NR_fgetxattr 214
1218 +#define __NR_listxattr 215
1219 +#define __NR_llistxattr 216
1220 +#define __NR_flistxattr 217
1221 +#define __NR_removexattr 218
1222 +#define __NR_lremovexattr 219
1223 +#define __NR_fremovexattr 220
1224 +#define __NR_futex 221
1225 +#define __NR_sched_setaffinity 222
1226 +#define __NR_sched_getaffinity 223
1227 +/* 224 currently unused */
1228 +#define __NR_tuxcall 225
1229 +/* #define __NR_sendfile64 226 32bit only */
1230 +#define __NR_io_setup 227
1231 +#define __NR_io_destroy 228
1232 +#define __NR_io_getevents 229
1233 +#define __NR_io_submit 230
1234 +#define __NR_io_cancel 231
1235 +#define __NR_set_tid_address 232
1236 +#define __NR_fadvise64 233
1237 +#define __NR_exit_group 234
1238 +#define __NR_lookup_dcookie 235
1239 +#define __NR_epoll_create 236
1240 +#define __NR_epoll_ctl 237
1241 +#define __NR_epoll_wait 238
1242 +#define __NR_remap_file_pages 239
1243 +#define __NR_timer_create 240
1244 +#define __NR_timer_settime 241
1245 +#define __NR_timer_gettime 242
1246 +#define __NR_timer_getoverrun 243
1247 +#define __NR_timer_delete 244
1248 +#define __NR_clock_settime 245
1249 +#define __NR_clock_gettime 246
1250 +#define __NR_clock_getres 247
1251 +#define __NR_clock_nanosleep 248
1252 +#define __NR_swapcontext 249
1253 +#define __NR_tgkill 250
1254 +#define __NR_utimes 251
1255 +#define __NR_statfs64 252
1256 +#define __NR_fstatfs64 253
1257 +/* #define __NR_fadvise64_64 254 32bit only */
1258 +#define __NR_rtas 255
1259 +/* Number 256 is reserved for sys_debug_setcontext */
1260 +/* Number 257 is reserved for vserver */
1261 +/* Number 258 is reserved for new sys_remap_file_pages */
1262 +#define __NR_mbind 259
1263 +#define __NR_get_mempolicy 260
1264 +#define __NR_set_mempolicy 261
1265 +#define __NR_mq_open 262
1266 +#define __NR_mq_unlink 263
1267 +#define __NR_mq_timedsend 264
1268 +#define __NR_mq_timedreceive 265
1269 +#define __NR_mq_notify 266
1270 +#define __NR_mq_getsetattr 267
1271 +#define __NR_kexec_load 268
1272 +#define __NR_add_key 269
1273 +#define __NR_request_key 270
1274 +#define __NR_keyctl 271
1275 +#define __NR_waitid 272
1276 +#define __NR_ioprio_set 273
1277 +#define __NR_ioprio_get 274
1278 +#define __NR_inotify_init 275
1279 +#define __NR_inotify_add_watch 276
1280 +#define __NR_inotify_rm_watch 277
1281 +
1282 +
1283 +
1284 +#define __diet_proto_common(sym) \
1285 + .section ".opd","aw"; \
1286 + .align 3; \
1287 +sym: \
1288 + .quad .sym,.TOC.@tocbase,0; \
1289 + .previous; \
1290 + .size sym,24; \
1291 + .type .sym,@function
1292 +
1293 +#define diet_proto_weak(sym) \
1294 + .weak sym; \
1295 + .weak .sym; \
1296 + __diet_proto_common(sym)
1297 +
1298 +#define diet_proto(sym) \
1299 + .globl sym; \
1300 + .globl .sym; \
1301 + __diet_proto_common(sym)
1302 +
1303 +
1304 +#define syscall_weak(name,wsym,sym) \
1305 +.text; \
1306 +diet_proto_weak(wsym); \
1307 +diet_proto(sym); \
1308 +.wsym: \
1309 +.sym: \
1310 + li 0,__NR_##name; \
1311 + b __unified_syscall
1312 +
1313 +#define syscall(name,sym) \
1314 +.text; \
1315 +diet_proto(sym); \
1316 +.sym: \
1317 + li 0,__NR_##name; \
1318 + b __unified_syscall
1319 +
1320 diff -NurpP dietlibc-0.30_pre20060501.orig/powerpc64/__testandset.S dietlibc-0.30_pre20060501-ppc-rename/powerpc64/__testandset.S
1321 --- dietlibc-0.30_pre20060501.orig/powerpc64/__testandset.S 1970-01-01 01:00:00.000000000 +0100
1322 +++ dietlibc-0.30_pre20060501-ppc-rename/powerpc64/__testandset.S 2003-10-10 15:37:34.000000000 +0200
1323 @@ -0,0 +1,12 @@
1324 +.global __testandset
1325 +.type __testandset,@function
1326 +.align 2
1327 +__testandset:
1328 +1: lwarx 5,0,3
1329 + li 0,1
1330 + stwcx. 0,0,3
1331 + bne- 1b
1332 + mr 3,5
1333 + blr
1334 +.size __testandset,.-__testandset
1335 +
1336 diff -NurpP dietlibc-0.30_pre20060501.orig/powerpc64/umount.S dietlibc-0.30_pre20060501-ppc-rename/powerpc64/umount.S
1337 --- dietlibc-0.30_pre20060501.orig/powerpc64/umount.S 1970-01-01 01:00:00.000000000 +0100
1338 +++ dietlibc-0.30_pre20060501-ppc-rename/powerpc64/umount.S 2004-12-17 19:47:59.000000000 +0100
1339 @@ -0,0 +1,8 @@
1340 +#include "syscalls.h"
1341 +
1342 + .text
1343 +diet_proto(umount)
1344 +.umount:
1345 + li 0, __NR_umount2
1346 + li 4, 0
1347 + b __unified_syscall
1348 diff -NurpP dietlibc-0.30_pre20060501.orig/powerpc64/unified.S dietlibc-0.30_pre20060501-ppc-rename/powerpc64/unified.S
1349 --- dietlibc-0.30_pre20060501.orig/powerpc64/unified.S 1970-01-01 01:00:00.000000000 +0100
1350 +++ dietlibc-0.30_pre20060501-ppc-rename/powerpc64/unified.S 2005-05-13 20:39:32.000000000 +0200
1351 @@ -0,0 +1,71 @@
1352 +#include <dietfeatures.h>
1353 +#include "syscalls.h"
1354 +
1355 + .text
1356 +.exit:
1357 + .weak .exit
1358 +._exit:
1359 + li 0,__NR_exit
1360 + .global __unified_syscall
1361 +__unified_syscall:
1362 + sc
1363 + bnslr+
1364 +
1365 + .global error_unified_syscall
1366 +error_unified_syscall:
1367 +
1368 +#ifdef WANT_THREAD_SAFE
1369 + stdu 1,-128(1)
1370 + mflr 0
1371 + std 0,20(1)
1372 + std 3,12(1)
1373 + bl .__errno_location
1374 + ld 0,12(1)
1375 + stw 0,0(3)
1376 + ld 0,20(1)
1377 + mtlr 0
1378 + addi 1,1,128
1379 +#else
1380 + lis 9,errno@highesta
1381 + ori 9,9,errno@highera
1382 + sldi 9,9,32
1383 + oris 9,9,errno@ha
1384 + stw 3,errno@l(9)
1385 +#endif
1386 + li 3,-1
1387 +
1388 +/* here we go and "reuse" the return for weak-void functions */
1389 +//#include "dietuglyweaks.h"
1390 +.__thread_doexit:
1391 + .weak .__thread_doexit
1392 +.__fflush_stdin:
1393 + .weak .__fflush_stdin
1394 +.__fflush_stdout:
1395 + .weak .__fflush_stdout
1396 +.__fflush_stderr:
1397 + .weak .__fflush_stderr
1398 +.flockfile:
1399 + .weak .flockfile
1400 +.funlockfile:
1401 + .weak .funlockfile
1402 +.__nop:
1403 + .weak .__nop
1404 +.__you_tried_to_link_a_dietlibc_object_against_glibc:
1405 + .weak .__you_tried_to_link_a_dietlibc_object_against_glibc
1406 +
1407 + blr
1408 + .long 0
1409 + .byte 0,0,0,1,128,0,0,0
1410 + .size ._exit,.-._exit
1411 + .size .exit,.-.exit
1412 +
1413 +diet_proto_weak(__thread_doexit)
1414 +diet_proto_weak(__fflush_stdin)
1415 +diet_proto_weak(__fflush_stdout)
1416 +diet_proto_weak(__fflush_stderr)
1417 +diet_proto_weak(flockfile)
1418 +diet_proto_weak(funlockfile)
1419 +diet_proto_weak(__nop)
1420 +diet_proto_weak(__you_tried_to_link_a_dietlibc_object_against_glibc)
1421 +diet_proto_weak(exit)
1422 +diet_proto(_exit)
1423 diff -NurpP dietlibc-0.30_pre20060501.orig/ppc/clone.S dietlibc-0.30_pre20060501-ppc-rename/ppc/clone.S
1424 --- dietlibc-0.30_pre20060501.orig/ppc/clone.S 2001-12-13 17:05:03.000000000 +0100
1425 +++ dietlibc-0.30_pre20060501-ppc-rename/ppc/clone.S 1970-01-01 01:00:00.000000000 +0100
1426 @@ -1,48 +0,0 @@
1427 -#include <dietfeatures.h>
1428 -#include "syscalls.h"
1429 -#include <errno.h>
1430 -
1431 -.text
1432 -.weak clone
1433 -clone:
1434 -.global __clone
1435 -__clone:
1436 - cmpwi 4,0 /* check have non null child_stack pointer */
1437 - cmpwi cr1, 3,0 /* check have non null thread_funcion */
1438 - cror eq,4*cr1+eq,eq /* now if eq is set one is or both are zero */
1439 - beq .Lclone_error
1440 -
1441 - stwu 1,-32(1) /* alloc some space on the stack */
1442 - stmw 29, 16(1) /* save r29,r30,r31 on stack */
1443 -
1444 - rlwinm 4,4,0,0,27 /* mask out lower 4 bits */
1445 -
1446 - /* move parameter to positions clone wants them */
1447 - mr 29,3 /* r29 = r3 fn */
1448 - mr 30,4 /* r30 = r4 stack */
1449 - mr 31,6 /* r31 = r6 arg */
1450 - mr 3, 5 /* r3 = r5 flags */
1451 -
1452 - li 0, __NR_clone /* load syscall nr. */
1453 - sc
1454 -
1455 - cmpwi cr1,3,0 /* compare return of syscall with 0 */
1456 - crandc 4*cr1+eq,4*cr1+eq,so
1457 - bne .Lclone_parent /* return was non zero -> .Lclone_parent */
1458 -
1459 - /* we are the cloned process */
1460 - mr 1, 30 /* set stack pointer */
1461 - mtctr 29 /* set count register to fn ? */
1462 - mr 3, 31 /* set argument */
1463 - bctrl /* branch trough count register and link */
1464 - b _exit /* exit thread */
1465 -
1466 -.Lclone_parent:
1467 - lmw 29,16(1) /* restore saved registers */
1468 - addi 1, 1,32 /* free stack */
1469 - bnslr+ /* had cloned a thread so return to parent */
1470 - b error_unified_syscall
1471 -
1472 -.Lclone_error:
1473 - li 3, EINVAL
1474 - b error_unified_syscall
1475 diff -NurpP dietlibc-0.30_pre20060501.orig/ppc/__longjmp.S dietlibc-0.30_pre20060501-ppc-rename/ppc/__longjmp.S
1476 --- dietlibc-0.30_pre20060501.orig/ppc/__longjmp.S 2001-01-25 18:23:36.000000000 +0100
1477 +++ dietlibc-0.30_pre20060501-ppc-rename/ppc/__longjmp.S 1970-01-01 01:00:00.000000000 +0100
1478 @@ -1,59 +0,0 @@
1479 -#include <setjmp.h>
1480 -
1481 -
1482 -#ifdef PIC
1483 -#define JUMPTARGET(name) name##@plt
1484 -#else
1485 -#define JUMPTARGET(name) name
1486 -#endif
1487 -
1488 -.global __longjmp
1489 -.type __longjmp,@function
1490 -.align 2
1491 -__longjmp:
1492 - lwz 1,(JB_GPR1*4)(3)
1493 - lwz 2,(JB_GPR2*4)(3)
1494 - lwz 0,(JB_LR*4)(3)
1495 - lwz 14,((JB_GPRS+0)*4)(3)
1496 - lfd 14,((JB_FPRS+0*2)*4)(3)
1497 - lwz 15,((JB_GPRS+1)*4)(3)
1498 - lfd 15,((JB_FPRS+1*2)*4)(3)
1499 - lwz 16,((JB_GPRS+2)*4)(3)
1500 - lfd 16,((JB_FPRS+2*2)*4)(3)
1501 - lwz 17,((JB_GPRS+3)*4)(3)
1502 - lfd 17,((JB_FPRS+3*2)*4)(3)
1503 - lwz 18,((JB_GPRS+4)*4)(3)
1504 - lfd 18,((JB_FPRS+4*2)*4)(3)
1505 - lwz 19,((JB_GPRS+5)*4)(3)
1506 - lfd 19,((JB_FPRS+5*2)*4)(3)
1507 - lwz 20,((JB_GPRS+6)*4)(3)
1508 - lfd 20,((JB_FPRS+6*2)*4)(3)
1509 - mtlr 0
1510 - lwz 21,((JB_GPRS+7)*4)(3)
1511 - lfd 21,((JB_FPRS+7*2)*4)(3)
1512 - lwz 22,((JB_GPRS+8)*4)(3)
1513 - lfd 22,((JB_FPRS+8*2)*4)(3)
1514 - lwz 0,(JB_CR*4)(3)
1515 - lwz 23,((JB_GPRS+9)*4)(3)
1516 - lfd 23,((JB_FPRS+9*2)*4)(3)
1517 - lwz 24,((JB_GPRS+10)*4)(3)
1518 - lfd 24,((JB_FPRS+10*2)*4)(3)
1519 - lwz 25,((JB_GPRS+11)*4)(3)
1520 - lfd 25,((JB_FPRS+11*2)*4)(3)
1521 - mtcrf 0xFF,0
1522 - lwz 26,((JB_GPRS+12)*4)(3)
1523 - lfd 26,((JB_FPRS+12*2)*4)(3)
1524 - lwz 27,((JB_GPRS+13)*4)(3)
1525 - lfd 27,((JB_FPRS+13*2)*4)(3)
1526 - lwz 28,((JB_GPRS+14)*4)(3)
1527 - lfd 28,((JB_FPRS+14*2)*4)(3)
1528 - lwz 29,((JB_GPRS+15)*4)(3)
1529 - lfd 29,((JB_FPRS+15*2)*4)(3)
1530 - lwz 30,((JB_GPRS+16)*4)(3)
1531 - lfd 30,((JB_FPRS+16*2)*4)(3)
1532 - lwz 31,((JB_GPRS+17)*4)(3)
1533 - lfd 31,((JB_FPRS+17*2)*4)(3)
1534 - mr 3,4
1535 - blr
1536 -.size __longjmp,.-__longjmp
1537 -
1538 diff -NurpP dietlibc-0.30_pre20060501.orig/ppc/Makefile.add dietlibc-0.30_pre20060501-ppc-rename/ppc/Makefile.add
1539 --- dietlibc-0.30_pre20060501.orig/ppc/Makefile.add 2001-01-30 16:01:20.000000000 +0100
1540 +++ dietlibc-0.30_pre20060501-ppc-rename/ppc/Makefile.add 1970-01-01 01:00:00.000000000 +0100
1541 @@ -1,3 +0,0 @@
1542 -
1543 -CFLAGS+=-mpowerpc-gpopt -mpowerpc-gfxopt -Os
1544 -VPATH:=ppc:syscalls.s:$(VPATH)
1545 diff -NurpP dietlibc-0.30_pre20060501.orig/ppc/mmap.c dietlibc-0.30_pre20060501-ppc-rename/ppc/mmap.c
1546 --- dietlibc-0.30_pre20060501.orig/ppc/mmap.c 2001-06-18 23:08:07.000000000 +0200
1547 +++ dietlibc-0.30_pre20060501-ppc-rename/ppc/mmap.c 1970-01-01 01:00:00.000000000 +0100
1548 @@ -1,40 +0,0 @@
1549 -#include "dietfeatures.h"
1550 -#include <sys/types.h>
1551 -#include <errno.h>
1552 -#include "syscalls.h"
1553 -
1554 -int mmap(void*start,size_t length,int prot,int flags,int fd,off_t offset) {
1555 - unsigned long __sc_ret, __sc_err;
1556 - {
1557 - register unsigned long __sc_0 __asm__ ("r0");
1558 - register unsigned long __sc_3 __asm__ ("r3");
1559 - register unsigned long __sc_4 __asm__ ("r4");
1560 - register unsigned long __sc_5 __asm__ ("r5");
1561 - register unsigned long __sc_6 __asm__ ("r6");
1562 - register unsigned long __sc_7 __asm__ ("r7");
1563 - register unsigned long __sc_8 __asm__ ("r8");
1564 -
1565 - __sc_3 = (unsigned long) (start);
1566 - __sc_4 = (unsigned long) (length);
1567 - __sc_5 = (unsigned long) (prot);
1568 - __sc_6 = (unsigned long) (flags);
1569 - __sc_7 = (unsigned long) (fd);
1570 - __sc_8 = (unsigned long) (offset);
1571 - __sc_0 = __NR_mmap;
1572 - __asm__ __volatile__
1573 - ("sc \n\t"
1574 - "mfcr %1 "
1575 - : "=&r" (__sc_3), "=&r" (__sc_0)
1576 - : "0" (__sc_3), "1" (__sc_0),
1577 - "r" (__sc_4),
1578 - "r" (__sc_5),
1579 - "r" (__sc_6),
1580 - "r" (__sc_7),
1581 - "r" (__sc_8)
1582 - : "r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12");
1583 - __sc_ret = __sc_3;
1584 - __sc_err = __sc_0;
1585 - }
1586 - return (__sc_err & 0x10000000 ? errno = __sc_ret, __sc_ret = -1 : 0),
1587 - (int) __sc_ret;
1588 -}
1589 diff -NurpP dietlibc-0.30_pre20060501.orig/ppc/setjmp.S dietlibc-0.30_pre20060501-ppc-rename/ppc/setjmp.S
1590 --- dietlibc-0.30_pre20060501.orig/ppc/setjmp.S 2001-01-09 18:57:44.000000000 +0100
1591 +++ dietlibc-0.30_pre20060501-ppc-rename/ppc/setjmp.S 1970-01-01 01:00:00.000000000 +0100
1592 @@ -1,56 +0,0 @@
1593 -#include <setjmp.h>
1594 -
1595 -#ifdef PIC
1596 -#define JUMPTARGET(name) name##@plt
1597 -#else
1598 -#define JUMPTARGET(name) name
1599 -#endif
1600 -
1601 -.global __sigsetjmp
1602 -.type __sigsetjmp,@function
1603 -.align 2
1604 -__sigsetjmp:
1605 - stw 1,(JB_GPR1*4)(3)
1606 - mflr 0
1607 - stw 2,(JB_GPR2*4)(3)
1608 - stw 14,((JB_GPRS+0)*4)(3)
1609 - stfd 14,((JB_FPRS+0*2)*4)(3)
1610 - stw 0,(JB_LR*4)(3)
1611 - stw 15,((JB_GPRS+1)*4)(3)
1612 - stfd 15,((JB_FPRS+1*2)*4)(3)
1613 - mfcr 0
1614 - stw 16,((JB_GPRS+2)*4)(3)
1615 - stfd 16,((JB_FPRS+2*2)*4)(3)
1616 - stw 0,(JB_CR*4)(3)
1617 - stw 17,((JB_GPRS+3)*4)(3)
1618 - stfd 17,((JB_FPRS+3*2)*4)(3)
1619 - stw 18,((JB_GPRS+4)*4)(3)
1620 - stfd 18,((JB_FPRS+4*2)*4)(3)
1621 - stw 19,((JB_GPRS+5)*4)(3)
1622 - stfd 19,((JB_FPRS+5*2)*4)(3)
1623 - stw 20,((JB_GPRS+6)*4)(3)
1624 - stfd 20,((JB_FPRS+6*2)*4)(3)
1625 - stw 21,((JB_GPRS+7)*4)(3)
1626 - stfd 21,((JB_FPRS+7*2)*4)(3)
1627 - stw 22,((JB_GPRS+8)*4)(3)
1628 - stfd 22,((JB_FPRS+8*2)*4)(3)
1629 - stw 23,((JB_GPRS+9)*4)(3)
1630 - stfd 23,((JB_FPRS+9*2)*4)(3)
1631 - stw 24,((JB_GPRS+10)*4)(3)
1632 - stfd 24,((JB_FPRS+10*2)*4)(3)
1633 - stw 25,((JB_GPRS+11)*4)(3)
1634 - stfd 25,((JB_FPRS+11*2)*4)(3)
1635 - stw 26,((JB_GPRS+12)*4)(3)
1636 - stfd 26,((JB_FPRS+12*2)*4)(3)
1637 - stw 27,((JB_GPRS+13)*4)(3)
1638 - stfd 27,((JB_FPRS+13*2)*4)(3)
1639 - stw 28,((JB_GPRS+14)*4)(3)
1640 - stfd 28,((JB_FPRS+14*2)*4)(3)
1641 - stw 29,((JB_GPRS+15)*4)(3)
1642 - stfd 29,((JB_FPRS+15*2)*4)(3)
1643 - stw 30,((JB_GPRS+16)*4)(3)
1644 - stfd 30,((JB_FPRS+16*2)*4)(3)
1645 - stw 31,((JB_GPRS+17)*4)(3)
1646 - stfd 31,((JB_FPRS+17*2)*4)(3)
1647 - b JUMPTARGET (__sigjmp_save)
1648 -.size __sigsetjmp,.-__sigsetjmp
1649 diff -NurpP dietlibc-0.30_pre20060501.orig/ppc/start.S dietlibc-0.30_pre20060501-ppc-rename/ppc/start.S
1650 --- dietlibc-0.30_pre20060501.orig/ppc/start.S 2006-04-04 07:35:14.000000000 +0200
1651 +++ dietlibc-0.30_pre20060501-ppc-rename/ppc/start.S 1970-01-01 01:00:00.000000000 +0100
1652 @@ -1,52 +0,0 @@
1653 -#include "dietfeatures.h"
1654 -
1655 -.text
1656 -.global _start
1657 -.type _start,@function
1658 -_start:
1659 - /* Save the stack pointer, in case we're statically linked under Linux. */
1660 - mr 9,1
1661 - /* Set up an initial stack frame, and clear the LR. */
1662 - clrrwi 1,1,4
1663 - li 0,0
1664 - stwu 1,-16(1)
1665 - mtlr 0
1666 - stw 0,0(1)
1667 -
1668 - /* r9 contains the initial stack pointer
1669 - argc = (r9)
1670 - argv = (r9+4)
1671 - envp = argv+(argc+1)*4 */
1672 -
1673 - lis 14,__libc_stack_end@ha
1674 - stw 9,__libc_stack_end@l(14)
1675 -
1676 - lwzu 3,0(9) /* argc */
1677 - addi 4,9,4 /* argv */
1678 - add 5,0,3 /* argc... */
1679 - addi 5,5,1 /* argc+1...*/
1680 - slwi 5,5,2 /* (argc+1)*4 */
1681 - add 5,5,4 /* argv+(argc+1)*4 */
1682 -
1683 - lis 14,environ@ha
1684 - stw 5,environ@l(14)
1685 -
1686 -#ifdef WANT_DYNAMIC
1687 - mr 6,7
1688 - bl _dyn_start
1689 -#else
1690 - bl CALL_IN_STARTCODE
1691 -#endif
1692 - b exit
1693 -.size _start,.-_start
1694 -
1695 -
1696 -/* Define a symbol for the first piece of initialized data. */
1697 - .section ".data"
1698 -__data_start:
1699 -
1700 -/* this is needed for libgcc_eh.a - see gcc-3.4/gcc/config/rs6000/linux-unwind.h */
1701 - .weak __libc_stack_end
1702 - .lcomm __libc_stack_end,4,4
1703 - .type __libc_stack_end,@object
1704 -
1705 diff -NurpP dietlibc-0.30_pre20060501.orig/ppc/syscalls.h dietlibc-0.30_pre20060501-ppc-rename/ppc/syscalls.h
1706 --- dietlibc-0.30_pre20060501.orig/ppc/syscalls.h 2005-09-21 09:33:08.000000000 +0200
1707 +++ dietlibc-0.30_pre20060501-ppc-rename/ppc/syscalls.h 1970-01-01 01:00:00.000000000 +0100
1708 @@ -1,299 +0,0 @@
1709 -
1710 -#define __NR_exit 1
1711 -#define __NR_fork 2
1712 -#define __NR_read 3
1713 -#define __NR_write 4
1714 -#define __NR_open 5
1715 -#define __NR_close 6
1716 -#define __NR_waitpid 7
1717 -#define __NR_creat 8
1718 -#define __NR_link 9
1719 -#define __NR_unlink 10
1720 -#define __NR_execve 11
1721 -#define __NR_chdir 12
1722 -#define __NR_time 13
1723 -#define __NR_mknod 14
1724 -#define __NR_chmod 15
1725 -#define __NR_lchown 16
1726 -#define __NR_break 17
1727 -#define __NR_oldstat 18
1728 -#define __NR_lseek 19
1729 -#define __NR_getpid 20
1730 -#define __NR_mount 21
1731 -#define __NR_umount 22
1732 -#define __NR_setuid 23
1733 -#define __NR_getuid 24
1734 -#define __NR_stime 25
1735 -#define __NR_ptrace 26
1736 -#define __NR_alarm 27
1737 -#define __NR_oldfstat 28
1738 -#define __NR_pause 29
1739 -#define __NR_utime 30
1740 -#define __NR_stty 31
1741 -#define __NR_gtty 32
1742 -#define __NR_access 33
1743 -#define __NR_nice 34
1744 -#define __NR_ftime 35
1745 -#define __NR_sync 36
1746 -#define __NR_kill 37
1747 -#define __NR_rename 38
1748 -#define __NR_mkdir 39
1749 -#define __NR_rmdir 40
1750 -#define __NR_dup 41
1751 -#define __NR_pipe 42
1752 -#define __NR_times 43
1753 -#define __NR_prof 44
1754 -#define __NR_brk 45
1755 -#define __NR_setgid 46
1756 -#define __NR_getgid 47
1757 -#define __NR_signal 48
1758 -#define __NR_geteuid 49
1759 -#define __NR_getegid 50
1760 -#define __NR_acct 51
1761 -#define __NR_umount2 52
1762 -#define __NR_lock 53
1763 -#define __NR_ioctl 54
1764 -#define __NR_fcntl 55
1765 -#define __NR_mpx 56
1766 -#define __NR_setpgid 57
1767 -#define __NR_ulimit 58
1768 -#define __NR_oldolduname 59
1769 -#define __NR_umask 60
1770 -#define __NR_chroot 61
1771 -#define __NR_ustat 62
1772 -#define __NR_dup2 63
1773 -#define __NR_getppid 64
1774 -#define __NR_getpgrp 65
1775 -#define __NR_setsid 66
1776 -#define __NR_sigaction 67
1777 -#define __NR_sgetmask 68
1778 -#define __NR_ssetmask 69
1779 -#define __NR_setreuid 70
1780 -#define __NR_setregid 71
1781 -#define __NR_sigsuspend 72
1782 -#define __NR_sigpending 73
1783 -#define __NR_sethostname 74
1784 -#define __NR_setrlimit 75
1785 -#define __NR_getrlimit 76
1786 -#define __NR_getrusage 77
1787 -#define __NR_gettimeofday 78
1788 -#define __NR_settimeofday 79
1789 -#define __NR_getgroups 80
1790 -#define __NR_setgroups 81
1791 -#define __NR_select 82
1792 -#define __NR_symlink 83
1793 -#define __NR_oldlstat 84
1794 -#define __NR_readlink 85
1795 -#define __NR_uselib 86
1796 -#define __NR_swapon 87
1797 -#define __NR_reboot 88
1798 -#define __NR_readdir 89
1799 -#define __NR_mmap 90
1800 -#define __NR_munmap 91
1801 -#define __NR_truncate 92
1802 -#define __NR_ftruncate 93
1803 -#define __NR_fchmod 94
1804 -#define __NR_fchown 95
1805 -#define __NR_getpriority 96
1806 -#define __NR_setpriority 97
1807 -#define __NR_profil 98
1808 -#define __NR_statfs 99
1809 -#define __NR_fstatfs 100
1810 -#define __NR_ioperm 101
1811 -#define __NR_socketcall 102
1812 -#define __NR_syslog 103
1813 -#define __NR_setitimer 104
1814 -#define __NR_getitimer 105
1815 -#define __NR_stat 106
1816 -#define __NR_lstat 107
1817 -#define __NR_fstat 108
1818 -#define __NR_olduname 109
1819 -#define __NR_iopl 110
1820 -#define __NR_vhangup 111
1821 -#define __NR_idle 112
1822 -#define __NR_vm86 113
1823 -#define __NR_wait4 114
1824 -#define __NR_swapoff 115
1825 -#define __NR_sysinfo 116
1826 -#define __NR_ipc 117
1827 -#define __NR_fsync 118
1828 -#define __NR_sigreturn 119
1829 -#define __NR_clone 120
1830 -#define __NR_setdomainname 121
1831 -#define __NR_uname 122
1832 -#define __NR_modify_ldt 123
1833 -#define __NR_adjtimex 124
1834 -#define __NR_mprotect 125
1835 -#define __NR_sigprocmask 126
1836 -#define __NR_create_module 127
1837 -#define __NR_init_module 128
1838 -#define __NR_delete_module 129
1839 -#define __NR_get_kernel_syms 130
1840 -#define __NR_quotactl 131
1841 -#define __NR_getpgid 132
1842 -#define __NR_fchdir 133
1843 -#define __NR_bdflush 134
1844 -#define __NR_sysfs 135
1845 -#define __NR_personality 136
1846 -#define __NR_afs_syscall 137 /* Syscall for Andrew File System */
1847 -#define __NR_setfsuid 138
1848 -#define __NR_setfsgid 139
1849 -#define __NR__llseek 140
1850 -#define __NR_getdents 141
1851 -#define __NR__newselect 142
1852 -#define __NR_flock 143
1853 -#define __NR_msync 144
1854 -#define __NR_readv 145
1855 -#define __NR_writev 146
1856 -#define __NR_getsid 147
1857 -#define __NR_fdatasync 148
1858 -#define __NR__sysctl 149
1859 -#define __NR_mlock 150
1860 -#define __NR_munlock 151
1861 -#define __NR_mlockall 152
1862 -#define __NR_munlockall 153
1863 -#define __NR_sched_setparam 154
1864 -#define __NR_sched_getparam 155
1865 -#define __NR_sched_setscheduler 156
1866 -#define __NR_sched_getscheduler 157
1867 -#define __NR_sched_yield 158
1868 -#define __NR_sched_get_priority_max 159
1869 -#define __NR_sched_get_priority_min 160
1870 -#define __NR_sched_rr_get_interval 161
1871 -#define __NR_nanosleep 162
1872 -#define __NR_mremap 163
1873 -#define __NR_setresuid 164
1874 -#define __NR_getresuid 165
1875 -#define __NR_query_module 166
1876 -#define __NR_poll 167
1877 -#define __NR_nfsservctl 168
1878 -#define __NR_setresgid 169
1879 -#define __NR_getresgid 170
1880 -#define __NR_prctl 171
1881 -#define __NR_rt_sigreturn 172
1882 -#define __NR_rt_sigaction 173
1883 -#define __NR_rt_sigprocmask 174
1884 -#define __NR_rt_sigpending 175
1885 -#define __NR_rt_sigtimedwait 176
1886 -#define __NR_rt_sigqueueinfo 177
1887 -#define __NR_rt_sigsuspend 178
1888 -#define __NR_pread 179
1889 -#define __NR_pwrite 180
1890 -#define __NR_chown 181
1891 -#define __NR_getcwd 182
1892 -#define __NR_capget 183
1893 -#define __NR_capset 184
1894 -#define __NR_sigaltstack 185
1895 -#define __NR_sendfile 186
1896 -#define __NR_getpmsg 187 /* some people actually want streams */
1897 -#define __NR_putpmsg 188 /* some people actually want streams */
1898 -#define __NR_vfork 189
1899 -#define __NR_ugetrlimit 190 /* SuS compliant getrlimit */
1900 -#define __NR_readahead 191
1901 -#define __NR_mmap2 192
1902 -#define __NR_truncate64 193
1903 -#define __NR_ftruncate64 194
1904 -#define __NR_stat64 195
1905 -#define __NR_lstat64 196
1906 -#define __NR_fstat64 197
1907 -#define __NR_pciconfig_read 198
1908 -#define __NR_pciconfig_write 199
1909 -#define __NR_pciconfig_iobase 200
1910 -#define __NR_multiplexer 201
1911 -#define __NR_getdents64 202
1912 -#define __NR_pivot_root 203
1913 -#define __NR_fcntl64 204
1914 -#define __NR_madvise 205
1915 -#define __NR_mincore 206
1916 -#define __NR_gettid 207
1917 -#define __NR_tkill 208
1918 -#define __NR_setxattr 209
1919 -#define __NR_lsetxattr 210
1920 -#define __NR_fsetxattr 211
1921 -#define __NR_getxattr 212
1922 -#define __NR_lgetxattr 213
1923 -#define __NR_fgetxattr 214
1924 -#define __NR_listxattr 215
1925 -#define __NR_llistxattr 216
1926 -#define __NR_flistxattr 217
1927 -#define __NR_removexattr 218
1928 -#define __NR_lremovexattr 219
1929 -#define __NR_fremovexattr 220
1930 -#define __NR_futex 221
1931 -#define __NR_sched_setaffinity 222
1932 -#define __NR_sched_getaffinity 223
1933 -/* 224 currently unused */
1934 -#define __NR_tuxcall 225
1935 -#define __NR_sendfile64 226
1936 -#define __NR_io_setup 227
1937 -#define __NR_io_destroy 228
1938 -#define __NR_io_getevents 229
1939 -#define __NR_io_submit 230
1940 -#define __NR_io_cancel 231
1941 -#define __NR_set_tid_address 232
1942 -#define __NR_fadvise64 233
1943 -#define __NR_exit_group 234
1944 -#define __NR_lookup_dcookie 235
1945 -#define __NR_epoll_create 236
1946 -#define __NR_epoll_ctl 237
1947 -#define __NR_epoll_wait 238
1948 -#define __NR_remap_file_pages 239
1949 -#define __NR_timer_create 240
1950 -#define __NR_timer_settime 241
1951 -#define __NR_timer_gettime 242
1952 -#define __NR_timer_getoverrun 243
1953 -#define __NR_timer_delete 244
1954 -#define __NR_clock_settime 245
1955 -#define __NR_clock_gettime 246
1956 -#define __NR_clock_getres 247
1957 -#define __NR_clock_nanosleep 248
1958 -#define __NR_swapcontext 249
1959 -#define __NR_tgkill 250
1960 -#define __NR_utimes 251
1961 -#define __NR_statfs64 252
1962 -#define __NR_fstatfs64 253
1963 -#define __NR_fadvise64_64 254
1964 -#define __NR_rtas 255
1965 -#define __NR_sys_debug_setcontext 256
1966 -/* Number 257 is reserved for vserver */
1967 -/* Number 258 is reserved for new sys_remap_file_pages */
1968 -/* Number 259 is reserved for new sys_mbind */
1969 -/* Number 260 is reserved for new sys_get_mempolicy */
1970 -/* Number 261 is reserved for new sys_set_mempolicy */
1971 -#define __NR_mq_open 262
1972 -#define __NR_mq_unlink 263
1973 -#define __NR_mq_timedsend 264
1974 -#define __NR_mq_timedreceive 265
1975 -#define __NR_mq_notify 266
1976 -#define __NR_mq_getsetattr 267
1977 -#define __NR_kexec_load 268
1978 -#define __NR_add_key 269
1979 -#define __NR_request_key 270
1980 -#define __NR_keyctl 271
1981 -#define __NR_waitid 272
1982 -#define __NR_ioprio_set 273
1983 -#define __NR_ioprio_get 274
1984 -#define __NR_inotify_init 275
1985 -#define __NR_inotify_add_watch 276
1986 -#define __NR_inotify_rm_watch 277
1987 -
1988 -
1989 -#define syscall_weak(name,wsym,sym) \
1990 -.text; \
1991 -.type wsym,@function; \
1992 -.weak wsym; \
1993 -wsym: ; \
1994 -.type sym,@function; \
1995 -.global sym; \
1996 -sym: \
1997 - li 0,__NR_##name; \
1998 - b __unified_syscall
1999 -
2000 -#define syscall(name,sym) \
2001 -.text; \
2002 -.type sym,@function; \
2003 -.global sym; \
2004 -sym: \
2005 - li 0,__NR_##name; \
2006 - b __unified_syscall
2007 -
2008 diff -NurpP dietlibc-0.30_pre20060501.orig/ppc/__testandset.S dietlibc-0.30_pre20060501-ppc-rename/ppc/__testandset.S
2009 --- dietlibc-0.30_pre20060501.orig/ppc/__testandset.S 2002-09-16 13:17:01.000000000 +0200
2010 +++ dietlibc-0.30_pre20060501-ppc-rename/ppc/__testandset.S 1970-01-01 01:00:00.000000000 +0100
2011 @@ -1,12 +0,0 @@
2012 -.global __testandset
2013 -.type __testandset,@function
2014 -.align 2
2015 -__testandset:
2016 -1: lwarx 5,0,3
2017 - li 0,1
2018 - stwcx. 0,0,3
2019 - bne- 1b
2020 - mr 3,5
2021 - blr
2022 -.size __testandset,.-__testandset
2023 -
2024 diff -NurpP dietlibc-0.30_pre20060501.orig/ppc/unified.S dietlibc-0.30_pre20060501-ppc-rename/ppc/unified.S
2025 --- dietlibc-0.30_pre20060501.orig/ppc/unified.S 2002-01-21 16:55:19.000000000 +0100
2026 +++ dietlibc-0.30_pre20060501-ppc-rename/ppc/unified.S 1970-01-01 01:00:00.000000000 +0100
2027 @@ -1,40 +0,0 @@
2028 -#include <dietfeatures.h>
2029 -#include "syscalls.h"
2030 -
2031 -.text
2032 -.type exit,@function
2033 -.weak exit
2034 -exit:
2035 -.type _exit,@function
2036 -.global _exit
2037 -_exit:
2038 - li 0,__NR_exit
2039 -.global __unified_syscall
2040 -__unified_syscall:
2041 - sc
2042 - bnslr+
2043 -
2044 -.global error_unified_syscall
2045 -error_unified_syscall:
2046 -#ifdef WANT_THREAD_SAFE
2047 - stwu 1,-16(1)
2048 - mflr 0
2049 - stw 0,20(1)
2050 - stw 3,12(1)
2051 - bl __errno_location
2052 - lwz 0,12(1)
2053 - stw 0,0(3)
2054 - lwz 0,20(1)
2055 - mtlr 0
2056 - addi 1,1,16
2057 -#else
2058 - lis 9,errno@ha
2059 - stw 3,errno@l(9)
2060 -#endif
2061 - li 3,-1
2062 -
2063 -/* here we go and "reuse" the return for weak-void functions */
2064 -#include "dietuglyweaks.h"
2065 -
2066 - blr
2067 -
2068 diff -NurpP dietlibc-0.30_pre20060501.orig/ppc64/clone.S dietlibc-0.30_pre20060501-ppc-rename/ppc64/clone.S
2069 --- dietlibc-0.30_pre20060501.orig/ppc64/clone.S 2005-05-13 20:39:32.000000000 +0200
2070 +++ dietlibc-0.30_pre20060501-ppc-rename/ppc64/clone.S 1970-01-01 01:00:00.000000000 +0100
2071 @@ -1,52 +0,0 @@
2072 -#include <dietfeatures.h>
2073 -#include "syscalls.h"
2074 -#include <errno.h>
2075 -
2076 -.text
2077 -.weak clone
2078 -clone:
2079 -.global __clone
2080 -__clone:
2081 - cmpwi 4,0 /* check have non null child_stack pointer */
2082 - cmpwi cr1, 3,0 /* check have non null thread_funcion */
2083 - cror eq,4*cr1+eq,eq /* now if eq is set one is or both are zero */
2084 - beq .Lclone_error
2085 -
2086 - stdu 1,-64(1) /* alloc some space on the stack */
2087 - std 29, 16(1) /* save r29,r30,r31 on stack */
2088 - std 30, 24(1)
2089 - std 31, 32(1)
2090 -
2091 - rlwinm 4,4,0,0,27 /* mask out lower 4 bits */
2092 -
2093 - /* move parameter to positions clone wants them */
2094 - mr 29,3 /* r29 = r3 fn */
2095 - mr 30,4 /* r30 = r4 stack */
2096 - mr 31,6 /* r31 = r6 arg */
2097 - mr 3, 5 /* r3 = r5 flags */
2098 -
2099 - li 0, __NR_clone /* load syscall nr. */
2100 - sc
2101 -
2102 - cmpwi cr1,3,0 /* compare return of syscall with 0 */
2103 - crandc 4*cr1+eq,4*cr1+eq,so
2104 - bne .Lclone_parent /* return was non zero -> .Lclone_parent */
2105 -
2106 - /* we are the cloned process */
2107 - mr 1, 30 /* set stack pointer */
2108 - mtctr 29 /* set count register to fn ? */
2109 - mr 3, 31 /* set argument */
2110 - bctrl /* branch trough count register and link */
2111 - b _exit /* exit thread */
2112 -
2113 -.Lclone_parent:
2114 - ld 29,16(1) /* restore saved registers */
2115 - ld 30,24(1)
2116 - ld 31,32(1)
2117 - addi 1, 1,64 /* free stack */
2118 - bnslr+ /* had cloned a thread so return to parent */
2119 - b error_unified_syscall
2120 -
2121 -.Lclone_error:
2122 - li 3, EINVAL
2123 - b error_unified_syscall
2124 diff -NurpP dietlibc-0.30_pre20060501.orig/ppc64/__longjmp.S dietlibc-0.30_pre20060501-ppc-rename/ppc64/__longjmp.S
2125 --- dietlibc-0.30_pre20060501.orig/ppc64/__longjmp.S 2005-09-21 09:33:08.000000000 +0200
2126 +++ dietlibc-0.30_pre20060501-ppc-rename/ppc64/__longjmp.S 1970-01-01 01:00:00.000000000 +0100
2127 @@ -1,54 +0,0 @@
2128 -#include <setjmp.h>
2129 -
2130 - .quad .__longjmp,.TOC.@tocbase,0
2131 - .text
2132 - .size __longjmp,24
2133 - .type .__longjmp,@function
2134 - .globl .__longjmp
2135 -.align 2
2136 -.__longjmp:
2137 - ld 1,(JB_GPR1*8)(3)
2138 - ld 2,(JB_GPR2*8)(3)
2139 - ld 0,(JB_LR*8)(3)
2140 - ld 14,((JB_GPRS+0)*8)(3)
2141 - lfd 14,((JB_FPRS+0)*8)(3)
2142 - ld 15,((JB_GPRS+1)*8)(3)
2143 - lfd 15,((JB_FPRS+1)*8)(3)
2144 - ld 16,((JB_GPRS+2)*8)(3)
2145 - lfd 16,((JB_FPRS+2)*8)(3)
2146 - ld 17,((JB_GPRS+3)*8)(3)
2147 - lfd 17,((JB_FPRS+3)*8)(3)
2148 - ld 18,((JB_GPRS+4)*8)(3)
2149 - lfd 18,((JB_FPRS+4)*8)(3)
2150 - ld 19,((JB_GPRS+5)*8)(3)
2151 - lfd 19,((JB_FPRS+5)*8)(3)
2152 - ld 20,((JB_GPRS+6)*8)(3)
2153 - lfd 20,((JB_FPRS+6)*8)(3)
2154 - mtlr 0
2155 - ld 21,((JB_GPRS+7)*8)(3)
2156 - lfd 21,((JB_FPRS+7)*8)(3)
2157 - ld 22,((JB_GPRS+8)*8)(3)
2158 - lfd 22,((JB_FPRS+8)*8)(3)
2159 - ld 0,(JB_CR*8)(3)
2160 - ld 23,((JB_GPRS+9)*8)(3)
2161 - lfd 23,((JB_FPRS+9)*8)(3)
2162 - ld 24,((JB_GPRS+10)*8)(3)
2163 - lfd 24,((JB_FPRS+10)*8)(3)
2164 - ld 25,((JB_GPRS+11)*8)(3)
2165 - lfd 25,((JB_FPRS+11)*8)(3)
2166 - mtcrf 0xFF,0
2167 - ld 26,((JB_GPRS+12)*8)(3)
2168 - lfd 26,((JB_FPRS+12)*8)(3)
2169 - ld 27,((JB_GPRS+13)*8)(3)
2170 - lfd 27,((JB_FPRS+13)*8)(3)
2171 - ld 28,((JB_GPRS+14)*8)(3)
2172 - lfd 28,((JB_FPRS+14)*8)(3)
2173 - ld 29,((JB_GPRS+15)*8)(3)
2174 - lfd 29,((JB_FPRS+15)*8)(3)
2175 - ld 30,((JB_GPRS+16)*8)(3)
2176 - lfd 30,((JB_FPRS+16)*8)(3)
2177 - ld 31,((JB_GPRS+17)*8)(3)
2178 - lfd 31,((JB_FPRS+17)*8)(3)
2179 - mr 3,4
2180 - blr
2181 -.size .__longjmp,.-.__longjmp
2182 diff -NurpP dietlibc-0.30_pre20060501.orig/ppc64/Makefile.add dietlibc-0.30_pre20060501-ppc-rename/ppc64/Makefile.add
2183 --- dietlibc-0.30_pre20060501.orig/ppc64/Makefile.add 2003-10-10 15:37:34.000000000 +0200
2184 +++ dietlibc-0.30_pre20060501-ppc-rename/ppc64/Makefile.add 1970-01-01 01:00:00.000000000 +0100
2185 @@ -1,3 +0,0 @@
2186 -
2187 -CFLAGS+=-Os -mpowerpc64
2188 -VPATH:=ppc64:syscalls.s:$(VPATH)
2189 diff -NurpP dietlibc-0.30_pre20060501.orig/ppc64/setjmp.S dietlibc-0.30_pre20060501-ppc-rename/ppc64/setjmp.S
2190 --- dietlibc-0.30_pre20060501.orig/ppc64/setjmp.S 2005-09-21 09:33:08.000000000 +0200
2191 +++ dietlibc-0.30_pre20060501-ppc-rename/ppc64/setjmp.S 1970-01-01 01:00:00.000000000 +0100
2192 @@ -1,59 +0,0 @@
2193 -#include <setjmp.h>
2194 -
2195 -#ifdef PIC
2196 -#define JUMPTARGET(name) name##@plt
2197 -#else
2198 -#define JUMPTARGET(name) .name
2199 -#endif
2200 -
2201 - .quad .__sigsetjmp,.TOC.@tocbase,0
2202 - .text
2203 - .size __sigsetjmp,24
2204 - .type .__sigsetjmp,@function
2205 - .globl .__sigsetjmp
2206 -.align 2
2207 -.__sigsetjmp:
2208 - std 1,(JB_GPR1*8)(3)
2209 - mflr 0
2210 - std 2,(JB_GPR2*8)(3)
2211 - std 14,((JB_GPRS+0)*8)(3)
2212 - stfd 14,((JB_FPRS+0)*8)(3)
2213 - std 0,(JB_LR*8)(3)
2214 - std 15,((JB_GPRS+1)*8)(3)
2215 - stfd 15,((JB_FPRS+1)*8)(3)
2216 - mfcr 0
2217 - std 16,((JB_GPRS+2)*8)(3)
2218 - stfd 16,((JB_FPRS+2)*8)(3)
2219 - std 0,(JB_CR*8)(3)
2220 - std 17,((JB_GPRS+3)*8)(3)
2221 - stfd 17,((JB_FPRS+3)*8)(3)
2222 - std 18,((JB_GPRS+4)*8)(3)
2223 - stfd 18,((JB_FPRS+4)*8)(3)
2224 - std 19,((JB_GPRS+5)*8)(3)
2225 - stfd 19,((JB_FPRS+5)*8)(3)
2226 - std 20,((JB_GPRS+6)*8)(3)
2227 - stfd 20,((JB_FPRS+6)*8)(3)
2228 - std 21,((JB_GPRS+7)*8)(3)
2229 - stfd 21,((JB_FPRS+7)*8)(3)
2230 - std 22,((JB_GPRS+8)*8)(3)
2231 - stfd 22,((JB_FPRS+8)*8)(3)
2232 - std 23,((JB_GPRS+9)*8)(3)
2233 - stfd 23,((JB_FPRS+9)*8)(3)
2234 - std 24,((JB_GPRS+10)*8)(3)
2235 - stfd 24,((JB_FPRS+10)*8)(3)
2236 - std 25,((JB_GPRS+11)*8)(3)
2237 - stfd 25,((JB_FPRS+11)*8)(3)
2238 - std 26,((JB_GPRS+12)*8)(3)
2239 - stfd 26,((JB_FPRS+12)*8)(3)
2240 - std 27,((JB_GPRS+13)*8)(3)
2241 - stfd 27,((JB_FPRS+13)*8)(3)
2242 - std 28,((JB_GPRS+14)*8)(3)
2243 - stfd 28,((JB_FPRS+14)*8)(3)
2244 - std 29,((JB_GPRS+15)*8)(3)
2245 - stfd 29,((JB_FPRS+15)*8)(3)
2246 - std 30,((JB_GPRS+16)*8)(3)
2247 - stfd 30,((JB_FPRS+16)*8)(3)
2248 - std 31,((JB_GPRS+17)*8)(3)
2249 - stfd 31,((JB_FPRS+17)*8)(3)
2250 - b JUMPTARGET (__sigjmp_save)
2251 -.size .__sigsetjmp,.-.__sigsetjmp
2252 diff -NurpP dietlibc-0.30_pre20060501.orig/ppc64/start.S dietlibc-0.30_pre20060501-ppc-rename/ppc64/start.S
2253 --- dietlibc-0.30_pre20060501.orig/ppc64/start.S 2006-04-04 07:35:14.000000000 +0200
2254 +++ dietlibc-0.30_pre20060501-ppc-rename/ppc64/start.S 1970-01-01 01:00:00.000000000 +0100
2255 @@ -1,91 +0,0 @@
2256 -#include "dietfeatures.h"
2257 -
2258 - .section ".text"
2259 - .align 2
2260 - .globl ._start
2261 - .type ._start,@function
2262 - .globl _start
2263 - .section ".opd","aw"
2264 -_start:
2265 - .quad ._start
2266 - .quad .TOC.@tocbase, 0
2267 - .previous
2268 -._start:
2269 -
2270 -/*
2271 - .section ".text"
2272 - .align 2
2273 - .globl ._start
2274 - .type ._start,@function
2275 - .globl _start
2276 - .section ".opd","aw"
2277 -_start:
2278 - .quad ._start
2279 - .quad .TOC.@tocbase, 0
2280 - .previous
2281 -._start:
2282 -*/
2283 - /* Save the stack pointer, in case we're statically linked under Linux. */
2284 - mr 9,1
2285 - /* Set up an initial stack frame, and clear the LR. */
2286 - clrrdi 1,1,4
2287 - li 0,0
2288 - stdu 1,-128(1)
2289 - mtlr 0
2290 - std 0,0(1)
2291 -
2292 - /* r9 contains the initial stack pointer
2293 - argc = (r9)
2294 - argv = (r9+4)
2295 - envp = argv+(argc+1)*4 */
2296 -
2297 - lis 14,__libc_stack_end@highesta
2298 - ori 14,14,__libc_stack_end@highera
2299 - sldi 14,14,32
2300 - oris 14,14,__libc_stack_end@ha
2301 - std 9,__libc_stack_end@l(14)
2302 -
2303 - ldu 3,0(9) /* argc */
2304 - addi 4,9,8 /* argv */
2305 - add 5,0,3 /* argc... */
2306 - addi 5,5,1 /* argc+1...*/
2307 - slwi 5,5,3 /* (argc+1)*8 */
2308 - add 5,5,4 /* argv+(argc+1)*8 */
2309 -
2310 - lis 14,environ@highesta
2311 - ori 14,14,environ@highera
2312 - sldi 14,14,32
2313 - oris 14,14,environ@ha
2314 - std 5,environ@l(14)
2315 -
2316 -#ifdef WANT_DYNAMIC
2317 -/* #warning dynamic */
2318 - mr 6,7
2319 - bl ._dyn_start
2320 -#else
2321 -/* #warning static */
2322 -#define DOTIFY(name) .##name
2323 - bl DOTIFY(CALL_IN_STARTCODE)
2324 -#endif
2325 - b .exit
2326 -
2327 -.LT_start:
2328 - .long 0
2329 - .quad 0x000c000000000000 | 0x0000200000000000 | 0x0000004000000000
2330 - .long .LT_start-._start
2331 - .short .LT_start_name_end-.LT_start_name_start
2332 -.LT_start_name_start:
2333 - .ascii "_start"
2334 -.LT_start_name_end:
2335 - .align 2
2336 - .size _start,.-_start
2337 -
2338 -/* Define a symbol for the first piece of initialized data. */
2339 - .section ".data"
2340 -__data_start:
2341 -
2342 -/* this is needed for libgcc_eh.a - see gcc-3.4/gcc/config/rs6000/linux-unwind.h */
2343 - .weak __libc_stack_end
2344 - .lcomm __libc_stack_end,8,8
2345 - .type __libc_stack_end,@object
2346 -
2347 diff -NurpP dietlibc-0.30_pre20060501.orig/ppc64/syscalls.h dietlibc-0.30_pre20060501-ppc-rename/ppc64/syscalls.h
2348 --- dietlibc-0.30_pre20060501.orig/ppc64/syscalls.h 2005-09-21 09:33:08.000000000 +0200
2349 +++ dietlibc-0.30_pre20060501-ppc-rename/ppc64/syscalls.h 1970-01-01 01:00:00.000000000 +0100
2350 @@ -1,317 +0,0 @@
2351 -
2352 -#define __NR_exit 1
2353 -#define __NR_fork 2
2354 -#define __NR_read 3
2355 -#define __NR_write 4
2356 -#define __NR_open 5
2357 -#define __NR_close 6
2358 -#define __NR_waitpid 7
2359 -#define __NR_creat 8
2360 -#define __NR_link 9
2361 -#define __NR_unlink 10
2362 -#define __NR_execve 11
2363 -#define __NR_chdir 12
2364 -#define __NR_time 13
2365 -#define __NR_mknod 14
2366 -#define __NR_chmod 15
2367 -#define __NR_lchown 16
2368 -#define __NR_break 17
2369 -#define __NR_oldstat 18
2370 -#define __NR_lseek 19
2371 -#define __NR_getpid 20
2372 -#define __NR_mount 21
2373 -#define __NR_umount 22
2374 -#define __NR_setuid 23
2375 -#define __NR_getuid 24
2376 -#define __NR_stime 25
2377 -#define __NR_ptrace 26
2378 -#define __NR_alarm 27
2379 -#define __NR_oldfstat 28
2380 -#define __NR_pause 29
2381 -#define __NR_utime 30
2382 -#define __NR_stty 31
2383 -#define __NR_gtty 32
2384 -#define __NR_access 33
2385 -#define __NR_nice 34
2386 -#define __NR_ftime 35
2387 -#define __NR_sync 36
2388 -#define __NR_kill 37
2389 -#define __NR_rename 38
2390 -#define __NR_mkdir 39
2391 -#define __NR_rmdir 40
2392 -#define __NR_dup 41
2393 -#define __NR_pipe 42
2394 -#define __NR_times 43
2395 -#define __NR_prof 44
2396 -#define __NR_brk 45
2397 -#define __NR_setgid 46
2398 -#define __NR_getgid 47
2399 -#define __NR_signal 48
2400 -#define __NR_geteuid 49
2401 -#define __NR_getegid 50
2402 -#define __NR_acct 51
2403 -#define __NR_umount2 52
2404 -#define __NR_lock 53
2405 -#define __NR_ioctl 54
2406 -#define __NR_fcntl 55
2407 -#define __NR_mpx 56
2408 -#define __NR_setpgid 57
2409 -#define __NR_ulimit 58
2410 -#define __NR_oldolduname 59
2411 -#define __NR_umask 60
2412 -#define __NR_chroot 61
2413 -#define __NR_ustat 62
2414 -#define __NR_dup2 63
2415 -#define __NR_getppid 64
2416 -#define __NR_getpgrp 65
2417 -#define __NR_setsid 66
2418 -#define __NR_sigaction 67
2419 -#define __NR_sgetmask 68
2420 -#define __NR_ssetmask 69
2421 -#define __NR_setreuid 70
2422 -#define __NR_setregid 71
2423 -#define __NR_sigsuspend 72
2424 -#define __NR_sigpending 73
2425 -#define __NR_sethostname 74
2426 -#define __NR_setrlimit 75
2427 -#define __NR_getrlimit 76
2428 -#define __NR_getrusage 77
2429 -#define __NR_gettimeofday 78
2430 -#define __NR_settimeofday 79
2431 -#define __NR_getgroups 80
2432 -#define __NR_setgroups 81
2433 -#define __NR_select 82
2434 -#define __NR_symlink 83
2435 -#define __NR_oldlstat 84
2436 -#define __NR_readlink 85
2437 -#define __NR_uselib 86
2438 -#define __NR_swapon 87
2439 -#define __NR_reboot 88
2440 -#define __NR_readdir 89
2441 -#define __NR_mmap 90
2442 -#define __NR_munmap 91
2443 -#define __NR_truncate 92
2444 -#define __NR_ftruncate 93
2445 -#define __NR_fchmod 94
2446 -#define __NR_fchown 95
2447 -#define __NR_getpriority 96
2448 -#define __NR_setpriority 97
2449 -#define __NR_profil 98
2450 -#define __NR_statfs 99
2451 -#define __NR_fstatfs 100
2452 -#define __NR_ioperm 101
2453 -#define __NR_socketcall 102
2454 -#define __NR_syslog 103
2455 -#define __NR_setitimer 104
2456 -#define __NR_getitimer 105
2457 -#define __NR_stat 106
2458 -#define __NR_lstat 107
2459 -#define __NR_fstat 108
2460 -#define __NR_olduname 109
2461 -#define __NR_iopl 110
2462 -#define __NR_vhangup 111
2463 -#define __NR_idle 112
2464 -#define __NR_vm86 113
2465 -#define __NR_wait4 114
2466 -#define __NR_swapoff 115
2467 -#define __NR_sysinfo 116
2468 -#define __NR_ipc 117
2469 -#define __NR_fsync 118
2470 -#define __NR_sigreturn 119
2471 -#define __NR_clone 120
2472 -#define __NR_setdomainname 121
2473 -#define __NR_uname 122
2474 -#define __NR_modify_ldt 123
2475 -#define __NR_adjtimex 124
2476 -#define __NR_mprotect 125
2477 -#define __NR_sigprocmask 126
2478 -#define __NR_create_module 127
2479 -#define __NR_init_module 128
2480 -#define __NR_delete_module 129
2481 -#define __NR_get_kernel_syms 130
2482 -#define __NR_quotactl 131
2483 -#define __NR_getpgid 132
2484 -#define __NR_fchdir 133
2485 -#define __NR_bdflush 134
2486 -#define __NR_sysfs 135
2487 -#define __NR_personality 136
2488 -#define __NR_afs_syscall 137 /* Syscall for Andrew File System */
2489 -#define __NR_setfsuid 138
2490 -#define __NR_setfsgid 139
2491 -#define __NR__llseek 140
2492 -#define __NR_getdents 141
2493 -#define __NR__newselect 142
2494 -#define __NR_flock 143
2495 -#define __NR_msync 144
2496 -#define __NR_readv 145
2497 -#define __NR_writev 146
2498 -#define __NR_getsid 147
2499 -#define __NR_fdatasync 148
2500 -#define __NR__sysctl 149
2501 -#define __NR_mlock 150
2502 -#define __NR_munlock 151
2503 -#define __NR_mlockall 152
2504 -#define __NR_munlockall 153
2505 -#define __NR_sched_setparam 154
2506 -#define __NR_sched_getparam 155
2507 -#define __NR_sched_setscheduler 156
2508 -#define __NR_sched_getscheduler 157
2509 -#define __NR_sched_yield 158
2510 -#define __NR_sched_get_priority_max 159
2511 -#define __NR_sched_get_priority_min 160
2512 -#define __NR_sched_rr_get_interval 161
2513 -#define __NR_nanosleep 162
2514 -#define __NR_mremap 163
2515 -#define __NR_setresuid 164
2516 -#define __NR_getresuid 165
2517 -#define __NR_query_module 166
2518 -#define __NR_poll 167
2519 -#define __NR_nfsservctl 168
2520 -#define __NR_setresgid 169
2521 -#define __NR_getresgid 170
2522 -#define __NR_prctl 171
2523 -#define __NR_rt_sigreturn 172
2524 -#define __NR_rt_sigaction 173
2525 -#define __NR_rt_sigprocmask 174
2526 -#define __NR_rt_sigpending 175
2527 -#define __NR_rt_sigtimedwait 176
2528 -#define __NR_rt_sigqueueinfo 177
2529 -#define __NR_rt_sigsuspend 178
2530 -#define __NR_pread 179
2531 -#define __NR_pwrite 180
2532 -#define __NR_chown 181
2533 -#define __NR_getcwd 182
2534 -#define __NR_capget 183
2535 -#define __NR_capset 184
2536 -#define __NR_sigaltstack 185
2537 -#define __NR_sendfile 186
2538 -#define __NR_getpmsg 187 /* some people actually want streams */
2539 -#define __NR_putpmsg 188 /* some people actually want streams */
2540 -#define __NR_vfork 189
2541 -#define __NR_ugetrlimit 190 /* SuS compliant getrlimit */
2542 -#define __NR_readahead 191
2543 -/* #define __NR_mmap2 192 32bit only */
2544 -/* #define __NR_truncate64 193 32bit only */
2545 -/* #define __NR_ftruncate64 194 32bit only */
2546 -/* #define __NR_stat64 195 32bit only */
2547 -/* #define __NR_lstat64 196 32bit only */
2548 -/* #define __NR_fstat64 197 32bit only */
2549 -#define __NR_pciconfig_read 198
2550 -#define __NR_pciconfig_write 199
2551 -#define __NR_pciconfig_iobase 200
2552 -#define __NR_multiplexer 201
2553 -#define __NR_getdents64 202
2554 -#define __NR_pivot_root 203
2555 -/* #define __NR_fcntl64 204 32bit only */
2556 -#define __NR_madvise 205
2557 -#define __NR_mincore 206
2558 -#define __NR_gettid 207
2559 -#define __NR_tkill 208
2560 -#define __NR_setxattr 209
2561 -#define __NR_lsetxattr 210
2562 -#define __NR_fsetxattr 211
2563 -#define __NR_getxattr 212
2564 -#define __NR_lgetxattr 213
2565 -#define __NR_fgetxattr 214
2566 -#define __NR_listxattr 215
2567 -#define __NR_llistxattr 216
2568 -#define __NR_flistxattr 217
2569 -#define __NR_removexattr 218
2570 -#define __NR_lremovexattr 219
2571 -#define __NR_fremovexattr 220
2572 -#define __NR_futex 221
2573 -#define __NR_sched_setaffinity 222
2574 -#define __NR_sched_getaffinity 223
2575 -/* 224 currently unused */
2576 -#define __NR_tuxcall 225
2577 -/* #define __NR_sendfile64 226 32bit only */
2578 -#define __NR_io_setup 227
2579 -#define __NR_io_destroy 228
2580 -#define __NR_io_getevents 229
2581 -#define __NR_io_submit 230
2582 -#define __NR_io_cancel 231
2583 -#define __NR_set_tid_address 232
2584 -#define __NR_fadvise64 233
2585 -#define __NR_exit_group 234
2586 -#define __NR_lookup_dcookie 235
2587 -#define __NR_epoll_create 236
2588 -#define __NR_epoll_ctl 237
2589 -#define __NR_epoll_wait 238
2590 -#define __NR_remap_file_pages 239
2591 -#define __NR_timer_create 240
2592 -#define __NR_timer_settime 241
2593 -#define __NR_timer_gettime 242
2594 -#define __NR_timer_getoverrun 243
2595 -#define __NR_timer_delete 244
2596 -#define __NR_clock_settime 245
2597 -#define __NR_clock_gettime 246
2598 -#define __NR_clock_getres 247
2599 -#define __NR_clock_nanosleep 248
2600 -#define __NR_swapcontext 249
2601 -#define __NR_tgkill 250
2602 -#define __NR_utimes 251
2603 -#define __NR_statfs64 252
2604 -#define __NR_fstatfs64 253
2605 -/* #define __NR_fadvise64_64 254 32bit only */
2606 -#define __NR_rtas 255
2607 -/* Number 256 is reserved for sys_debug_setcontext */
2608 -/* Number 257 is reserved for vserver */
2609 -/* Number 258 is reserved for new sys_remap_file_pages */
2610 -#define __NR_mbind 259
2611 -#define __NR_get_mempolicy 260
2612 -#define __NR_set_mempolicy 261
2613 -#define __NR_mq_open 262
2614 -#define __NR_mq_unlink 263
2615 -#define __NR_mq_timedsend 264
2616 -#define __NR_mq_timedreceive 265
2617 -#define __NR_mq_notify 266
2618 -#define __NR_mq_getsetattr 267
2619 -#define __NR_kexec_load 268
2620 -#define __NR_add_key 269
2621 -#define __NR_request_key 270
2622 -#define __NR_keyctl 271
2623 -#define __NR_waitid 272
2624 -#define __NR_ioprio_set 273
2625 -#define __NR_ioprio_get 274
2626 -#define __NR_inotify_init 275
2627 -#define __NR_inotify_add_watch 276
2628 -#define __NR_inotify_rm_watch 277
2629 -
2630 -
2631 -
2632 -#define __diet_proto_common(sym) \
2633 - .section ".opd","aw"; \
2634 - .align 3; \
2635 -sym: \
2636 - .quad .sym,.TOC.@tocbase,0; \
2637 - .previous; \
2638 - .size sym,24; \
2639 - .type .sym,@function
2640 -
2641 -#define diet_proto_weak(sym) \
2642 - .weak sym; \
2643 - .weak .sym; \
2644 - __diet_proto_common(sym)
2645 -
2646 -#define diet_proto(sym) \
2647 - .globl sym; \
2648 - .globl .sym; \
2649 - __diet_proto_common(sym)
2650 -
2651 -
2652 -#define syscall_weak(name,wsym,sym) \
2653 -.text; \
2654 -diet_proto_weak(wsym); \
2655 -diet_proto(sym); \
2656 -.wsym: \
2657 -.sym: \
2658 - li 0,__NR_##name; \
2659 - b __unified_syscall
2660 -
2661 -#define syscall(name,sym) \
2662 -.text; \
2663 -diet_proto(sym); \
2664 -.sym: \
2665 - li 0,__NR_##name; \
2666 - b __unified_syscall
2667 -
2668 diff -NurpP dietlibc-0.30_pre20060501.orig/ppc64/__testandset.S dietlibc-0.30_pre20060501-ppc-rename/ppc64/__testandset.S
2669 --- dietlibc-0.30_pre20060501.orig/ppc64/__testandset.S 2003-10-10 15:37:34.000000000 +0200
2670 +++ dietlibc-0.30_pre20060501-ppc-rename/ppc64/__testandset.S 1970-01-01 01:00:00.000000000 +0100
2671 @@ -1,12 +0,0 @@
2672 -.global __testandset
2673 -.type __testandset,@function
2674 -.align 2
2675 -__testandset:
2676 -1: lwarx 5,0,3
2677 - li 0,1
2678 - stwcx. 0,0,3
2679 - bne- 1b
2680 - mr 3,5
2681 - blr
2682 -.size __testandset,.-__testandset
2683 -
2684 diff -NurpP dietlibc-0.30_pre20060501.orig/ppc64/umount.S dietlibc-0.30_pre20060501-ppc-rename/ppc64/umount.S
2685 --- dietlibc-0.30_pre20060501.orig/ppc64/umount.S 2004-12-17 19:47:59.000000000 +0100
2686 +++ dietlibc-0.30_pre20060501-ppc-rename/ppc64/umount.S 1970-01-01 01:00:00.000000000 +0100
2687 @@ -1,8 +0,0 @@
2688 -#include "syscalls.h"
2689 -
2690 - .text
2691 -diet_proto(umount)
2692 -.umount:
2693 - li 0, __NR_umount2
2694 - li 4, 0
2695 - b __unified_syscall
2696 diff -NurpP dietlibc-0.30_pre20060501.orig/ppc64/unified.S dietlibc-0.30_pre20060501-ppc-rename/ppc64/unified.S
2697 --- dietlibc-0.30_pre20060501.orig/ppc64/unified.S 2005-05-13 20:39:32.000000000 +0200
2698 +++ dietlibc-0.30_pre20060501-ppc-rename/ppc64/unified.S 1970-01-01 01:00:00.000000000 +0100
2699 @@ -1,71 +0,0 @@
2700 -#include <dietfeatures.h>
2701 -#include "syscalls.h"
2702 -
2703 - .text
2704 -.exit:
2705 - .weak .exit
2706 -._exit:
2707 - li 0,__NR_exit
2708 - .global __unified_syscall
2709 -__unified_syscall:
2710 - sc
2711 - bnslr+
2712 -
2713 - .global error_unified_syscall
2714 -error_unified_syscall:
2715 -
2716 -#ifdef WANT_THREAD_SAFE
2717 - stdu 1,-128(1)
2718 - mflr 0
2719 - std 0,20(1)
2720 - std 3,12(1)
2721 - bl .__errno_location
2722 - ld 0,12(1)
2723 - stw 0,0(3)
2724 - ld 0,20(1)
2725 - mtlr 0
2726 - addi 1,1,128
2727 -#else
2728 - lis 9,errno@highesta
2729 - ori 9,9,errno@highera
2730 - sldi 9,9,32
2731 - oris 9,9,errno@ha
2732 - stw 3,errno@l(9)
2733 -#endif
2734 - li 3,-1
2735 -
2736 -/* here we go and "reuse" the return for weak-void functions */
2737 -//#include "dietuglyweaks.h"
2738 -.__thread_doexit:
2739 - .weak .__thread_doexit
2740 -.__fflush_stdin:
2741 - .weak .__fflush_stdin
2742 -.__fflush_stdout:
2743 - .weak .__fflush_stdout
2744 -.__fflush_stderr:
2745 - .weak .__fflush_stderr
2746 -.flockfile:
2747 - .weak .flockfile
2748 -.funlockfile:
2749 - .weak .funlockfile
2750 -.__nop:
2751 - .weak .__nop
2752 -.__you_tried_to_link_a_dietlibc_object_against_glibc:
2753 - .weak .__you_tried_to_link_a_dietlibc_object_against_glibc
2754 -
2755 - blr
2756 - .long 0
2757 - .byte 0,0,0,1,128,0,0,0
2758 - .size ._exit,.-._exit
2759 - .size .exit,.-.exit
2760 -
2761 -diet_proto_weak(__thread_doexit)
2762 -diet_proto_weak(__fflush_stdin)
2763 -diet_proto_weak(__fflush_stdout)
2764 -diet_proto_weak(__fflush_stderr)
2765 -diet_proto_weak(flockfile)
2766 -diet_proto_weak(funlockfile)
2767 -diet_proto_weak(__nop)
2768 -diet_proto_weak(__you_tried_to_link_a_dietlibc_object_against_glibc)
2769 -diet_proto_weak(exit)
2770 -diet_proto(_exit)
2771 diff -NurpP dietlibc-0.30_pre20060501.orig/syscalls.h dietlibc-0.30_pre20060501-ppc-rename/syscalls.h
2772 --- dietlibc-0.30_pre20060501.orig/syscalls.h 2005-03-15 09:51:22.000000000 +0100
2773 +++ dietlibc-0.30_pre20060501-ppc-rename/syscalls.h 2006-05-01 12:22:21.566468000 +0200
2774 @@ -12,10 +12,10 @@
2775 #endif
2776
2777 #elif defined(__powerpc64__)
2778 -#include "ppc64/syscalls.h"
2779 +#include "powerpc64/syscalls.h"
2780
2781 #elif defined(__powerpc__)
2782 -#include "ppc/syscalls.h"
2783 +#include "powerpc/syscalls.h"
2784
2785 #elif defined(__mips__)
2786 #include "mips/syscalls.h"

  ViewVC Help
Powered by ViewVC 1.1.20