/[vps]/dietlibc/patches/0.30-r2/155_all_rename-ppc64-powerpc64.patch
Gentoo

Contents of /dietlibc/patches/0.30-r2/155_all_rename-ppc64-powerpc64.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 468 - (show annotations) (download)
Fri Sep 8 06:49:23 2006 UTC (7 years, 10 months ago) by hollow
File size: 42765 byte(s)
fix __socketcall on x86 (fixes PIE issues on hardened)
1 diff -NurpP dietlibc-0.30-ppc-rename/diet.c dietlibc-0.30-ppc64-rename/diet.c
2 --- dietlibc-0.30-ppc-rename/diet.c 2006-09-07 12:32:01.080419500 +0200
3 +++ dietlibc-0.30-ppc64-rename/diet.c 2006-09-07 12:35:38.679351000 +0200
4 @@ -36,7 +36,7 @@ static const char* Os[] = {
5 "mips","-Os","-fomit-frame-pointer","-mno-abicalls","-fno-pic","-G","0",0,
6 "mipsel","-Os","-fomit-frame-pointer","-mno-abicalls","-fno-pic","-G","0",0,
7 "powerpc","-Os","-fomit-frame-pointer","-mpowerpc-gpopt","-mpowerpc-gfxopt",0,
8 - "ppc64","-Os","-fomit-frame-pointer","-mpowerpc-gpopt","-mpowerpc-gfxopt",0,
9 + "powerpc64","-Os","-fomit-frame-pointer","-mpowerpc-gpopt","-mpowerpc-gfxopt",0,
10 "s390","-Os","-fomit-frame-pointer",0,
11 "s390x","-Os","-fomit-frame-pointer",0,
12 "sh","-Os","-fomit-frame-pointer",0,
13 @@ -154,7 +154,7 @@ int main(int argc,char *argv[]) {
14 shortplatform="powerpc";
15 #endif
16 #ifdef __powerpc64__
17 - shortplatform="ppc64";
18 + shortplatform="powerpc64";
19 #endif
20 #ifdef __i386__
21 shortplatform="i386";
22 diff -NurpP dietlibc-0.30-ppc-rename/Makefile dietlibc-0.30-ppc64-rename/Makefile
23 --- dietlibc-0.30-ppc-rename/Makefile 2006-09-07 12:44:19.878766750 +0200
24 +++ dietlibc-0.30-ppc64-rename/Makefile 2006-09-07 12:44:54.108906000 +0200
25 @@ -31,7 +31,11 @@ ifeq ($(MYARCH),powerpc)
26 ARCH=powerpc
27 else
28 ifeq ($(MYARCH),ppc64)
29 -ARCH=ppc64
30 +ARCH=powerpc64
31 +MYARCH=powerpc64
32 +else
33 +ifeq ($(MYARCH),powerpc64)
34 +ARCH=powerpc64
35 else
36 ifeq ($(MYARCH),arm)
37 ARCH=arm
38 @@ -85,6 +89,7 @@ endif
39 endif
40 endif
41 endif
42 +endif
43
44 # ARCH=$(MYARCH)
45
46 @@ -391,9 +396,9 @@ uninstall:
47 -rmdir $(DESTDIR)$(ILIBDIR) $(DESTDIR)$(MAN1DIR) $(DESTDIR)$(BINDIR)
48
49 .PHONY: sparc powerpc mips arm alpha i386 parisc mipsel powerpc s390 sparc64
50 -.PHONY: x86_64 ia64 ppc64 s390x
51 +.PHONY: x86_64 ia64 powerpc64 s390x
52
53 -arm sparc alpha mips parisc s390 sparc64 x86_64 ia64 ppc64 s390x:
54 +arm sparc alpha mips parisc s390 sparc64 x86_64 ia64 powerpc64 s390x:
55 $(MAKE) ARCH=$@ CROSS=$@-linux- all
56
57 i386:
58 @@ -404,7 +409,7 @@ else
59 endif
60
61 powerpc:
62 -ifeq ($(MYARCH),ppc64)
63 +ifeq ($(MYARCH),powerpc64)
64 $(MAKE) ARCH=$@ CC="$(CC) -m32" all
65 else
66 $(MAKE) ARCH=$@ CROSS=$@-linux- all
67 diff -NurpP dietlibc-0.30-ppc-rename/powerpc64/clone.S dietlibc-0.30-ppc64-rename/powerpc64/clone.S
68 --- dietlibc-0.30-ppc-rename/powerpc64/clone.S 1970-01-01 01:00:00.000000000 +0100
69 +++ dietlibc-0.30-ppc64-rename/powerpc64/clone.S 2006-09-07 12:24:13.091172000 +0200
70 @@ -0,0 +1,56 @@
71 +#include <dietfeatures.h>
72 +#include "syscalls.h"
73 +#include <errno.h>
74 +
75 +.text
76 +.weak clone
77 +clone:
78 +.global __clone
79 +__clone:
80 + cmpwi 4,0 /* check have non null child_stack pointer */
81 + cmpwi cr1, 3,0 /* check have non null thread_funcion */
82 + cror eq,4*cr1+eq,eq /* now if eq is set one is or both are zero */
83 + beq .Lclone_error
84 +
85 + stdu 1,-64(1) /* alloc some space on the stack */
86 + std 29, 16(1) /* save r29,r30,r31 on stack */
87 + std 30, 24(1)
88 + std 31, 32(1)
89 +
90 + rlwinm 4,4,0,0,27 /* mask out lower 4 bits */
91 +
92 + /* move parameter to positions clone wants them */
93 + mr 29,3 /* r29 = r3 fn */
94 + mr 30,4 /* r30 = r4 stack */
95 + mr 31,6 /* r31 = r6 arg */
96 + mr 3, 5 /* r3 = r5 flags */
97 +
98 + li 0, __NR_clone /* load syscall nr. */
99 + sc
100 +
101 + cmpwi cr1,3,0 /* compare return of syscall with 0 */
102 + crandc 4*cr1+eq,4*cr1+eq,so
103 + bne .Lclone_parent /* return was non zero -> .Lclone_parent */
104 +
105 + /* we are the cloned process */
106 + mr 1, 30 /* set stack pointer */
107 + mtctr 29 /* set count register to fn ? */
108 + mr 3, 31 /* set argument */
109 + bctrl /* branch trough count register and link */
110 + b _exit /* exit thread */
111 +
112 +.Lclone_parent:
113 + ld 29,16(1) /* restore saved registers */
114 + ld 30,24(1)
115 + ld 31,32(1)
116 + addi 1, 1,64 /* free stack */
117 + bnslr+ /* had cloned a thread so return to parent */
118 + b error_unified_syscall
119 +
120 +.Lclone_error:
121 + li 3, EINVAL
122 + b error_unified_syscall
123 +
124 +#ifdef __ELF__
125 +.section .note.GNU-stack,"",%progbits
126 +#endif
127 diff -NurpP dietlibc-0.30-ppc-rename/powerpc64/__longjmp.S dietlibc-0.30-ppc64-rename/powerpc64/__longjmp.S
128 --- dietlibc-0.30-ppc-rename/powerpc64/__longjmp.S 1970-01-01 01:00:00.000000000 +0100
129 +++ dietlibc-0.30-ppc64-rename/powerpc64/__longjmp.S 2006-09-07 12:24:13.091172000 +0200
130 @@ -0,0 +1,58 @@
131 +#include <setjmp.h>
132 +
133 + .quad .__longjmp,.TOC.@tocbase,0
134 + .text
135 + .size __longjmp,24
136 + .type .__longjmp,@function
137 + .globl .__longjmp
138 +.align 2
139 +.__longjmp:
140 + ld 1,(JB_GPR1*8)(3)
141 + ld 2,(JB_GPR2*8)(3)
142 + ld 0,(JB_LR*8)(3)
143 + ld 14,((JB_GPRS+0)*8)(3)
144 + lfd 14,((JB_FPRS+0)*8)(3)
145 + ld 15,((JB_GPRS+1)*8)(3)
146 + lfd 15,((JB_FPRS+1)*8)(3)
147 + ld 16,((JB_GPRS+2)*8)(3)
148 + lfd 16,((JB_FPRS+2)*8)(3)
149 + ld 17,((JB_GPRS+3)*8)(3)
150 + lfd 17,((JB_FPRS+3)*8)(3)
151 + ld 18,((JB_GPRS+4)*8)(3)
152 + lfd 18,((JB_FPRS+4)*8)(3)
153 + ld 19,((JB_GPRS+5)*8)(3)
154 + lfd 19,((JB_FPRS+5)*8)(3)
155 + ld 20,((JB_GPRS+6)*8)(3)
156 + lfd 20,((JB_FPRS+6)*8)(3)
157 + mtlr 0
158 + ld 21,((JB_GPRS+7)*8)(3)
159 + lfd 21,((JB_FPRS+7)*8)(3)
160 + ld 22,((JB_GPRS+8)*8)(3)
161 + lfd 22,((JB_FPRS+8)*8)(3)
162 + ld 0,(JB_CR*8)(3)
163 + ld 23,((JB_GPRS+9)*8)(3)
164 + lfd 23,((JB_FPRS+9)*8)(3)
165 + ld 24,((JB_GPRS+10)*8)(3)
166 + lfd 24,((JB_FPRS+10)*8)(3)
167 + ld 25,((JB_GPRS+11)*8)(3)
168 + lfd 25,((JB_FPRS+11)*8)(3)
169 + mtcrf 0xFF,0
170 + ld 26,((JB_GPRS+12)*8)(3)
171 + lfd 26,((JB_FPRS+12)*8)(3)
172 + ld 27,((JB_GPRS+13)*8)(3)
173 + lfd 27,((JB_FPRS+13)*8)(3)
174 + ld 28,((JB_GPRS+14)*8)(3)
175 + lfd 28,((JB_FPRS+14)*8)(3)
176 + ld 29,((JB_GPRS+15)*8)(3)
177 + lfd 29,((JB_FPRS+15)*8)(3)
178 + ld 30,((JB_GPRS+16)*8)(3)
179 + lfd 30,((JB_FPRS+16)*8)(3)
180 + ld 31,((JB_GPRS+17)*8)(3)
181 + lfd 31,((JB_FPRS+17)*8)(3)
182 + mr 3,4
183 + blr
184 +.size .__longjmp,.-.__longjmp
185 +
186 +#ifdef __ELF__
187 +.section .note.GNU-stack,"",%progbits
188 +#endif
189 diff -NurpP dietlibc-0.30-ppc-rename/powerpc64/Makefile.add dietlibc-0.30-ppc64-rename/powerpc64/Makefile.add
190 --- dietlibc-0.30-ppc-rename/powerpc64/Makefile.add 1970-01-01 01:00:00.000000000 +0100
191 +++ dietlibc-0.30-ppc64-rename/powerpc64/Makefile.add 2006-05-07 06:16:59.000000000 +0200
192 @@ -0,0 +1,5 @@
193 +
194 +CFLAGS+=-Os -mpowerpc64
195 +VPATH:=ppc64:syscalls.s:$(VPATH)
196 +
197 +CC+=-m64
198 diff -NurpP dietlibc-0.30-ppc-rename/powerpc64/setjmp.S dietlibc-0.30-ppc64-rename/powerpc64/setjmp.S
199 --- dietlibc-0.30-ppc-rename/powerpc64/setjmp.S 1970-01-01 01:00:00.000000000 +0100
200 +++ dietlibc-0.30-ppc64-rename/powerpc64/setjmp.S 2006-09-07 12:24:13.091172000 +0200
201 @@ -0,0 +1,63 @@
202 +#include <setjmp.h>
203 +
204 +#ifdef PIC
205 +#define JUMPTARGET(name) name##@plt
206 +#else
207 +#define JUMPTARGET(name) .name
208 +#endif
209 +
210 + .quad .__sigsetjmp,.TOC.@tocbase,0
211 + .text
212 + .size __sigsetjmp,24
213 + .type .__sigsetjmp,@function
214 + .globl .__sigsetjmp
215 +.align 2
216 +.__sigsetjmp:
217 + std 1,(JB_GPR1*8)(3)
218 + mflr 0
219 + std 2,(JB_GPR2*8)(3)
220 + std 14,((JB_GPRS+0)*8)(3)
221 + stfd 14,((JB_FPRS+0)*8)(3)
222 + std 0,(JB_LR*8)(3)
223 + std 15,((JB_GPRS+1)*8)(3)
224 + stfd 15,((JB_FPRS+1)*8)(3)
225 + mfcr 0
226 + std 16,((JB_GPRS+2)*8)(3)
227 + stfd 16,((JB_FPRS+2)*8)(3)
228 + std 0,(JB_CR*8)(3)
229 + std 17,((JB_GPRS+3)*8)(3)
230 + stfd 17,((JB_FPRS+3)*8)(3)
231 + std 18,((JB_GPRS+4)*8)(3)
232 + stfd 18,((JB_FPRS+4)*8)(3)
233 + std 19,((JB_GPRS+5)*8)(3)
234 + stfd 19,((JB_FPRS+5)*8)(3)
235 + std 20,((JB_GPRS+6)*8)(3)
236 + stfd 20,((JB_FPRS+6)*8)(3)
237 + std 21,((JB_GPRS+7)*8)(3)
238 + stfd 21,((JB_FPRS+7)*8)(3)
239 + std 22,((JB_GPRS+8)*8)(3)
240 + stfd 22,((JB_FPRS+8)*8)(3)
241 + std 23,((JB_GPRS+9)*8)(3)
242 + stfd 23,((JB_FPRS+9)*8)(3)
243 + std 24,((JB_GPRS+10)*8)(3)
244 + stfd 24,((JB_FPRS+10)*8)(3)
245 + std 25,((JB_GPRS+11)*8)(3)
246 + stfd 25,((JB_FPRS+11)*8)(3)
247 + std 26,((JB_GPRS+12)*8)(3)
248 + stfd 26,((JB_FPRS+12)*8)(3)
249 + std 27,((JB_GPRS+13)*8)(3)
250 + stfd 27,((JB_FPRS+13)*8)(3)
251 + std 28,((JB_GPRS+14)*8)(3)
252 + stfd 28,((JB_FPRS+14)*8)(3)
253 + std 29,((JB_GPRS+15)*8)(3)
254 + stfd 29,((JB_FPRS+15)*8)(3)
255 + std 30,((JB_GPRS+16)*8)(3)
256 + stfd 30,((JB_FPRS+16)*8)(3)
257 + std 31,((JB_GPRS+17)*8)(3)
258 + stfd 31,((JB_FPRS+17)*8)(3)
259 + b JUMPTARGET (__sigjmp_save)
260 +.size .__sigsetjmp,.-.__sigsetjmp
261 +
262 +#ifdef __ELF__
263 +.section .note.GNU-stack,"",%progbits
264 +#endif
265 diff -NurpP dietlibc-0.30-ppc-rename/powerpc64/start.S dietlibc-0.30-ppc64-rename/powerpc64/start.S
266 --- dietlibc-0.30-ppc-rename/powerpc64/start.S 1970-01-01 01:00:00.000000000 +0100
267 +++ dietlibc-0.30-ppc64-rename/powerpc64/start.S 2006-09-07 12:24:13.091172000 +0200
268 @@ -0,0 +1,95 @@
269 +#include "dietfeatures.h"
270 +
271 + .section ".text"
272 + .align 2
273 + .globl ._start
274 + .type ._start,@function
275 + .globl _start
276 + .section ".opd","aw"
277 +_start:
278 + .quad ._start
279 + .quad .TOC.@tocbase, 0
280 + .previous
281 +._start:
282 +
283 +/*
284 + .section ".text"
285 + .align 2
286 + .globl ._start
287 + .type ._start,@function
288 + .globl _start
289 + .section ".opd","aw"
290 +_start:
291 + .quad ._start
292 + .quad .TOC.@tocbase, 0
293 + .previous
294 +._start:
295 +*/
296 + /* Save the stack pointer, in case we're statically linked under Linux. */
297 + mr 9,1
298 + /* Set up an initial stack frame, and clear the LR. */
299 + clrrdi 1,1,4
300 + li 0,0
301 + stdu 1,-128(1)
302 + mtlr 0
303 + std 0,0(1)
304 +
305 + /* r9 contains the initial stack pointer
306 + argc = (r9)
307 + argv = (r9+4)
308 + envp = argv+(argc+1)*4 */
309 +
310 + lis 14,__libc_stack_end@highesta
311 + ori 14,14,__libc_stack_end@highera
312 + sldi 14,14,32
313 + oris 14,14,__libc_stack_end@ha
314 + std 9,__libc_stack_end@l(14)
315 +
316 + ldu 3,0(9) /* argc */
317 + addi 4,9,8 /* argv */
318 + add 5,0,3 /* argc... */
319 + addi 5,5,1 /* argc+1...*/
320 + slwi 5,5,3 /* (argc+1)*8 */
321 + add 5,5,4 /* argv+(argc+1)*8 */
322 +
323 + lis 14,environ@highesta
324 + ori 14,14,environ@highera
325 + sldi 14,14,32
326 + oris 14,14,environ@ha
327 + std 5,environ@l(14)
328 +
329 +#ifdef WANT_DYNAMIC
330 +/* #warning dynamic */
331 + mr 6,7
332 + bl ._dyn_start
333 +#else
334 +/* #warning static */
335 +#define DOTIFY(name) .##name
336 + bl DOTIFY(CALL_IN_STARTCODE)
337 +#endif
338 + b .exit
339 +
340 +.LT_start:
341 + .long 0
342 + .quad 0x000c000000000000 | 0x0000200000000000 | 0x0000004000000000
343 + .long .LT_start-._start
344 + .short .LT_start_name_end-.LT_start_name_start
345 +.LT_start_name_start:
346 + .ascii "_start"
347 +.LT_start_name_end:
348 + .align 2
349 + .size _start,.-_start
350 +
351 +/* Define a symbol for the first piece of initialized data. */
352 + .section ".data"
353 +__data_start:
354 +
355 +/* this is needed for libgcc_eh.a - see gcc-3.4/gcc/config/rs6000/linux-unwind.h */
356 + .weak __libc_stack_end
357 + .lcomm __libc_stack_end,8,8
358 + .type __libc_stack_end,@object
359 +
360 +
361 +#ifdef __ELF__
362 +.section .note.GNU-stack,"",%progbits
363 +#endif
364 diff -NurpP dietlibc-0.30-ppc-rename/powerpc64/syscalls.h dietlibc-0.30-ppc64-rename/powerpc64/syscalls.h
365 --- dietlibc-0.30-ppc-rename/powerpc64/syscalls.h 1970-01-01 01:00:00.000000000 +0100
366 +++ dietlibc-0.30-ppc64-rename/powerpc64/syscalls.h 2005-09-21 09:33:08.000000000 +0200
367 @@ -0,0 +1,317 @@
368 +
369 +#define __NR_exit 1
370 +#define __NR_fork 2
371 +#define __NR_read 3
372 +#define __NR_write 4
373 +#define __NR_open 5
374 +#define __NR_close 6
375 +#define __NR_waitpid 7
376 +#define __NR_creat 8
377 +#define __NR_link 9
378 +#define __NR_unlink 10
379 +#define __NR_execve 11
380 +#define __NR_chdir 12
381 +#define __NR_time 13
382 +#define __NR_mknod 14
383 +#define __NR_chmod 15
384 +#define __NR_lchown 16
385 +#define __NR_break 17
386 +#define __NR_oldstat 18
387 +#define __NR_lseek 19
388 +#define __NR_getpid 20
389 +#define __NR_mount 21
390 +#define __NR_umount 22
391 +#define __NR_setuid 23
392 +#define __NR_getuid 24
393 +#define __NR_stime 25
394 +#define __NR_ptrace 26
395 +#define __NR_alarm 27
396 +#define __NR_oldfstat 28
397 +#define __NR_pause 29
398 +#define __NR_utime 30
399 +#define __NR_stty 31
400 +#define __NR_gtty 32
401 +#define __NR_access 33
402 +#define __NR_nice 34
403 +#define __NR_ftime 35
404 +#define __NR_sync 36
405 +#define __NR_kill 37
406 +#define __NR_rename 38
407 +#define __NR_mkdir 39
408 +#define __NR_rmdir 40
409 +#define __NR_dup 41
410 +#define __NR_pipe 42
411 +#define __NR_times 43
412 +#define __NR_prof 44
413 +#define __NR_brk 45
414 +#define __NR_setgid 46
415 +#define __NR_getgid 47
416 +#define __NR_signal 48
417 +#define __NR_geteuid 49
418 +#define __NR_getegid 50
419 +#define __NR_acct 51
420 +#define __NR_umount2 52
421 +#define __NR_lock 53
422 +#define __NR_ioctl 54
423 +#define __NR_fcntl 55
424 +#define __NR_mpx 56
425 +#define __NR_setpgid 57
426 +#define __NR_ulimit 58
427 +#define __NR_oldolduname 59
428 +#define __NR_umask 60
429 +#define __NR_chroot 61
430 +#define __NR_ustat 62
431 +#define __NR_dup2 63
432 +#define __NR_getppid 64
433 +#define __NR_getpgrp 65
434 +#define __NR_setsid 66
435 +#define __NR_sigaction 67
436 +#define __NR_sgetmask 68
437 +#define __NR_ssetmask 69
438 +#define __NR_setreuid 70
439 +#define __NR_setregid 71
440 +#define __NR_sigsuspend 72
441 +#define __NR_sigpending 73
442 +#define __NR_sethostname 74
443 +#define __NR_setrlimit 75
444 +#define __NR_getrlimit 76
445 +#define __NR_getrusage 77
446 +#define __NR_gettimeofday 78
447 +#define __NR_settimeofday 79
448 +#define __NR_getgroups 80
449 +#define __NR_setgroups 81
450 +#define __NR_select 82
451 +#define __NR_symlink 83
452 +#define __NR_oldlstat 84
453 +#define __NR_readlink 85
454 +#define __NR_uselib 86
455 +#define __NR_swapon 87
456 +#define __NR_reboot 88
457 +#define __NR_readdir 89
458 +#define __NR_mmap 90
459 +#define __NR_munmap 91
460 +#define __NR_truncate 92
461 +#define __NR_ftruncate 93
462 +#define __NR_fchmod 94
463 +#define __NR_fchown 95
464 +#define __NR_getpriority 96
465 +#define __NR_setpriority 97
466 +#define __NR_profil 98
467 +#define __NR_statfs 99
468 +#define __NR_fstatfs 100
469 +#define __NR_ioperm 101
470 +#define __NR_socketcall 102
471 +#define __NR_syslog 103
472 +#define __NR_setitimer 104
473 +#define __NR_getitimer 105
474 +#define __NR_stat 106
475 +#define __NR_lstat 107
476 +#define __NR_fstat 108
477 +#define __NR_olduname 109
478 +#define __NR_iopl 110
479 +#define __NR_vhangup 111
480 +#define __NR_idle 112
481 +#define __NR_vm86 113
482 +#define __NR_wait4 114
483 +#define __NR_swapoff 115
484 +#define __NR_sysinfo 116
485 +#define __NR_ipc 117
486 +#define __NR_fsync 118
487 +#define __NR_sigreturn 119
488 +#define __NR_clone 120
489 +#define __NR_setdomainname 121
490 +#define __NR_uname 122
491 +#define __NR_modify_ldt 123
492 +#define __NR_adjtimex 124
493 +#define __NR_mprotect 125
494 +#define __NR_sigprocmask 126
495 +#define __NR_create_module 127
496 +#define __NR_init_module 128
497 +#define __NR_delete_module 129
498 +#define __NR_get_kernel_syms 130
499 +#define __NR_quotactl 131
500 +#define __NR_getpgid 132
501 +#define __NR_fchdir 133
502 +#define __NR_bdflush 134
503 +#define __NR_sysfs 135
504 +#define __NR_personality 136
505 +#define __NR_afs_syscall 137 /* Syscall for Andrew File System */
506 +#define __NR_setfsuid 138
507 +#define __NR_setfsgid 139
508 +#define __NR__llseek 140
509 +#define __NR_getdents 141
510 +#define __NR__newselect 142
511 +#define __NR_flock 143
512 +#define __NR_msync 144
513 +#define __NR_readv 145
514 +#define __NR_writev 146
515 +#define __NR_getsid 147
516 +#define __NR_fdatasync 148
517 +#define __NR__sysctl 149
518 +#define __NR_mlock 150
519 +#define __NR_munlock 151
520 +#define __NR_mlockall 152
521 +#define __NR_munlockall 153
522 +#define __NR_sched_setparam 154
523 +#define __NR_sched_getparam 155
524 +#define __NR_sched_setscheduler 156
525 +#define __NR_sched_getscheduler 157
526 +#define __NR_sched_yield 158
527 +#define __NR_sched_get_priority_max 159
528 +#define __NR_sched_get_priority_min 160
529 +#define __NR_sched_rr_get_interval 161
530 +#define __NR_nanosleep 162
531 +#define __NR_mremap 163
532 +#define __NR_setresuid 164
533 +#define __NR_getresuid 165
534 +#define __NR_query_module 166
535 +#define __NR_poll 167
536 +#define __NR_nfsservctl 168
537 +#define __NR_setresgid 169
538 +#define __NR_getresgid 170
539 +#define __NR_prctl 171
540 +#define __NR_rt_sigreturn 172
541 +#define __NR_rt_sigaction 173
542 +#define __NR_rt_sigprocmask 174
543 +#define __NR_rt_sigpending 175
544 +#define __NR_rt_sigtimedwait 176
545 +#define __NR_rt_sigqueueinfo 177
546 +#define __NR_rt_sigsuspend 178
547 +#define __NR_pread 179
548 +#define __NR_pwrite 180
549 +#define __NR_chown 181
550 +#define __NR_getcwd 182
551 +#define __NR_capget 183
552 +#define __NR_capset 184
553 +#define __NR_sigaltstack 185
554 +#define __NR_sendfile 186
555 +#define __NR_getpmsg 187 /* some people actually want streams */
556 +#define __NR_putpmsg 188 /* some people actually want streams */
557 +#define __NR_vfork 189
558 +#define __NR_ugetrlimit 190 /* SuS compliant getrlimit */
559 +#define __NR_readahead 191
560 +/* #define __NR_mmap2 192 32bit only */
561 +/* #define __NR_truncate64 193 32bit only */
562 +/* #define __NR_ftruncate64 194 32bit only */
563 +/* #define __NR_stat64 195 32bit only */
564 +/* #define __NR_lstat64 196 32bit only */
565 +/* #define __NR_fstat64 197 32bit only */
566 +#define __NR_pciconfig_read 198
567 +#define __NR_pciconfig_write 199
568 +#define __NR_pciconfig_iobase 200
569 +#define __NR_multiplexer 201
570 +#define __NR_getdents64 202
571 +#define __NR_pivot_root 203
572 +/* #define __NR_fcntl64 204 32bit only */
573 +#define __NR_madvise 205
574 +#define __NR_mincore 206
575 +#define __NR_gettid 207
576 +#define __NR_tkill 208
577 +#define __NR_setxattr 209
578 +#define __NR_lsetxattr 210
579 +#define __NR_fsetxattr 211
580 +#define __NR_getxattr 212
581 +#define __NR_lgetxattr 213
582 +#define __NR_fgetxattr 214
583 +#define __NR_listxattr 215
584 +#define __NR_llistxattr 216
585 +#define __NR_flistxattr 217
586 +#define __NR_removexattr 218
587 +#define __NR_lremovexattr 219
588 +#define __NR_fremovexattr 220
589 +#define __NR_futex 221
590 +#define __NR_sched_setaffinity 222
591 +#define __NR_sched_getaffinity 223
592 +/* 224 currently unused */
593 +#define __NR_tuxcall 225
594 +/* #define __NR_sendfile64 226 32bit only */
595 +#define __NR_io_setup 227
596 +#define __NR_io_destroy 228
597 +#define __NR_io_getevents 229
598 +#define __NR_io_submit 230
599 +#define __NR_io_cancel 231
600 +#define __NR_set_tid_address 232
601 +#define __NR_fadvise64 233
602 +#define __NR_exit_group 234
603 +#define __NR_lookup_dcookie 235
604 +#define __NR_epoll_create 236
605 +#define __NR_epoll_ctl 237
606 +#define __NR_epoll_wait 238
607 +#define __NR_remap_file_pages 239
608 +#define __NR_timer_create 240
609 +#define __NR_timer_settime 241
610 +#define __NR_timer_gettime 242
611 +#define __NR_timer_getoverrun 243
612 +#define __NR_timer_delete 244
613 +#define __NR_clock_settime 245
614 +#define __NR_clock_gettime 246
615 +#define __NR_clock_getres 247
616 +#define __NR_clock_nanosleep 248
617 +#define __NR_swapcontext 249
618 +#define __NR_tgkill 250
619 +#define __NR_utimes 251
620 +#define __NR_statfs64 252
621 +#define __NR_fstatfs64 253
622 +/* #define __NR_fadvise64_64 254 32bit only */
623 +#define __NR_rtas 255
624 +/* Number 256 is reserved for sys_debug_setcontext */
625 +/* Number 257 is reserved for vserver */
626 +/* Number 258 is reserved for new sys_remap_file_pages */
627 +#define __NR_mbind 259
628 +#define __NR_get_mempolicy 260
629 +#define __NR_set_mempolicy 261
630 +#define __NR_mq_open 262
631 +#define __NR_mq_unlink 263
632 +#define __NR_mq_timedsend 264
633 +#define __NR_mq_timedreceive 265
634 +#define __NR_mq_notify 266
635 +#define __NR_mq_getsetattr 267
636 +#define __NR_kexec_load 268
637 +#define __NR_add_key 269
638 +#define __NR_request_key 270
639 +#define __NR_keyctl 271
640 +#define __NR_waitid 272
641 +#define __NR_ioprio_set 273
642 +#define __NR_ioprio_get 274
643 +#define __NR_inotify_init 275
644 +#define __NR_inotify_add_watch 276
645 +#define __NR_inotify_rm_watch 277
646 +
647 +
648 +
649 +#define __diet_proto_common(sym) \
650 + .section ".opd","aw"; \
651 + .align 3; \
652 +sym: \
653 + .quad .sym,.TOC.@tocbase,0; \
654 + .previous; \
655 + .size sym,24; \
656 + .type .sym,@function
657 +
658 +#define diet_proto_weak(sym) \
659 + .weak sym; \
660 + .weak .sym; \
661 + __diet_proto_common(sym)
662 +
663 +#define diet_proto(sym) \
664 + .globl sym; \
665 + .globl .sym; \
666 + __diet_proto_common(sym)
667 +
668 +
669 +#define syscall_weak(name,wsym,sym) \
670 +.text; \
671 +diet_proto_weak(wsym); \
672 +diet_proto(sym); \
673 +.wsym: \
674 +.sym: \
675 + li 0,__NR_##name; \
676 + b __unified_syscall
677 +
678 +#define syscall(name,sym) \
679 +.text; \
680 +diet_proto(sym); \
681 +.sym: \
682 + li 0,__NR_##name; \
683 + b __unified_syscall
684 +
685 diff -NurpP dietlibc-0.30-ppc-rename/powerpc64/__testandset.S dietlibc-0.30-ppc64-rename/powerpc64/__testandset.S
686 --- dietlibc-0.30-ppc-rename/powerpc64/__testandset.S 1970-01-01 01:00:00.000000000 +0100
687 +++ dietlibc-0.30-ppc64-rename/powerpc64/__testandset.S 2006-09-07 12:24:13.091172000 +0200
688 @@ -0,0 +1,16 @@
689 +.global __testandset
690 +.type __testandset,@function
691 +.align 2
692 +__testandset:
693 +1: lwarx 5,0,3
694 + li 0,1
695 + stwcx. 0,0,3
696 + bne- 1b
697 + mr 3,5
698 + blr
699 +.size __testandset,.-__testandset
700 +
701 +
702 +#ifdef __ELF__
703 +.section .note.GNU-stack,"",%progbits
704 +#endif
705 diff -NurpP dietlibc-0.30-ppc-rename/powerpc64/umount.S dietlibc-0.30-ppc64-rename/powerpc64/umount.S
706 --- dietlibc-0.30-ppc-rename/powerpc64/umount.S 1970-01-01 01:00:00.000000000 +0100
707 +++ dietlibc-0.30-ppc64-rename/powerpc64/umount.S 2006-09-07 12:24:13.091172000 +0200
708 @@ -0,0 +1,12 @@
709 +#include "syscalls.h"
710 +
711 + .text
712 +diet_proto(umount)
713 +.umount:
714 + li 0, __NR_umount2
715 + li 4, 0
716 + b __unified_syscall
717 +
718 +#ifdef __ELF__
719 +.section .note.GNU-stack,"",%progbits
720 +#endif
721 diff -NurpP dietlibc-0.30-ppc-rename/powerpc64/unified.S dietlibc-0.30-ppc64-rename/powerpc64/unified.S
722 --- dietlibc-0.30-ppc-rename/powerpc64/unified.S 1970-01-01 01:00:00.000000000 +0100
723 +++ dietlibc-0.30-ppc64-rename/powerpc64/unified.S 2006-09-07 12:24:13.091172000 +0200
724 @@ -0,0 +1,75 @@
725 +#include <dietfeatures.h>
726 +#include "syscalls.h"
727 +
728 + .text
729 +.exit:
730 + .weak .exit
731 +._exit:
732 + li 0,__NR_exit
733 + .global __unified_syscall
734 +__unified_syscall:
735 + sc
736 + bnslr+
737 +
738 + .global error_unified_syscall
739 +error_unified_syscall:
740 +
741 +#ifdef WANT_THREAD_SAFE
742 + stdu 1,-128(1)
743 + mflr 0
744 + std 0,20(1)
745 + std 3,12(1)
746 + bl .__errno_location
747 + ld 0,12(1)
748 + stw 0,0(3)
749 + ld 0,20(1)
750 + mtlr 0
751 + addi 1,1,128
752 +#else
753 + lis 9,errno@highesta
754 + ori 9,9,errno@highera
755 + sldi 9,9,32
756 + oris 9,9,errno@ha
757 + stw 3,errno@l(9)
758 +#endif
759 + li 3,-1
760 +
761 +/* here we go and "reuse" the return for weak-void functions */
762 +//#include "dietuglyweaks.h"
763 +.__thread_doexit:
764 + .weak .__thread_doexit
765 +.__fflush_stdin:
766 + .weak .__fflush_stdin
767 +.__fflush_stdout:
768 + .weak .__fflush_stdout
769 +.__fflush_stderr:
770 + .weak .__fflush_stderr
771 +.flockfile:
772 + .weak .flockfile
773 +.funlockfile:
774 + .weak .funlockfile
775 +.__nop:
776 + .weak .__nop
777 +.__you_tried_to_link_a_dietlibc_object_against_glibc:
778 + .weak .__you_tried_to_link_a_dietlibc_object_against_glibc
779 +
780 + blr
781 + .long 0
782 + .byte 0,0,0,1,128,0,0,0
783 + .size ._exit,.-._exit
784 + .size .exit,.-.exit
785 +
786 +diet_proto_weak(__thread_doexit)
787 +diet_proto_weak(__fflush_stdin)
788 +diet_proto_weak(__fflush_stdout)
789 +diet_proto_weak(__fflush_stderr)
790 +diet_proto_weak(flockfile)
791 +diet_proto_weak(funlockfile)
792 +diet_proto_weak(__nop)
793 +diet_proto_weak(__you_tried_to_link_a_dietlibc_object_against_glibc)
794 +diet_proto_weak(exit)
795 +diet_proto(_exit)
796 +
797 +#ifdef __ELF__
798 +.section .note.GNU-stack,"",%progbits
799 +#endif
800 diff -NurpP dietlibc-0.30-ppc-rename/ppc64/clone.S dietlibc-0.30-ppc64-rename/ppc64/clone.S
801 --- dietlibc-0.30-ppc-rename/ppc64/clone.S 2006-09-07 12:24:13.091172000 +0200
802 +++ dietlibc-0.30-ppc64-rename/ppc64/clone.S 1970-01-01 01:00:00.000000000 +0100
803 @@ -1,56 +0,0 @@
804 -#include <dietfeatures.h>
805 -#include "syscalls.h"
806 -#include <errno.h>
807 -
808 -.text
809 -.weak clone
810 -clone:
811 -.global __clone
812 -__clone:
813 - cmpwi 4,0 /* check have non null child_stack pointer */
814 - cmpwi cr1, 3,0 /* check have non null thread_funcion */
815 - cror eq,4*cr1+eq,eq /* now if eq is set one is or both are zero */
816 - beq .Lclone_error
817 -
818 - stdu 1,-64(1) /* alloc some space on the stack */
819 - std 29, 16(1) /* save r29,r30,r31 on stack */
820 - std 30, 24(1)
821 - std 31, 32(1)
822 -
823 - rlwinm 4,4,0,0,27 /* mask out lower 4 bits */
824 -
825 - /* move parameter to positions clone wants them */
826 - mr 29,3 /* r29 = r3 fn */
827 - mr 30,4 /* r30 = r4 stack */
828 - mr 31,6 /* r31 = r6 arg */
829 - mr 3, 5 /* r3 = r5 flags */
830 -
831 - li 0, __NR_clone /* load syscall nr. */
832 - sc
833 -
834 - cmpwi cr1,3,0 /* compare return of syscall with 0 */
835 - crandc 4*cr1+eq,4*cr1+eq,so
836 - bne .Lclone_parent /* return was non zero -> .Lclone_parent */
837 -
838 - /* we are the cloned process */
839 - mr 1, 30 /* set stack pointer */
840 - mtctr 29 /* set count register to fn ? */
841 - mr 3, 31 /* set argument */
842 - bctrl /* branch trough count register and link */
843 - b _exit /* exit thread */
844 -
845 -.Lclone_parent:
846 - ld 29,16(1) /* restore saved registers */
847 - ld 30,24(1)
848 - ld 31,32(1)
849 - addi 1, 1,64 /* free stack */
850 - bnslr+ /* had cloned a thread so return to parent */
851 - b error_unified_syscall
852 -
853 -.Lclone_error:
854 - li 3, EINVAL
855 - b error_unified_syscall
856 -
857 -#ifdef __ELF__
858 -.section .note.GNU-stack,"",%progbits
859 -#endif
860 diff -NurpP dietlibc-0.30-ppc-rename/ppc64/__longjmp.S dietlibc-0.30-ppc64-rename/ppc64/__longjmp.S
861 --- dietlibc-0.30-ppc-rename/ppc64/__longjmp.S 2006-09-07 12:24:13.091172000 +0200
862 +++ dietlibc-0.30-ppc64-rename/ppc64/__longjmp.S 1970-01-01 01:00:00.000000000 +0100
863 @@ -1,58 +0,0 @@
864 -#include <setjmp.h>
865 -
866 - .quad .__longjmp,.TOC.@tocbase,0
867 - .text
868 - .size __longjmp,24
869 - .type .__longjmp,@function
870 - .globl .__longjmp
871 -.align 2
872 -.__longjmp:
873 - ld 1,(JB_GPR1*8)(3)
874 - ld 2,(JB_GPR2*8)(3)
875 - ld 0,(JB_LR*8)(3)
876 - ld 14,((JB_GPRS+0)*8)(3)
877 - lfd 14,((JB_FPRS+0)*8)(3)
878 - ld 15,((JB_GPRS+1)*8)(3)
879 - lfd 15,((JB_FPRS+1)*8)(3)
880 - ld 16,((JB_GPRS+2)*8)(3)
881 - lfd 16,((JB_FPRS+2)*8)(3)
882 - ld 17,((JB_GPRS+3)*8)(3)
883 - lfd 17,((JB_FPRS+3)*8)(3)
884 - ld 18,((JB_GPRS+4)*8)(3)
885 - lfd 18,((JB_FPRS+4)*8)(3)
886 - ld 19,((JB_GPRS+5)*8)(3)
887 - lfd 19,((JB_FPRS+5)*8)(3)
888 - ld 20,((JB_GPRS+6)*8)(3)
889 - lfd 20,((JB_FPRS+6)*8)(3)
890 - mtlr 0
891 - ld 21,((JB_GPRS+7)*8)(3)
892 - lfd 21,((JB_FPRS+7)*8)(3)
893 - ld 22,((JB_GPRS+8)*8)(3)
894 - lfd 22,((JB_FPRS+8)*8)(3)
895 - ld 0,(JB_CR*8)(3)
896 - ld 23,((JB_GPRS+9)*8)(3)
897 - lfd 23,((JB_FPRS+9)*8)(3)
898 - ld 24,((JB_GPRS+10)*8)(3)
899 - lfd 24,((JB_FPRS+10)*8)(3)
900 - ld 25,((JB_GPRS+11)*8)(3)
901 - lfd 25,((JB_FPRS+11)*8)(3)
902 - mtcrf 0xFF,0
903 - ld 26,((JB_GPRS+12)*8)(3)
904 - lfd 26,((JB_FPRS+12)*8)(3)
905 - ld 27,((JB_GPRS+13)*8)(3)
906 - lfd 27,((JB_FPRS+13)*8)(3)
907 - ld 28,((JB_GPRS+14)*8)(3)
908 - lfd 28,((JB_FPRS+14)*8)(3)
909 - ld 29,((JB_GPRS+15)*8)(3)
910 - lfd 29,((JB_FPRS+15)*8)(3)
911 - ld 30,((JB_GPRS+16)*8)(3)
912 - lfd 30,((JB_FPRS+16)*8)(3)
913 - ld 31,((JB_GPRS+17)*8)(3)
914 - lfd 31,((JB_FPRS+17)*8)(3)
915 - mr 3,4
916 - blr
917 -.size .__longjmp,.-.__longjmp
918 -
919 -#ifdef __ELF__
920 -.section .note.GNU-stack,"",%progbits
921 -#endif
922 diff -NurpP dietlibc-0.30-ppc-rename/ppc64/Makefile.add dietlibc-0.30-ppc64-rename/ppc64/Makefile.add
923 --- dietlibc-0.30-ppc-rename/ppc64/Makefile.add 2006-05-07 06:16:59.000000000 +0200
924 +++ dietlibc-0.30-ppc64-rename/ppc64/Makefile.add 1970-01-01 01:00:00.000000000 +0100
925 @@ -1,5 +0,0 @@
926 -
927 -CFLAGS+=-Os -mpowerpc64
928 -VPATH:=ppc64:syscalls.s:$(VPATH)
929 -
930 -CC+=-m64
931 diff -NurpP dietlibc-0.30-ppc-rename/ppc64/setjmp.S dietlibc-0.30-ppc64-rename/ppc64/setjmp.S
932 --- dietlibc-0.30-ppc-rename/ppc64/setjmp.S 2006-09-07 12:24:13.091172000 +0200
933 +++ dietlibc-0.30-ppc64-rename/ppc64/setjmp.S 1970-01-01 01:00:00.000000000 +0100
934 @@ -1,63 +0,0 @@
935 -#include <setjmp.h>
936 -
937 -#ifdef PIC
938 -#define JUMPTARGET(name) name##@plt
939 -#else
940 -#define JUMPTARGET(name) .name
941 -#endif
942 -
943 - .quad .__sigsetjmp,.TOC.@tocbase,0
944 - .text
945 - .size __sigsetjmp,24
946 - .type .__sigsetjmp,@function
947 - .globl .__sigsetjmp
948 -.align 2
949 -.__sigsetjmp:
950 - std 1,(JB_GPR1*8)(3)
951 - mflr 0
952 - std 2,(JB_GPR2*8)(3)
953 - std 14,((JB_GPRS+0)*8)(3)
954 - stfd 14,((JB_FPRS+0)*8)(3)
955 - std 0,(JB_LR*8)(3)
956 - std 15,((JB_GPRS+1)*8)(3)
957 - stfd 15,((JB_FPRS+1)*8)(3)
958 - mfcr 0
959 - std 16,((JB_GPRS+2)*8)(3)
960 - stfd 16,((JB_FPRS+2)*8)(3)
961 - std 0,(JB_CR*8)(3)
962 - std 17,((JB_GPRS+3)*8)(3)
963 - stfd 17,((JB_FPRS+3)*8)(3)
964 - std 18,((JB_GPRS+4)*8)(3)
965 - stfd 18,((JB_FPRS+4)*8)(3)
966 - std 19,((JB_GPRS+5)*8)(3)
967 - stfd 19,((JB_FPRS+5)*8)(3)
968 - std 20,((JB_GPRS+6)*8)(3)
969 - stfd 20,((JB_FPRS+6)*8)(3)
970 - std 21,((JB_GPRS+7)*8)(3)
971 - stfd 21,((JB_FPRS+7)*8)(3)
972 - std 22,((JB_GPRS+8)*8)(3)
973 - stfd 22,((JB_FPRS+8)*8)(3)
974 - std 23,((JB_GPRS+9)*8)(3)
975 - stfd 23,((JB_FPRS+9)*8)(3)
976 - std 24,((JB_GPRS+10)*8)(3)
977 - stfd 24,((JB_FPRS+10)*8)(3)
978 - std 25,((JB_GPRS+11)*8)(3)
979 - stfd 25,((JB_FPRS+11)*8)(3)
980 - std 26,((JB_GPRS+12)*8)(3)
981 - stfd 26,((JB_FPRS+12)*8)(3)
982 - std 27,((JB_GPRS+13)*8)(3)
983 - stfd 27,((JB_FPRS+13)*8)(3)
984 - std 28,((JB_GPRS+14)*8)(3)
985 - stfd 28,((JB_FPRS+14)*8)(3)
986 - std 29,((JB_GPRS+15)*8)(3)
987 - stfd 29,((JB_FPRS+15)*8)(3)
988 - std 30,((JB_GPRS+16)*8)(3)
989 - stfd 30,((JB_FPRS+16)*8)(3)
990 - std 31,((JB_GPRS+17)*8)(3)
991 - stfd 31,((JB_FPRS+17)*8)(3)
992 - b JUMPTARGET (__sigjmp_save)
993 -.size .__sigsetjmp,.-.__sigsetjmp
994 -
995 -#ifdef __ELF__
996 -.section .note.GNU-stack,"",%progbits
997 -#endif
998 diff -NurpP dietlibc-0.30-ppc-rename/ppc64/start.S dietlibc-0.30-ppc64-rename/ppc64/start.S
999 --- dietlibc-0.30-ppc-rename/ppc64/start.S 2006-09-07 12:24:13.091172000 +0200
1000 +++ dietlibc-0.30-ppc64-rename/ppc64/start.S 1970-01-01 01:00:00.000000000 +0100
1001 @@ -1,95 +0,0 @@
1002 -#include "dietfeatures.h"
1003 -
1004 - .section ".text"
1005 - .align 2
1006 - .globl ._start
1007 - .type ._start,@function
1008 - .globl _start
1009 - .section ".opd","aw"
1010 -_start:
1011 - .quad ._start
1012 - .quad .TOC.@tocbase, 0
1013 - .previous
1014 -._start:
1015 -
1016 -/*
1017 - .section ".text"
1018 - .align 2
1019 - .globl ._start
1020 - .type ._start,@function
1021 - .globl _start
1022 - .section ".opd","aw"
1023 -_start:
1024 - .quad ._start
1025 - .quad .TOC.@tocbase, 0
1026 - .previous
1027 -._start:
1028 -*/
1029 - /* Save the stack pointer, in case we're statically linked under Linux. */
1030 - mr 9,1
1031 - /* Set up an initial stack frame, and clear the LR. */
1032 - clrrdi 1,1,4
1033 - li 0,0
1034 - stdu 1,-128(1)
1035 - mtlr 0
1036 - std 0,0(1)
1037 -
1038 - /* r9 contains the initial stack pointer
1039 - argc = (r9)
1040 - argv = (r9+4)
1041 - envp = argv+(argc+1)*4 */
1042 -
1043 - lis 14,__libc_stack_end@highesta
1044 - ori 14,14,__libc_stack_end@highera
1045 - sldi 14,14,32
1046 - oris 14,14,__libc_stack_end@ha
1047 - std 9,__libc_stack_end@l(14)
1048 -
1049 - ldu 3,0(9) /* argc */
1050 - addi 4,9,8 /* argv */
1051 - add 5,0,3 /* argc... */
1052 - addi 5,5,1 /* argc+1...*/
1053 - slwi 5,5,3 /* (argc+1)*8 */
1054 - add 5,5,4 /* argv+(argc+1)*8 */
1055 -
1056 - lis 14,environ@highesta
1057 - ori 14,14,environ@highera
1058 - sldi 14,14,32
1059 - oris 14,14,environ@ha
1060 - std 5,environ@l(14)
1061 -
1062 -#ifdef WANT_DYNAMIC
1063 -/* #warning dynamic */
1064 - mr 6,7
1065 - bl ._dyn_start
1066 -#else
1067 -/* #warning static */
1068 -#define DOTIFY(name) .##name
1069 - bl DOTIFY(CALL_IN_STARTCODE)
1070 -#endif
1071 - b .exit
1072 -
1073 -.LT_start:
1074 - .long 0
1075 - .quad 0x000c000000000000 | 0x0000200000000000 | 0x0000004000000000
1076 - .long .LT_start-._start
1077 - .short .LT_start_name_end-.LT_start_name_start
1078 -.LT_start_name_start:
1079 - .ascii "_start"
1080 -.LT_start_name_end:
1081 - .align 2
1082 - .size _start,.-_start
1083 -
1084 -/* Define a symbol for the first piece of initialized data. */
1085 - .section ".data"
1086 -__data_start:
1087 -
1088 -/* this is needed for libgcc_eh.a - see gcc-3.4/gcc/config/rs6000/linux-unwind.h */
1089 - .weak __libc_stack_end
1090 - .lcomm __libc_stack_end,8,8
1091 - .type __libc_stack_end,@object
1092 -
1093 -
1094 -#ifdef __ELF__
1095 -.section .note.GNU-stack,"",%progbits
1096 -#endif
1097 diff -NurpP dietlibc-0.30-ppc-rename/ppc64/syscalls.h dietlibc-0.30-ppc64-rename/ppc64/syscalls.h
1098 --- dietlibc-0.30-ppc-rename/ppc64/syscalls.h 2005-09-21 09:33:08.000000000 +0200
1099 +++ dietlibc-0.30-ppc64-rename/ppc64/syscalls.h 1970-01-01 01:00:00.000000000 +0100
1100 @@ -1,317 +0,0 @@
1101 -
1102 -#define __NR_exit 1
1103 -#define __NR_fork 2
1104 -#define __NR_read 3
1105 -#define __NR_write 4
1106 -#define __NR_open 5
1107 -#define __NR_close 6
1108 -#define __NR_waitpid 7
1109 -#define __NR_creat 8
1110 -#define __NR_link 9
1111 -#define __NR_unlink 10
1112 -#define __NR_execve 11
1113 -#define __NR_chdir 12
1114 -#define __NR_time 13
1115 -#define __NR_mknod 14
1116 -#define __NR_chmod 15
1117 -#define __NR_lchown 16
1118 -#define __NR_break 17
1119 -#define __NR_oldstat 18
1120 -#define __NR_lseek 19
1121 -#define __NR_getpid 20
1122 -#define __NR_mount 21
1123 -#define __NR_umount 22
1124 -#define __NR_setuid 23
1125 -#define __NR_getuid 24
1126 -#define __NR_stime 25
1127 -#define __NR_ptrace 26
1128 -#define __NR_alarm 27
1129 -#define __NR_oldfstat 28
1130 -#define __NR_pause 29
1131 -#define __NR_utime 30
1132 -#define __NR_stty 31
1133 -#define __NR_gtty 32
1134 -#define __NR_access 33
1135 -#define __NR_nice 34
1136 -#define __NR_ftime 35
1137 -#define __NR_sync 36
1138 -#define __NR_kill 37
1139 -#define __NR_rename 38
1140 -#define __NR_mkdir 39
1141 -#define __NR_rmdir 40
1142 -#define __NR_dup 41
1143 -#define __NR_pipe 42
1144 -#define __NR_times 43
1145 -#define __NR_prof 44
1146 -#define __NR_brk 45
1147 -#define __NR_setgid 46
1148 -#define __NR_getgid 47
1149 -#define __NR_signal 48
1150 -#define __NR_geteuid 49
1151 -#define __NR_getegid 50
1152 -#define __NR_acct 51
1153 -#define __NR_umount2 52
1154 -#define __NR_lock 53
1155 -#define __NR_ioctl 54
1156 -#define __NR_fcntl 55
1157 -#define __NR_mpx 56
1158 -#define __NR_setpgid 57
1159 -#define __NR_ulimit 58
1160 -#define __NR_oldolduname 59
1161 -#define __NR_umask 60
1162 -#define __NR_chroot 61
1163 -#define __NR_ustat 62
1164 -#define __NR_dup2 63
1165 -#define __NR_getppid 64
1166 -#define __NR_getpgrp 65
1167 -#define __NR_setsid 66
1168 -#define __NR_sigaction 67
1169 -#define __NR_sgetmask 68
1170 -#define __NR_ssetmask 69
1171 -#define __NR_setreuid 70
1172 -#define __NR_setregid 71
1173 -#define __NR_sigsuspend 72
1174 -#define __NR_sigpending 73
1175 -#define __NR_sethostname 74
1176 -#define __NR_setrlimit 75
1177 -#define __NR_getrlimit 76
1178 -#define __NR_getrusage 77
1179 -#define __NR_gettimeofday 78
1180 -#define __NR_settimeofday 79
1181 -#define __NR_getgroups 80
1182 -#define __NR_setgroups 81
1183 -#define __NR_select 82
1184 -#define __NR_symlink 83
1185 -#define __NR_oldlstat 84
1186 -#define __NR_readlink 85
1187 -#define __NR_uselib 86
1188 -#define __NR_swapon 87
1189 -#define __NR_reboot 88
1190 -#define __NR_readdir 89
1191 -#define __NR_mmap 90
1192 -#define __NR_munmap 91
1193 -#define __NR_truncate 92
1194 -#define __NR_ftruncate 93
1195 -#define __NR_fchmod 94
1196 -#define __NR_fchown 95
1197 -#define __NR_getpriority 96
1198 -#define __NR_setpriority 97
1199 -#define __NR_profil 98
1200 -#define __NR_statfs 99
1201 -#define __NR_fstatfs 100
1202 -#define __NR_ioperm 101
1203 -#define __NR_socketcall 102
1204 -#define __NR_syslog 103
1205 -#define __NR_setitimer 104
1206 -#define __NR_getitimer 105
1207 -#define __NR_stat 106
1208 -#define __NR_lstat 107
1209 -#define __NR_fstat 108
1210 -#define __NR_olduname 109
1211 -#define __NR_iopl 110
1212 -#define __NR_vhangup 111
1213 -#define __NR_idle 112
1214 -#define __NR_vm86 113
1215 -#define __NR_wait4 114
1216 -#define __NR_swapoff 115
1217 -#define __NR_sysinfo 116
1218 -#define __NR_ipc 117
1219 -#define __NR_fsync 118
1220 -#define __NR_sigreturn 119
1221 -#define __NR_clone 120
1222 -#define __NR_setdomainname 121
1223 -#define __NR_uname 122
1224 -#define __NR_modify_ldt 123
1225 -#define __NR_adjtimex 124
1226 -#define __NR_mprotect 125
1227 -#define __NR_sigprocmask 126
1228 -#define __NR_create_module 127
1229 -#define __NR_init_module 128
1230 -#define __NR_delete_module 129
1231 -#define __NR_get_kernel_syms 130
1232 -#define __NR_quotactl 131
1233 -#define __NR_getpgid 132
1234 -#define __NR_fchdir 133
1235 -#define __NR_bdflush 134
1236 -#define __NR_sysfs 135
1237 -#define __NR_personality 136
1238 -#define __NR_afs_syscall 137 /* Syscall for Andrew File System */
1239 -#define __NR_setfsuid 138
1240 -#define __NR_setfsgid 139
1241 -#define __NR__llseek 140
1242 -#define __NR_getdents 141
1243 -#define __NR__newselect 142
1244 -#define __NR_flock 143
1245 -#define __NR_msync 144
1246 -#define __NR_readv 145
1247 -#define __NR_writev 146
1248 -#define __NR_getsid 147
1249 -#define __NR_fdatasync 148
1250 -#define __NR__sysctl 149
1251 -#define __NR_mlock 150
1252 -#define __NR_munlock 151
1253 -#define __NR_mlockall 152
1254 -#define __NR_munlockall 153
1255 -#define __NR_sched_setparam 154
1256 -#define __NR_sched_getparam 155
1257 -#define __NR_sched_setscheduler 156
1258 -#define __NR_sched_getscheduler 157
1259 -#define __NR_sched_yield 158
1260 -#define __NR_sched_get_priority_max 159
1261 -#define __NR_sched_get_priority_min 160
1262 -#define __NR_sched_rr_get_interval 161
1263 -#define __NR_nanosleep 162
1264 -#define __NR_mremap 163
1265 -#define __NR_setresuid 164
1266 -#define __NR_getresuid 165
1267 -#define __NR_query_module 166
1268 -#define __NR_poll 167
1269 -#define __NR_nfsservctl 168
1270 -#define __NR_setresgid 169
1271 -#define __NR_getresgid 170
1272 -#define __NR_prctl 171
1273 -#define __NR_rt_sigreturn 172
1274 -#define __NR_rt_sigaction 173
1275 -#define __NR_rt_sigprocmask 174
1276 -#define __NR_rt_sigpending 175
1277 -#define __NR_rt_sigtimedwait 176
1278 -#define __NR_rt_sigqueueinfo 177
1279 -#define __NR_rt_sigsuspend 178
1280 -#define __NR_pread 179
1281 -#define __NR_pwrite 180
1282 -#define __NR_chown 181
1283 -#define __NR_getcwd 182
1284 -#define __NR_capget 183
1285 -#define __NR_capset 184
1286 -#define __NR_sigaltstack 185
1287 -#define __NR_sendfile 186
1288 -#define __NR_getpmsg 187 /* some people actually want streams */
1289 -#define __NR_putpmsg 188 /* some people actually want streams */
1290 -#define __NR_vfork 189
1291 -#define __NR_ugetrlimit 190 /* SuS compliant getrlimit */
1292 -#define __NR_readahead 191
1293 -/* #define __NR_mmap2 192 32bit only */
1294 -/* #define __NR_truncate64 193 32bit only */
1295 -/* #define __NR_ftruncate64 194 32bit only */
1296 -/* #define __NR_stat64 195 32bit only */
1297 -/* #define __NR_lstat64 196 32bit only */
1298 -/* #define __NR_fstat64 197 32bit only */
1299 -#define __NR_pciconfig_read 198
1300 -#define __NR_pciconfig_write 199
1301 -#define __NR_pciconfig_iobase 200
1302 -#define __NR_multiplexer 201
1303 -#define __NR_getdents64 202
1304 -#define __NR_pivot_root 203
1305 -/* #define __NR_fcntl64 204 32bit only */
1306 -#define __NR_madvise 205
1307 -#define __NR_mincore 206
1308 -#define __NR_gettid 207
1309 -#define __NR_tkill 208
1310 -#define __NR_setxattr 209
1311 -#define __NR_lsetxattr 210
1312 -#define __NR_fsetxattr 211
1313 -#define __NR_getxattr 212
1314 -#define __NR_lgetxattr 213
1315 -#define __NR_fgetxattr 214
1316 -#define __NR_listxattr 215
1317 -#define __NR_llistxattr 216
1318 -#define __NR_flistxattr 217
1319 -#define __NR_removexattr 218
1320 -#define __NR_lremovexattr 219
1321 -#define __NR_fremovexattr 220
1322 -#define __NR_futex 221
1323 -#define __NR_sched_setaffinity 222
1324 -#define __NR_sched_getaffinity 223
1325 -/* 224 currently unused */
1326 -#define __NR_tuxcall 225
1327 -/* #define __NR_sendfile64 226 32bit only */
1328 -#define __NR_io_setup 227
1329 -#define __NR_io_destroy 228
1330 -#define __NR_io_getevents 229
1331 -#define __NR_io_submit 230
1332 -#define __NR_io_cancel 231
1333 -#define __NR_set_tid_address 232
1334 -#define __NR_fadvise64 233
1335 -#define __NR_exit_group 234
1336 -#define __NR_lookup_dcookie 235
1337 -#define __NR_epoll_create 236
1338 -#define __NR_epoll_ctl 237
1339 -#define __NR_epoll_wait 238
1340 -#define __NR_remap_file_pages 239
1341 -#define __NR_timer_create 240
1342 -#define __NR_timer_settime 241
1343 -#define __NR_timer_gettime 242
1344 -#define __NR_timer_getoverrun 243
1345 -#define __NR_timer_delete 244
1346 -#define __NR_clock_settime 245
1347 -#define __NR_clock_gettime 246
1348 -#define __NR_clock_getres 247
1349 -#define __NR_clock_nanosleep 248
1350 -#define __NR_swapcontext 249
1351 -#define __NR_tgkill 250
1352 -#define __NR_utimes 251
1353 -#define __NR_statfs64 252
1354 -#define __NR_fstatfs64 253
1355 -/* #define __NR_fadvise64_64 254 32bit only */
1356 -#define __NR_rtas 255
1357 -/* Number 256 is reserved for sys_debug_setcontext */
1358 -/* Number 257 is reserved for vserver */
1359 -/* Number 258 is reserved for new sys_remap_file_pages */
1360 -#define __NR_mbind 259
1361 -#define __NR_get_mempolicy 260
1362 -#define __NR_set_mempolicy 261
1363 -#define __NR_mq_open 262
1364 -#define __NR_mq_unlink 263
1365 -#define __NR_mq_timedsend 264
1366 -#define __NR_mq_timedreceive 265
1367 -#define __NR_mq_notify 266
1368 -#define __NR_mq_getsetattr 267
1369 -#define __NR_kexec_load 268
1370 -#define __NR_add_key 269
1371 -#define __NR_request_key 270
1372 -#define __NR_keyctl 271
1373 -#define __NR_waitid 272
1374 -#define __NR_ioprio_set 273
1375 -#define __NR_ioprio_get 274
1376 -#define __NR_inotify_init 275
1377 -#define __NR_inotify_add_watch 276
1378 -#define __NR_inotify_rm_watch 277
1379 -
1380 -
1381 -
1382 -#define __diet_proto_common(sym) \
1383 - .section ".opd","aw"; \
1384 - .align 3; \
1385 -sym: \
1386 - .quad .sym,.TOC.@tocbase,0; \
1387 - .previous; \
1388 - .size sym,24; \
1389 - .type .sym,@function
1390 -
1391 -#define diet_proto_weak(sym) \
1392 - .weak sym; \
1393 - .weak .sym; \
1394 - __diet_proto_common(sym)
1395 -
1396 -#define diet_proto(sym) \
1397 - .globl sym; \
1398 - .globl .sym; \
1399 - __diet_proto_common(sym)
1400 -
1401 -
1402 -#define syscall_weak(name,wsym,sym) \
1403 -.text; \
1404 -diet_proto_weak(wsym); \
1405 -diet_proto(sym); \
1406 -.wsym: \
1407 -.sym: \
1408 - li 0,__NR_##name; \
1409 - b __unified_syscall
1410 -
1411 -#define syscall(name,sym) \
1412 -.text; \
1413 -diet_proto(sym); \
1414 -.sym: \
1415 - li 0,__NR_##name; \
1416 - b __unified_syscall
1417 -
1418 diff -NurpP dietlibc-0.30-ppc-rename/ppc64/__testandset.S dietlibc-0.30-ppc64-rename/ppc64/__testandset.S
1419 --- dietlibc-0.30-ppc-rename/ppc64/__testandset.S 2006-09-07 12:24:13.091172000 +0200
1420 +++ dietlibc-0.30-ppc64-rename/ppc64/__testandset.S 1970-01-01 01:00:00.000000000 +0100
1421 @@ -1,16 +0,0 @@
1422 -.global __testandset
1423 -.type __testandset,@function
1424 -.align 2
1425 -__testandset:
1426 -1: lwarx 5,0,3
1427 - li 0,1
1428 - stwcx. 0,0,3
1429 - bne- 1b
1430 - mr 3,5
1431 - blr
1432 -.size __testandset,.-__testandset
1433 -
1434 -
1435 -#ifdef __ELF__
1436 -.section .note.GNU-stack,"",%progbits
1437 -#endif
1438 diff -NurpP dietlibc-0.30-ppc-rename/ppc64/umount.S dietlibc-0.30-ppc64-rename/ppc64/umount.S
1439 --- dietlibc-0.30-ppc-rename/ppc64/umount.S 2006-09-07 12:24:13.091172000 +0200
1440 +++ dietlibc-0.30-ppc64-rename/ppc64/umount.S 1970-01-01 01:00:00.000000000 +0100
1441 @@ -1,12 +0,0 @@
1442 -#include "syscalls.h"
1443 -
1444 - .text
1445 -diet_proto(umount)
1446 -.umount:
1447 - li 0, __NR_umount2
1448 - li 4, 0
1449 - b __unified_syscall
1450 -
1451 -#ifdef __ELF__
1452 -.section .note.GNU-stack,"",%progbits
1453 -#endif
1454 diff -NurpP dietlibc-0.30-ppc-rename/ppc64/unified.S dietlibc-0.30-ppc64-rename/ppc64/unified.S
1455 --- dietlibc-0.30-ppc-rename/ppc64/unified.S 2006-09-07 12:24:13.091172000 +0200
1456 +++ dietlibc-0.30-ppc64-rename/ppc64/unified.S 1970-01-01 01:00:00.000000000 +0100
1457 @@ -1,75 +0,0 @@
1458 -#include <dietfeatures.h>
1459 -#include "syscalls.h"
1460 -
1461 - .text
1462 -.exit:
1463 - .weak .exit
1464 -._exit:
1465 - li 0,__NR_exit
1466 - .global __unified_syscall
1467 -__unified_syscall:
1468 - sc
1469 - bnslr+
1470 -
1471 - .global error_unified_syscall
1472 -error_unified_syscall:
1473 -
1474 -#ifdef WANT_THREAD_SAFE
1475 - stdu 1,-128(1)
1476 - mflr 0
1477 - std 0,20(1)
1478 - std 3,12(1)
1479 - bl .__errno_location
1480 - ld 0,12(1)
1481 - stw 0,0(3)
1482 - ld 0,20(1)
1483 - mtlr 0
1484 - addi 1,1,128
1485 -#else
1486 - lis 9,errno@highesta
1487 - ori 9,9,errno@highera
1488 - sldi 9,9,32
1489 - oris 9,9,errno@ha
1490 - stw 3,errno@l(9)
1491 -#endif
1492 - li 3,-1
1493 -
1494 -/* here we go and "reuse" the return for weak-void functions */
1495 -//#include "dietuglyweaks.h"
1496 -.__thread_doexit:
1497 - .weak .__thread_doexit
1498 -.__fflush_stdin:
1499 - .weak .__fflush_stdin
1500 -.__fflush_stdout:
1501 - .weak .__fflush_stdout
1502 -.__fflush_stderr:
1503 - .weak .__fflush_stderr
1504 -.flockfile:
1505 - .weak .flockfile
1506 -.funlockfile:
1507 - .weak .funlockfile
1508 -.__nop:
1509 - .weak .__nop
1510 -.__you_tried_to_link_a_dietlibc_object_against_glibc:
1511 - .weak .__you_tried_to_link_a_dietlibc_object_against_glibc
1512 -
1513 - blr
1514 - .long 0
1515 - .byte 0,0,0,1,128,0,0,0
1516 - .size ._exit,.-._exit
1517 - .size .exit,.-.exit
1518 -
1519 -diet_proto_weak(__thread_doexit)
1520 -diet_proto_weak(__fflush_stdin)
1521 -diet_proto_weak(__fflush_stdout)
1522 -diet_proto_weak(__fflush_stderr)
1523 -diet_proto_weak(flockfile)
1524 -diet_proto_weak(funlockfile)
1525 -diet_proto_weak(__nop)
1526 -diet_proto_weak(__you_tried_to_link_a_dietlibc_object_against_glibc)
1527 -diet_proto_weak(exit)
1528 -diet_proto(_exit)
1529 -
1530 -#ifdef __ELF__
1531 -.section .note.GNU-stack,"",%progbits
1532 -#endif
1533 diff -NurpP dietlibc-0.30-ppc-rename/syscalls.h dietlibc-0.30-ppc64-rename/syscalls.h
1534 --- dietlibc-0.30-ppc-rename/syscalls.h 2006-09-07 12:28:54.384751750 +0200
1535 +++ dietlibc-0.30-ppc64-rename/syscalls.h 2006-09-07 12:35:50.997959250 +0200
1536 @@ -12,7 +12,7 @@
1537 #endif
1538
1539 #elif defined(__powerpc64__)
1540 -#include "ppc64/syscalls.h"
1541 +#include "powerpc64/syscalls.h"
1542
1543 #elif defined(__powerpc__)
1544 #include "powerpc/syscalls.h"

  ViewVC Help
Powered by ViewVC 1.1.20