/[vps]/dietlibc/patches/0.30_pre20060621-r0/03_all_ppc-rename.patch
Gentoo

Contents of /dietlibc/patches/0.30_pre20060621-r0/03_all_ppc-rename.patch

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.20