diff options
Diffstat (limited to 'meta/packages/glibc/glibc-2.4/fixup-aeabi-syscalls.patch')
-rw-r--r-- | meta/packages/glibc/glibc-2.4/fixup-aeabi-syscalls.patch | 329 |
1 files changed, 0 insertions, 329 deletions
diff --git a/meta/packages/glibc/glibc-2.4/fixup-aeabi-syscalls.patch b/meta/packages/glibc/glibc-2.4/fixup-aeabi-syscalls.patch deleted file mode 100644 index fb733b9194..0000000000 --- a/meta/packages/glibc/glibc-2.4/fixup-aeabi-syscalls.patch +++ /dev/null | |||
@@ -1,329 +0,0 @@ | |||
1 | Fix up ARM EABI for removed syscalls | ||
2 | http://sourceware.org/ml/libc-ports/2006-03/msg00029.html | ||
3 | |||
4 | Index: glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/socket.S | ||
5 | =================================================================== | ||
6 | --- glibc.orig/ports/sysdeps/unix/sysv/linux/arm/eabi/socket.S 2006-03-21 15:58:10.000000000 -0500 | ||
7 | +++ /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
8 | @@ -1,131 +0,0 @@ | ||
9 | -/* Copyright (C) 1995, 1996, 1997, 1998, 2003, 2005 | ||
10 | - Free Software Foundation, Inc. | ||
11 | - This file is part of the GNU C Library. | ||
12 | - | ||
13 | - The GNU C Library is free software; you can redistribute it and/or | ||
14 | - modify it under the terms of the GNU Lesser General Public | ||
15 | - License as published by the Free Software Foundation; either | ||
16 | - version 2.1 of the License, or (at your option) any later version. | ||
17 | - | ||
18 | - The GNU C Library is distributed in the hope that it will be useful, | ||
19 | - but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
20 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
21 | - Lesser General Public License for more details. | ||
22 | - | ||
23 | - You should have received a copy of the GNU Lesser General Public | ||
24 | - License along with the GNU C Library; if not, write to the Free | ||
25 | - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
26 | - 02111-1307 USA. */ | ||
27 | - | ||
28 | -#include <sysdep-cancel.h> | ||
29 | -#include <socketcall.h> | ||
30 | - | ||
31 | -#define P(a, b) P2(a, b) | ||
32 | -#define P2(a, b) a##b | ||
33 | - | ||
34 | - .text | ||
35 | -/* The socket-oriented system calls are handled unusally in Linux. | ||
36 | - They are all gated through the single `socketcall' system call number. | ||
37 | - `socketcall' takes two arguments: the first is the subcode, specifying | ||
38 | - which socket function is being called; and the second is a pointer to | ||
39 | - the arguments to the specific function. | ||
40 | - | ||
41 | - The .S files for the other calls just #define socket and #include this. */ | ||
42 | - | ||
43 | -#ifndef __socket | ||
44 | -# ifndef NO_WEAK_ALIAS | ||
45 | -# define __socket P(__,socket) | ||
46 | -# else | ||
47 | -# define __socket socket | ||
48 | -# endif | ||
49 | -#endif | ||
50 | - | ||
51 | -#define PUSHARGS_1 str a1, [sp, $-8]!; .pad #8 | ||
52 | -#define PUSHARGS_2 stmfd sp!, {a1, a2}; .pad #8 | ||
53 | -#define PUSHARGS_3 stmfd sp!, {a1, a2, a3, a4}; .pad #16 /* a4 pushed for padding */ | ||
54 | -#define PUSHARGS_4 stmfd sp!, {a1, a2, a3, a4}; .pad #16 | ||
55 | -#define PUSHARGS_5 stmfd sp!, {a1, a2, a3, a4}; .pad #16 /* Caller has already pushed arg 5 */ | ||
56 | -#define PUSHARGS_6 stmfd sp!, {a1, a2, a3, a4}; .pad #16 | ||
57 | - | ||
58 | -#define POPARGS_1 add sp, sp, #8 | ||
59 | -#define POPARGS_2 add sp, sp, #8 | ||
60 | -#define POPARGS_3 add sp, sp, #16 | ||
61 | -#define POPARGS_4 add sp, sp, #16 | ||
62 | -#define POPARGS_5 add sp, sp, #16 | ||
63 | -#define POPARGS_6 add sp, sp, #16 | ||
64 | - | ||
65 | -#ifndef NARGS | ||
66 | -#define NARGS 3 /* If we were called with no wrapper, this is really socket() */ | ||
67 | -#endif | ||
68 | - | ||
69 | -#if defined NEED_CANCELLATION && defined CENABLE | ||
70 | - PSEUDO_PROLOGUE | ||
71 | -#endif | ||
72 | - | ||
73 | -.globl __socket | ||
74 | -ENTRY (__socket) | ||
75 | - .fnstart | ||
76 | - | ||
77 | - /* This code previously moved sp into ip and stored the args using | ||
78 | - stmdb ip!, {a1-a4}. It did not modify sp, so the stack never had | ||
79 | - to be restored after the syscall completed. It saved an | ||
80 | - instruction and meant no stack cleanup work was required. | ||
81 | - | ||
82 | - This will not work in the case of a socket call being interrupted | ||
83 | - by a signal. If the signal handler uses any stack the arguments | ||
84 | - to socket will be trashed. The results of a restart of any | ||
85 | - socket call are then unpredictable. */ | ||
86 | - | ||
87 | - /* Push args onto the stack. */ | ||
88 | - P(PUSHARGS_,NARGS) | ||
89 | - | ||
90 | -#if defined NEED_CANCELLATION && defined CENABLE | ||
91 | - SINGLE_THREAD_P | ||
92 | - bne 1f | ||
93 | -#endif | ||
94 | - | ||
95 | - /* Do the system call trap. */ | ||
96 | - mov a1, $P(SOCKOP_,socket) | ||
97 | - mov a2, sp | ||
98 | - DO_CALL (socketcall, 0) | ||
99 | - | ||
100 | - /* Pop args off the stack */ | ||
101 | - P(POPARGS_,NARGS) | ||
102 | - | ||
103 | - /* r0 is < 0 if there was an error. */ | ||
104 | - cmn r0, $124 | ||
105 | - RETINSTR(cc, r14) | ||
106 | - b PLTJMP(SYSCALL_ERROR) | ||
107 | - | ||
108 | -#if defined NEED_CANCELLATION && defined CENABLE | ||
109 | -1: | ||
110 | - stmfd sp!, {r7, lr} | ||
111 | - .save {r7, lr} | ||
112 | - CENABLE | ||
113 | - mov ip, r0 | ||
114 | - | ||
115 | - mov r0, #P(SOCKOP_,socket) | ||
116 | - add r1, sp, #8 | ||
117 | - mov r7, #SYS_ify(socketcall) | ||
118 | - swi 0x0 | ||
119 | - | ||
120 | - mov r7, r0 | ||
121 | - mov r0, ip | ||
122 | - CDISABLE | ||
123 | - mov r0, r7 | ||
124 | - ldmfd sp!, {r7, lr} | ||
125 | - | ||
126 | - P(POPARGS_,NARGS) | ||
127 | - | ||
128 | - /* r0 is < 0 if there was an error. */ | ||
129 | - cmn r0, $124 | ||
130 | - RETINSTR(cc, r14) | ||
131 | - b PLTJMP(SYSCALL_ERROR) | ||
132 | -#endif | ||
133 | - | ||
134 | - .fnend | ||
135 | -PSEUDO_END (__socket) | ||
136 | - | ||
137 | -#ifndef NO_WEAK_ALIAS | ||
138 | -weak_alias (__socket, socket) | ||
139 | -#endif | ||
140 | Index: glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list | ||
141 | =================================================================== | ||
142 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
143 | +++ glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/syscalls.list 2006-03-21 15:58:46.000000000 -0500 | ||
144 | @@ -0,0 +1,34 @@ | ||
145 | +# File name Caller Syscall name # args Strong name Weak names | ||
146 | + | ||
147 | +# semaphore and shm system calls | ||
148 | +msgctl - msgctl i:iip __msgctl msgctl | ||
149 | +msgget - msgget i:ii __msgget msgget | ||
150 | +msgrcv - msgrcv Ci:ibnii __msgrcv msgrcv | ||
151 | +msgsnd - msgsnd Ci:ibni __msgsnd msgsnd | ||
152 | +shmat - shmat i:ipi __shmat shmat | ||
153 | +shmctl - shmctl i:iip __shmctl shmctl | ||
154 | +shmdt - shmdt i:s __shmdt shmdt | ||
155 | +shmget - shmget i:iii __shmget shmget | ||
156 | +semop - semop i:ipi __semop semop | ||
157 | +semtimedop - semtimedop i:ipip semtimedop | ||
158 | +semget - semget i:iii __semget semget | ||
159 | +semctl - semctl i:iiii __semctl semctl | ||
160 | + | ||
161 | +# proper socket implementations: | ||
162 | +accept - accept Ci:iBN __libc_accept __accept accept | ||
163 | +bind - bind i:ipi __bind bind | ||
164 | +connect - connect Ci:ipi __libc_connect __connect_internal __connect connect | ||
165 | +getpeername - getpeername i:ipp __getpeername getpeername | ||
166 | +getsockname - getsockname i:ipp __getsockname getsockname | ||
167 | +getsockopt - getsockopt i:iiiBN __getsockopt getsockopt | ||
168 | +listen - listen i:ii __listen listen | ||
169 | +recv - recv Ci:ibni __libc_recv __recv recv | ||
170 | +recvfrom - recvfrom Ci:ibniBN __libc_recvfrom __recvfrom recvfrom | ||
171 | +recvmsg - recvmsg Ci:ipi __libc_recvmsg __recvmsg recvmsg | ||
172 | +send - send Ci:ibni __libc_send __send send | ||
173 | +sendmsg - sendmsg Ci:ipi __libc_sendmsg __sendmsg sendmsg | ||
174 | +sendto - sendto Ci:ibnibn __libc_sendto __sendto sendto | ||
175 | +setsockopt - setsockopt i:iiibn __setsockopt setsockopt | ||
176 | +shutdown - shutdown i:ii __shutdown shutdown | ||
177 | +socket - socket i:iii __socket socket | ||
178 | +socketpair - socketpair i:iiif __socketpair socketpair | ||
179 | Index: glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h | ||
180 | =================================================================== | ||
181 | --- glibc.orig/ports/sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h 2006-03-21 15:58:10.000000000 -0500 | ||
182 | +++ glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/linuxthreads/sysdep-cancel.h 2006-03-21 15:58:46.000000000 -0500 | ||
183 | @@ -53,9 +53,9 @@ | ||
184 | UNDOARGS_##args; \ | ||
185 | cmn r0, $4096; | ||
186 | |||
187 | -/* DOARGS pushes four bytes on the stack for five arguments, and nothing | ||
188 | - otherwise. In order to preserve doubleword alignment, sometimes we must | ||
189 | - save an extra register. */ | ||
190 | +/* DOARGS pushes four bytes on the stack for five arguments, eight bytes for | ||
191 | + six arguments, and nothing for fewer. In order to preserve doubleword | ||
192 | + alignment, sometimes we must save an extra register. */ | ||
193 | |||
194 | # define DOCARGS_0 stmfd sp!, {r7, lr} | ||
195 | # define UNDOCARGS_0 | ||
196 | @@ -81,6 +81,10 @@ | ||
197 | # define UNDOCARGS_5 ldmfd sp!, {r0, r1, r2, r3} | ||
198 | # define RESTORE_LR_5 ldmfd sp!, {r4, r7, lr} | ||
199 | |||
200 | +# define DOCARGS_6 stmfd sp!, {r0, r1, r2, r3, r7, lr} | ||
201 | +# define UNDOCARGS_6 ldmfd sp!, {r0, r1, r2, r3} | ||
202 | +# define RESTORE_LR_6 RESTORE_LR_0 | ||
203 | + | ||
204 | # ifdef IS_IN_libpthread | ||
205 | # define CENABLE bl PLTJMP(__pthread_enable_asynccancel) | ||
206 | # define CDISABLE bl PLTJMP(__pthread_disable_asynccancel) | ||
207 | Index: glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h | ||
208 | =================================================================== | ||
209 | --- glibc.orig/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h 2006-03-21 15:58:10.000000000 -0500 | ||
210 | +++ glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/nptl/sysdep-cancel.h 2006-03-21 15:58:46.000000000 -0500 | ||
211 | @@ -64,9 +64,9 @@ | ||
212 | UNDOARGS_##args; \ | ||
213 | cmn r0, $4096; | ||
214 | |||
215 | -/* DOARGS pushes four bytes on the stack for five arguments, and nothing | ||
216 | - otherwise. In order to preserve doubleword alignment, sometimes we must | ||
217 | - save an extra register. */ | ||
218 | +/* DOARGS pushes four bytes on the stack for five arguments, eight bytes for | ||
219 | + six arguments, and nothing for fewer. In order to preserve doubleword | ||
220 | + alignment, sometimes we must save an extra register. */ | ||
221 | |||
222 | # define RESTART_UNWIND .fnend; .fnstart; .save {r7, lr} | ||
223 | |||
224 | @@ -94,6 +94,10 @@ | ||
225 | # define UNDOCARGS_5 ldmfd sp!, {r0, r1, r2, r3}; .fnend; .fnstart; .save {r4}; .save {r7, lr}; .pad #4 | ||
226 | # define RESTORE_LR_5 ldmfd sp!, {r4, r7, lr} | ||
227 | |||
228 | +# define DOCARGS_6 .save {r4, r5}; stmfd sp!, {r0, r1, r2, r3, r7, lr}; .save {r7, lr}; .pad #20 | ||
229 | +# define UNDOCARGS_6 ldmfd sp!, {r0, r1, r2, r3}; .fnend; .fnstart; .save {r4, r5}; .save {r7, lr} | ||
230 | +# define RESTORE_LR_6 RESTORE_LR_0 | ||
231 | + | ||
232 | # ifdef IS_IN_libpthread | ||
233 | # define CENABLE bl PLTJMP(__pthread_enable_asynccancel) | ||
234 | # define CDISABLE bl PLTJMP(__pthread_disable_asynccancel) | ||
235 | Index: glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h | ||
236 | =================================================================== | ||
237 | --- glibc.orig/ports/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h 2006-03-21 15:58:10.000000000 -0500 | ||
238 | +++ glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/sysdep.h 2006-03-21 15:58:46.000000000 -0500 | ||
239 | @@ -1,4 +1,4 @@ | ||
240 | -/* Copyright (C) 2005 | ||
241 | +/* Copyright (C) 2005, 2006 | ||
242 | Free Software Foundation, Inc. | ||
243 | |||
244 | This file is part of the GNU C Library. | ||
245 | @@ -29,6 +29,12 @@ | ||
246 | # error Kernel headers are too old | ||
247 | #endif | ||
248 | |||
249 | +/* Don't use stime, even if the kernel headers define it. We have | ||
250 | + settimeofday, and some EABI kernels have removed stime. Similarly | ||
251 | + use setitimer to implement alarm. */ | ||
252 | +#undef __NR_stime | ||
253 | +#undef __NR_alarm | ||
254 | + | ||
255 | /* The ARM EABI user interface passes the syscall number in r7, instead | ||
256 | of in the swi. This is more efficient, because the kernel does not need | ||
257 | to fetch the swi from memory to find out the number; which can be painful | ||
258 | Index: glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/umount.c | ||
259 | =================================================================== | ||
260 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
261 | +++ glibc/ports/sysdeps/unix/sysv/linux/arm/eabi/umount.c 2006-03-21 15:58:46.000000000 -0500 | ||
262 | @@ -0,0 +1,31 @@ | ||
263 | +/* Copyright (C) 2000, 2001 Free Software Foundation, Inc. | ||
264 | + This file is part of the GNU C Library. | ||
265 | + Contributed by David Huggins-Daines <dhd@debian.org>, 2000. | ||
266 | + | ||
267 | + The GNU C Library is free software; you can redistribute it and/or | ||
268 | + modify it under the terms of the GNU Lesser General Public | ||
269 | + License as published by the Free Software Foundation; either | ||
270 | + version 2.1 of the License, or (at your option) any later version. | ||
271 | + | ||
272 | + The GNU C Library is distributed in the hope that it will be useful, | ||
273 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
274 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
275 | + Lesser General Public License for more details. | ||
276 | + | ||
277 | + You should have received a copy of the GNU Lesser General Public | ||
278 | + License along with the GNU C Library; if not, write to the Free | ||
279 | + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
280 | + 02111-1307 USA. */ | ||
281 | + | ||
282 | +/* Since we don't have an oldumount system call, do what the kernel | ||
283 | + does down here. */ | ||
284 | + | ||
285 | +extern long int __umount2 (const char *name, int flags); | ||
286 | + | ||
287 | +long int | ||
288 | +__umount (const char *name) | ||
289 | +{ | ||
290 | + return __umount2 (name, 0); | ||
291 | +} | ||
292 | + | ||
293 | +weak_alias (__umount, umount); | ||
294 | Index: glibc/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h | ||
295 | =================================================================== | ||
296 | --- /dev/null 1970-01-01 00:00:00.000000000 +0000 | ||
297 | +++ glibc/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h 2006-03-20 17:26:58.000000000 -0500 | ||
298 | @@ -0,0 +1,31 @@ | ||
299 | +/* Set flags signalling availability of kernel features based on given | ||
300 | + kernel version number. | ||
301 | + Copyright (C) 2006 Free Software Foundation, Inc. | ||
302 | + This file is part of the GNU C Library. | ||
303 | + | ||
304 | + The GNU C Library is free software; you can redistribute it and/or | ||
305 | + modify it under the terms of the GNU Lesser General Public | ||
306 | + License as published by the Free Software Foundation; either | ||
307 | + version 2.1 of the License, or (at your option) any later version. | ||
308 | + | ||
309 | + The GNU C Library is distributed in the hope that it will be useful, | ||
310 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
311 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
312 | + Lesser General Public License for more details. | ||
313 | + | ||
314 | + You should have received a copy of the GNU Lesser General Public | ||
315 | + License along with the GNU C Library; if not, write to the Free | ||
316 | + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA | ||
317 | + 02111-1307 USA. */ | ||
318 | + | ||
319 | +/* The utimes syscall was added before 2.6.1. */ | ||
320 | +#if __LINUX_KERNEL_VERSION >= 132609 | ||
321 | +# define __ASSUME_UTIMES 1 | ||
322 | +#endif | ||
323 | + | ||
324 | +/* The new getrlimit syscall was added sometime before 2.4.6. */ | ||
325 | +#if __LINUX_KERNEL_VERSION >= 132102 | ||
326 | +#define __ASSUME_NEW_GETRLIMIT_SYSCALL 1 | ||
327 | +#endif | ||
328 | + | ||
329 | +#include_next <kernel-features.h> | ||