[kernel] add simple prom emulator for MIPS
[openwrt.git] / target / linux / generic-2.4 / patches / 108-optional_aout_support.patch
1 Index: linux-2.4.35.4/Documentation/Configure.help
2 ===================================================================
3 --- linux-2.4.35.4.orig/Documentation/Configure.help
4 +++ linux-2.4.35.4/Documentation/Configure.help
5 @@ -4690,6 +4690,12 @@ CONFIG_BINFMT_ELF
6 ld.so (check the file <file:Documentation/Changes> for location and
7 latest version).
8
9 +ELF binaries with a.out format interpreters or a.out libraries
10 +CONFIG_BINFMT_ELF_AOUT
11 + The kernel may support ELF executables which use an a.out format
12 + interpreter (dynamic linker) and/or a.out shared libraries, in
13 + addition to the usual ELF-ELF setups. You shouldn't need this.
14 +
15 Kernel support for a.out binaries
16 CONFIG_BINFMT_AOUT
17 A.out (Assembler.OUTput) is a set of formats for libraries and
18 @@ -4703,13 +4709,11 @@ CONFIG_BINFMT_AOUT
19 warrant removing support. However its removal is a good idea if you
20 wish to ensure that absolutely none of your programs will use this
21 older executable format. If you don't know what to answer at this
22 - point then answer Y. If someone told you "You need a kernel with
23 + point then answer N. If someone told you "You need a kernel with
24 QMAGIC support" then you'll have to say Y here. You may answer M to
25 compile a.out support as a module and later load the module when you
26 want to use a program or library in a.out format. The module will be
27 - called binfmt_aout.o. Saying M or N here is dangerous though,
28 - because some crucial programs on your system might still be in A.OUT
29 - format.
30 + called binfmt_aout.o.
31
32 OSF/1 v4 readv/writev compatibility
33 CONFIG_OSF4_COMPAT
34 Index: linux-2.4.35.4/arch/alpha/config.in
35 ===================================================================
36 --- linux-2.4.35.4.orig/arch/alpha/config.in
37 +++ linux-2.4.35.4/arch/alpha/config.in
38 @@ -315,6 +315,9 @@ if [ "$CONFIG_BINFMT_AOUT" != "n" ]; the
39 fi
40
41 bool 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
42 +if [ "$CONFIG_BINFMT_ELF" != "n" ]; then
43 + bool ' ELF binaries with a.out format interpreters or a.out libraries' CONFIG_BINFMT_ELF_AOUT
44 +fi
45 tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
46 tristate 'Kernel support for Linux/Intel ELF binaries' CONFIG_BINFMT_EM86
47 source drivers/parport/Config.in
48 Index: linux-2.4.35.4/arch/alpha/defconfig
49 ===================================================================
50 --- linux-2.4.35.4.orig/arch/alpha/defconfig
51 +++ linux-2.4.35.4/arch/alpha/defconfig
52 @@ -72,6 +72,7 @@ CONFIG_KCORE_ELF=y
53 # CONFIG_KCORE_AOUT is not set
54 # CONFIG_BINFMT_AOUT is not set
55 CONFIG_BINFMT_ELF=y
56 +# CONFIG_BINFMT_ELF_AOUT is not set
57 # CONFIG_BINFMT_MISC is not set
58 # CONFIG_BINFMT_EM86 is not set
59
60 Index: linux-2.4.35.4/arch/arm/config.in
61 ===================================================================
62 --- linux-2.4.35.4.orig/arch/arm/config.in
63 +++ linux-2.4.35.4/arch/arm/config.in
64 @@ -499,6 +499,9 @@ choice 'Kernel core (/proc/kcore) format
65 A.OUT CONFIG_KCORE_AOUT" ELF
66 tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT
67 bool 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
68 +if [ "$CONFIG_BINFMT_ELF" != "n" ]; then
69 + bool ' ELF binaries with a.out format interpreters or a.out libraries' CONFIG_BINFMT_ELF_AOUT
70 +fi
71 tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
72 dep_bool 'Power Management support (experimental)' CONFIG_PM $CONFIG_EXPERIMENTAL
73 dep_tristate 'RISC OS personality' CONFIG_ARTHUR $CONFIG_CPU_32
74 Index: linux-2.4.35.4/arch/arm/defconfig
75 ===================================================================
76 --- linux-2.4.35.4.orig/arch/arm/defconfig
77 +++ linux-2.4.35.4/arch/arm/defconfig
78 @@ -83,8 +83,9 @@ CONFIG_SYSCTL=y
79 CONFIG_NWFPE=y
80 CONFIG_KCORE_ELF=y
81 # CONFIG_KCORE_AOUT is not set
82 -CONFIG_BINFMT_AOUT=y
83 +# CONFIG_BINFMT_AOUT is not set
84 CONFIG_BINFMT_ELF=y
85 +# CONFIG_BINFMT_ELF_AOUT is not set
86 # CONFIG_BINFMT_MISC is not set
87 # CONFIG_PM is not set
88 # CONFIG_ARTHUR is not set
89 Index: linux-2.4.35.4/arch/cris/config.in
90 ===================================================================
91 --- linux-2.4.35.4.orig/arch/cris/config.in
92 +++ linux-2.4.35.4/arch/cris/config.in
93 @@ -31,6 +31,9 @@ bool 'BSD Process Accounting' CONFIG_BSD
94 bool 'Sysctl support' CONFIG_SYSCTL
95
96 bool 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
97 +if [ "$CONFIG_BINFMT_ELF" != "n" ]; then
98 + bool ' ELF binaries with a.out format interpreters or a.out libraries' CONFIG_BINFMT_ELF_AOUT
99 +fi
100
101 string 'Kernel command line' CONFIG_ETRAX_CMDLINE "root=/dev/mtdblock3"
102
103 Index: linux-2.4.35.4/arch/cris/defconfig
104 ===================================================================
105 --- linux-2.4.35.4.orig/arch/cris/defconfig
106 +++ linux-2.4.35.4/arch/cris/defconfig
107 @@ -18,6 +18,7 @@ CONFIG_SYSVIPC=y
108 # CONFIG_BSD_PROCESS_ACCT is not set
109 # CONFIG_SYSCTL is not set
110 CONFIG_BINFMT_ELF=y
111 +# CONFIG_BINFMT_ELF_AOUT is not set
112 # CONFIG_ETRAX_KGDB is not set
113 # CONFIG_ETRAX_WATCHDOG is not set
114
115 Index: linux-2.4.35.4/arch/i386/config.in
116 ===================================================================
117 --- linux-2.4.35.4.orig/arch/i386/config.in
118 +++ linux-2.4.35.4/arch/i386/config.in
119 @@ -329,6 +329,9 @@ if [ "$CONFIG_PROC_FS" = "y" ]; then
120 fi
121 tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT
122 bool 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
123 +if [ "$CONFIG_BINFMT_ELF" != "n" ]; then
124 + bool ' ELF binaries with a.out format interpreters or a.out libraries' CONFIG_BINFMT_ELF_AOUT
125 +fi
126 tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
127 bool 'Select task to kill on out of memory condition' CONFIG_OOM_KILLER
128
129 Index: linux-2.4.35.4/arch/i386/defconfig
130 ===================================================================
131 --- linux-2.4.35.4.orig/arch/i386/defconfig
132 +++ linux-2.4.35.4/arch/i386/defconfig
133 @@ -115,9 +115,10 @@ CONFIG_SYSVIPC=y
134 CONFIG_SYSCTL=y
135 CONFIG_KCORE_ELF=y
136 # CONFIG_KCORE_AOUT is not set
137 -CONFIG_BINFMT_AOUT=y
138 +# CONFIG_BINFMT_AOUT is not set
139 CONFIG_BINFMT_ELF=y
140 -CONFIG_BINFMT_MISC=y
141 +# CONFIG_BINFMT_ELF_AOUT is not set
142 +# CONFIG_BINFMT_MISC is not set
143 # CONFIG_OOM_KILLER is not set
144 CONFIG_PM=y
145 # CONFIG_APM is not set
146 Index: linux-2.4.35.4/arch/ia64/config.in
147 ===================================================================
148 --- linux-2.4.35.4.orig/arch/ia64/config.in
149 +++ linux-2.4.35.4/arch/ia64/config.in
150 @@ -124,6 +124,9 @@ bool 'System V IPC' CONFIG_SYSVIPC
151 bool 'BSD Process Accounting' CONFIG_BSD_PROCESS_ACCT
152 bool 'Sysctl support' CONFIG_SYSCTL
153 bool 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
154 +if [ "$CONFIG_BINFMT_ELF" != "n" ]; then
155 + bool ' ELF binaries with a.out format interpreters or a.out libraries' CONFIG_BINFMT_ELF_AOUT
156 +fi
157 tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
158
159 if [ "$CONFIG_IA64_HP_SIM" = "n" ]; then
160 Index: linux-2.4.35.4/arch/ia64/defconfig
161 ===================================================================
162 --- linux-2.4.35.4.orig/arch/ia64/defconfig
163 +++ linux-2.4.35.4/arch/ia64/defconfig
164 @@ -60,6 +60,7 @@ CONFIG_SYSVIPC=y
165 # CONFIG_BSD_PROCESS_ACCT is not set
166 CONFIG_SYSCTL=y
167 CONFIG_BINFMT_ELF=y
168 +# CONFIG_BINFMT_ELF_AOUT is not set
169 # CONFIG_BINFMT_MISC is not set
170 CONFIG_ACPI=y
171 CONFIG_ACPI_EFI=y
172 Index: linux-2.4.35.4/arch/m68k/config.in
173 ===================================================================
174 --- linux-2.4.35.4.orig/arch/m68k/config.in
175 +++ linux-2.4.35.4/arch/m68k/config.in
176 @@ -99,6 +99,9 @@ if [ "$CONFIG_PROC_FS" = "y" ]; then
177 fi
178 tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT
179 bool 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
180 +if [ "$CONFIG_BINFMT_ELF" != "n" ]; then
181 + bool ' ELF binaries with a.out format interpreters or a.out libraries' CONFIG_BINFMT_ELF_AOUT
182 +fi
183 tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
184
185 if [ "$CONFIG_AMIGA" = "y" ]; then
186 Index: linux-2.4.35.4/arch/m68k/defconfig
187 ===================================================================
188 --- linux-2.4.35.4.orig/arch/m68k/defconfig
189 +++ linux-2.4.35.4/arch/m68k/defconfig
190 @@ -44,8 +44,9 @@ CONFIG_SYSVIPC=y
191 CONFIG_SYSCTL=y
192 CONFIG_KCORE_ELF=y
193 # CONFIG_KCORE_AOUT is not set
194 -CONFIG_BINFMT_AOUT=y
195 +# CONFIG_BINFMT_AOUT is not set
196 CONFIG_BINFMT_ELF=y
197 +# CONFIG_BINFMT_ELF_AOUT is not set
198 # CONFIG_BINFMT_MISC is not set
199 CONFIG_ZORRO=y
200 # CONFIG_AMIGA_PCMCIA is not set
201 Index: linux-2.4.35.4/arch/mips/config-shared.in
202 ===================================================================
203 --- linux-2.4.35.4.orig/arch/mips/config-shared.in
204 +++ linux-2.4.35.4/arch/mips/config-shared.in
205 @@ -873,6 +873,9 @@ define_bool CONFIG_KCORE_ELF y
206 define_bool CONFIG_KCORE_AOUT n
207 define_bool CONFIG_BINFMT_AOUT n
208 bool 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
209 +if [ "$CONFIG_BINFMT_ELF" != "n" ]; then
210 + bool ' ELF binaries with a.out format interpreters or a.out libraries' CONFIG_BINFMT_ELF_AOUT
211 +fi
212 dep_bool 'Kernel support for Linux/MIPS 32-bit binary compatibility' CONFIG_MIPS32_COMPAT $CONFIG_MIPS64
213 dep_bool 'Kernel support for o32 binaries' CONFIG_MIPS32_O32 $CONFIG_MIPS32_COMPAT
214 dep_bool 'Kernel support for n32 binaries' CONFIG_MIPS32_N32 $CONFIG_MIPS32_COMPAT
215 Index: linux-2.4.35.4/arch/mips/defconfig
216 ===================================================================
217 --- linux-2.4.35.4.orig/arch/mips/defconfig
218 +++ linux-2.4.35.4/arch/mips/defconfig
219 @@ -143,6 +143,7 @@ CONFIG_KCORE_ELF=y
220 # CONFIG_KCORE_AOUT is not set
221 # CONFIG_BINFMT_AOUT is not set
222 CONFIG_BINFMT_ELF=y
223 +# CONFIG_BINFMT_ELF_AOUT is not set
224 # CONFIG_MIPS32_COMPAT is not set
225 # CONFIG_MIPS32_O32 is not set
226 # CONFIG_MIPS32_N32 is not set
227 Index: linux-2.4.35.4/arch/mips/kernel/irixelf.c
228 ===================================================================
229 --- linux-2.4.35.4.orig/arch/mips/kernel/irixelf.c
230 +++ linux-2.4.35.4/arch/mips/kernel/irixelf.c
231 @@ -8,6 +8,7 @@
232 * Copyright 1993, 1994: Eric Youngdale (ericy@cais.com).
233 */
234
235 +#include <linux/config.h>
236 #include <linux/module.h>
237
238 #include <linux/fs.h>
239 @@ -48,7 +49,12 @@ static int irix_core_dump(long signr, st
240 extern int dump_fpu (elf_fpregset_t *);
241
242 static struct linux_binfmt irix_format = {
243 - NULL, THIS_MODULE, load_irix_binary, load_irix_library,
244 + NULL, THIS_MODULE, load_irix_binary,
245 +#ifdef CONFIG_BINFMT_ELF_AOUT
246 + load_irix_library,
247 +#else
248 + NULL,
249 +#endif
250 irix_core_dump, PAGE_SIZE
251 };
252
253 @@ -794,6 +800,7 @@ out_free_ph:
254 goto out;
255 }
256
257 +#ifdef CONFIG_BINFMT_ELF_AOUT
258 /* This is really simpleminded and specialized - we are loading an
259 * a.out library that is given an ELF header.
260 */
261 @@ -873,6 +880,7 @@ static int load_irix_library(struct file
262 kfree(elf_phdata);
263 return 0;
264 }
265 +#endif
266
267 /* Called through irix_syssgi() to map an elf image given an FD,
268 * a phdr ptr USER_PHDRP in userspace, and a count CNT telling how many
269 Index: linux-2.4.35.4/arch/mips64/defconfig
270 ===================================================================
271 --- linux-2.4.35.4.orig/arch/mips64/defconfig
272 +++ linux-2.4.35.4/arch/mips64/defconfig
273 @@ -147,6 +147,7 @@ CONFIG_KCORE_ELF=y
274 # CONFIG_KCORE_AOUT is not set
275 # CONFIG_BINFMT_AOUT is not set
276 CONFIG_BINFMT_ELF=y
277 +# CONFIG_BINFMT_ELF_AOUT is not set
278 CONFIG_MIPS32_COMPAT=y
279 CONFIG_MIPS32_O32=y
280 # CONFIG_MIPS32_N32 is not set
281 Index: linux-2.4.35.4/arch/parisc/config.in
282 ===================================================================
283 --- linux-2.4.35.4.orig/arch/parisc/config.in
284 +++ linux-2.4.35.4/arch/parisc/config.in
285 @@ -89,6 +89,9 @@ bool 'BSD Process Accounting' CONFIG_BSD
286 bool 'Sysctl support' CONFIG_SYSCTL
287 define_bool CONFIG_KCORE_ELF y
288 bool 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
289 +if [ "$CONFIG_BINFMT_ELF" != "n" ]; then
290 + bool ' ELF binaries with a.out format interpreters or a.out libraries' CONFIG_BINFMT_ELF_AOUT
291 +fi
292 tristate 'Kernel support for SOM binaries' CONFIG_BINFMT_SOM
293 tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
294
295 Index: linux-2.4.35.4/arch/parisc/defconfig
296 ===================================================================
297 --- linux-2.4.35.4.orig/arch/parisc/defconfig
298 +++ linux-2.4.35.4/arch/parisc/defconfig
299 @@ -56,6 +56,7 @@ CONFIG_SYSVIPC=y
300 CONFIG_SYSCTL=y
301 CONFIG_KCORE_ELF=y
302 CONFIG_BINFMT_ELF=y
303 +# CONFIG_BINFMT_ELF_AOUT is not set
304 CONFIG_BINFMT_SOM=y
305 # CONFIG_BINFMT_MISC is not set
306 # CONFIG_PM is not set
307 Index: linux-2.4.35.4/arch/ppc/config.in
308 ===================================================================
309 --- linux-2.4.35.4.orig/arch/ppc/config.in
310 +++ linux-2.4.35.4/arch/ppc/config.in
311 @@ -384,6 +384,7 @@ if [ "$CONFIG_PROC_FS" = "y" ]; then
312 fi
313 define_bool CONFIG_BINFMT_ELF y
314 define_bool CONFIG_KERNEL_ELF y
315 +bool 'ELF binaries with a.out format interpreters or a.out libraries' CONFIG_BINFMT_ELF_AOUT
316 tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
317 bool 'Select task to kill on out of memory condition' CONFIG_OOM_KILLER
318
319 Index: linux-2.4.35.4/arch/ppc/defconfig
320 ===================================================================
321 --- linux-2.4.35.4.orig/arch/ppc/defconfig
322 +++ linux-2.4.35.4/arch/ppc/defconfig
323 @@ -59,7 +59,8 @@ CONFIG_SYSVIPC=y
324 CONFIG_KCORE_ELF=y
325 CONFIG_BINFMT_ELF=y
326 CONFIG_KERNEL_ELF=y
327 -CONFIG_BINFMT_MISC=m
328 +# CONFIG_BINFMT_ELF_AOUT is not set
329 +# CONFIG_BINFMT_MISC is not set
330 # CONFIG_OOM_KILLER is not set
331 CONFIG_PCI_NAMES=y
332 CONFIG_HOTPLUG=y
333 Index: linux-2.4.35.4/arch/ppc64/config.in
334 ===================================================================
335 --- linux-2.4.35.4.orig/arch/ppc64/config.in
336 +++ linux-2.4.35.4/arch/ppc64/config.in
337 @@ -82,6 +82,9 @@ if [ "$CONFIG_PROC_FS" = "y" ]; then
338 fi
339
340 bool 'Kernel support for 64 bit ELF binaries' CONFIG_BINFMT_ELF
341 +if [ "$CONFIG_BINFMT_ELF" != "n" ]; then
342 + bool ' ELF binaries with a.out format interpreters or a.out libraries' CONFIG_BINFMT_ELF_AOUT
343 +fi
344
345 tristate 'Kernel support for 32 bit ELF binaries' CONFIG_BINFMT_ELF32
346
347 Index: linux-2.4.35.4/arch/ppc64/defconfig
348 ===================================================================
349 --- linux-2.4.35.4.orig/arch/ppc64/defconfig
350 +++ linux-2.4.35.4/arch/ppc64/defconfig
351 @@ -56,6 +56,7 @@ CONFIG_SYSVIPC=y
352 # CONFIG_BSD_PROCESS_ACCT is not set
353 CONFIG_KCORE_ELF=y
354 CONFIG_BINFMT_ELF=y
355 +# CONFIG_BINFMT_ELF_AOUT is not set
356 CONFIG_BINFMT_ELF32=y
357 # CONFIG_BINFMT_MISC is not set
358 CONFIG_PCI_NAMES=y
359 Index: linux-2.4.35.4/arch/s390/config.in
360 ===================================================================
361 --- linux-2.4.35.4.orig/arch/s390/config.in
362 +++ linux-2.4.35.4/arch/s390/config.in
363 @@ -58,6 +58,9 @@ bool 'BSD Process Accounting' CONFIG_BSD
364 bool 'Sysctl support' CONFIG_SYSCTL
365 define_bool CONFIG_KCORE_ELF y
366 bool 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
367 +if [ "$CONFIG_BINFMT_ELF" != "n" ]; then
368 + bool ' ELF binaries with a.out format interpreters or a.out libraries' CONFIG_BINFMT_ELF_AOUT
369 +fi
370 tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
371 bool 'Show crashed user process info' CONFIG_PROCESS_DEBUG
372 bool 'Pseudo page fault support' CONFIG_PFAULT
373 Index: linux-2.4.35.4/arch/s390/defconfig
374 ===================================================================
375 --- linux-2.4.35.4.orig/arch/s390/defconfig
376 +++ linux-2.4.35.4/arch/s390/defconfig
377 @@ -46,6 +46,7 @@ CONFIG_SYSVIPC=y
378 CONFIG_SYSCTL=y
379 CONFIG_KCORE_ELF=y
380 CONFIG_BINFMT_ELF=y
381 +# CONFIG_BINFMT_ELF_AOUT is not set
382 # CONFIG_BINFMT_MISC is not set
383 # CONFIG_PROCESS_DEBUG is not set
384 CONFIG_PFAULT=y
385 Index: linux-2.4.35.4/arch/s390x/config.in
386 ===================================================================
387 --- linux-2.4.35.4.orig/arch/s390x/config.in
388 +++ linux-2.4.35.4/arch/s390x/config.in
389 @@ -61,6 +61,9 @@ bool 'BSD Process Accounting' CONFIG_BSD
390 bool 'Sysctl support' CONFIG_SYSCTL
391 define_bool CONFIG_KCORE_ELF y
392 bool 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
393 +if [ "$CONFIG_BINFMT_ELF" != "n" ]; then
394 + bool ' ELF binaries with a.out format interpreters or a.out libraries' CONFIG_BINFMT_ELF_AOUT
395 +fi
396 tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
397 bool 'Show crashed user process info' CONFIG_PROCESS_DEBUG
398 bool 'Pseudo page fault support' CONFIG_PFAULT
399 Index: linux-2.4.35.4/arch/s390x/defconfig
400 ===================================================================
401 --- linux-2.4.35.4.orig/arch/s390x/defconfig
402 +++ linux-2.4.35.4/arch/s390x/defconfig
403 @@ -47,6 +47,7 @@ CONFIG_SYSVIPC=y
404 CONFIG_SYSCTL=y
405 CONFIG_KCORE_ELF=y
406 CONFIG_BINFMT_ELF=y
407 +# CONFIG_BINFMT_ELF_AOUT is not set
408 # CONFIG_BINFMT_MISC is not set
409 # CONFIG_PROCESS_DEBUG is not set
410 CONFIG_PFAULT=y
411 Index: linux-2.4.35.4/arch/sh/config.in
412 ===================================================================
413 --- linux-2.4.35.4.orig/arch/sh/config.in
414 +++ linux-2.4.35.4/arch/sh/config.in
415 @@ -283,6 +283,9 @@ if [ "$CONFIG_PROC_FS" = "y" ]; then
416 A.OUT CONFIG_KCORE_AOUT" ELF
417 fi
418 bool 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
419 +if [ "$CONFIG_BINFMT_ELF" != "n" ]; then
420 + bool ' ELF binaries with a.out format interpreters or a.out libraries' CONFIG_BINFMT_ELF_AOUT
421 +fi
422 tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
423
424 bool 'Select task to kill on out of memory condition' CONFIG_OOM_KILLER
425 Index: linux-2.4.35.4/arch/sh/defconfig
426 ===================================================================
427 --- linux-2.4.35.4.orig/arch/sh/defconfig
428 +++ linux-2.4.35.4/arch/sh/defconfig
429 @@ -48,6 +48,7 @@ CONFIG_CF_ENABLER=y
430 CONFIG_KCORE_ELF=y
431 # CONFIG_KCORE_AOUT is not set
432 CONFIG_BINFMT_ELF=y
433 +# CONFIG_BINFMT_ELF_AOUT is not set
434 # CONFIG_BINFMT_MISC is not set
435
436 #
437 Index: linux-2.4.35.4/arch/sparc/config.in
438 ===================================================================
439 --- linux-2.4.35.4.orig/arch/sparc/config.in
440 +++ linux-2.4.35.4/arch/sparc/config.in
441 @@ -74,6 +74,9 @@ if [ "$CONFIG_PROC_FS" = "y" ]; then
442 fi
443 tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT
444 bool 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
445 +if [ "$CONFIG_BINFMT_ELF" != "n" ]; then
446 + bool ' ELF binaries with a.out format interpreters or a.out libraries' CONFIG_BINFMT_ELF_AOUT
447 +fi
448 tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
449 bool 'SunOS binary emulation' CONFIG_SUNOS_EMUL
450 bool 'Select task to kill on out of memory condition' CONFIG_OOM_KILLER
451 Index: linux-2.4.35.4/arch/sparc/defconfig
452 ===================================================================
453 --- linux-2.4.35.4.orig/arch/sparc/defconfig
454 +++ linux-2.4.35.4/arch/sparc/defconfig
455 @@ -49,9 +49,10 @@ CONFIG_SYSVIPC=y
456 # CONFIG_BSD_PROCESS_ACCT is not set
457 CONFIG_SYSCTL=y
458 CONFIG_KCORE_ELF=y
459 -CONFIG_BINFMT_AOUT=y
460 +# CONFIG_BINFMT_AOUT is not set
461 CONFIG_BINFMT_ELF=y
462 -CONFIG_BINFMT_MISC=m
463 +# CONFIG_BINFMT_ELF_AOUT is not set
464 +# CONFIG_BINFMT_MISC is not set
465 CONFIG_SUNOS_EMUL=y
466 # CONFIG_OOM_KILLER is not set
467
468 Index: linux-2.4.35.4/arch/sparc64/config.in
469 ===================================================================
470 --- linux-2.4.35.4.orig/arch/sparc64/config.in
471 +++ linux-2.4.35.4/arch/sparc64/config.in
472 @@ -79,6 +79,9 @@ if [ "$CONFIG_SPARC32_COMPAT" != "n" ];
473 bool ' Kernel support for 32-bit (ie. SunOS) a.out binaries' CONFIG_BINFMT_AOUT32
474 fi
475 bool 'Kernel support for 64-bit ELF binaries' CONFIG_BINFMT_ELF
476 +if [ "$CONFIG_BINFMT_ELF" != "n" ]; then
477 + bool ' ELF binaries with a.out format interpreters or a.out libraries' CONFIG_BINFMT_ELF_AOUT
478 +fi
479 tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
480 bool 'SunOS binary emulation' CONFIG_SUNOS_EMUL
481 if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
482 Index: linux-2.4.35.4/arch/sparc64/defconfig
483 ===================================================================
484 --- linux-2.4.35.4.orig/arch/sparc64/defconfig
485 +++ linux-2.4.35.4/arch/sparc64/defconfig
486 @@ -70,7 +70,8 @@ CONFIG_SPARC32_COMPAT=y
487 CONFIG_BINFMT_ELF32=y
488 # CONFIG_BINFMT_AOUT32 is not set
489 CONFIG_BINFMT_ELF=y
490 -CONFIG_BINFMT_MISC=m
491 +# CONFIG_BINFMT_ELF_AOUT is not set
492 +# CONFIG_BINFMT_MISC is not set
493 # CONFIG_SUNOS_EMUL is not set
494 CONFIG_SOLARIS_EMUL=m
495 # CONFIG_OOM_KILLER is not set
496 Index: linux-2.4.35.4/arch/x86_64/config.in
497 ===================================================================
498 --- linux-2.4.35.4.orig/arch/x86_64/config.in
499 +++ linux-2.4.35.4/arch/x86_64/config.in
500 @@ -118,6 +118,9 @@ if [ "$CONFIG_PROC_FS" = "y" ]; then
501 fi
502 #tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT
503 bool 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF
504 +if [ "$CONFIG_BINFMT_ELF" != "n" ]; then
505 + bool ' ELF binaries with a.out format interpreters or a.out libraries' CONFIG_BINFMT_ELF_AOUT
506 +fi
507 tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
508
509 bool 'Power Management support' CONFIG_PM
510 Index: linux-2.4.35.4/arch/x86_64/defconfig
511 ===================================================================
512 --- linux-2.4.35.4.orig/arch/x86_64/defconfig
513 +++ linux-2.4.35.4/arch/x86_64/defconfig
514 @@ -67,6 +67,7 @@ CONFIG_SYSVIPC=y
515 CONFIG_SYSCTL=y
516 CONFIG_KCORE_ELF=y
517 CONFIG_BINFMT_ELF=y
518 +# CONFIG_BINFMT_ELF_AOUT is not set
519 # CONFIG_BINFMT_MISC is not set
520 CONFIG_PM=y
521 CONFIG_IA32_EMULATION=y
522 Index: linux-2.4.35.4/fs/binfmt_elf.c
523 ===================================================================
524 --- linux-2.4.35.4.orig/fs/binfmt_elf.c
525 +++ linux-2.4.35.4/fs/binfmt_elf.c
526 @@ -9,6 +9,7 @@
527 * Copyright 1993, 1994: Eric Youngdale (ericy@cais.com).
528 */
529
530 +#include <linux/config.h>
531 #include <linux/module.h>
532
533 #include <linux/fs.h>
534 @@ -43,7 +44,9 @@
535 #include <linux/elf.h>
536
537 static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs);
538 +#ifdef CONFIG_BINFMT_ELF_AOUT
539 static int load_elf_library(struct file*);
540 +#endif
541 static unsigned long elf_map (struct file *, unsigned long, struct elf_phdr *, int, int);
542 extern int dump_fpu (struct pt_regs *, elf_fpregset_t *);
543 extern void dump_thread(struct pt_regs *, struct user *);
544 @@ -74,7 +77,13 @@ static int elf_core_dump(long signr, str
545 #define ELF_PAGEALIGN(_v) (((_v) + ELF_MIN_ALIGN - 1) & ~(ELF_MIN_ALIGN - 1))
546
547 static struct linux_binfmt elf_format = {
548 - NULL, THIS_MODULE, load_elf_binary, load_elf_library, elf_core_dump, ELF_EXEC_PAGESIZE
549 + NULL, THIS_MODULE, load_elf_binary,
550 +#ifdef CONFIG_BINFMT_ELF_AOUT
551 + load_elf_library,
552 +#else
553 + NULL,
554 +#endif
555 + elf_core_dump, ELF_EXEC_PAGESIZE
556 };
557
558 #define BAD_ADDR(x) ((unsigned long)(x) >= TASK_SIZE)
559 @@ -404,6 +413,7 @@ out:
560 return error;
561 }
562
563 +#ifdef CONFIG_BINFMT_ELF_AOUT
564 static unsigned long load_aout_interp(struct exec * interp_ex,
565 struct file * interpreter)
566 {
567 @@ -451,6 +461,7 @@ static unsigned long load_aout_interp(st
568 out:
569 return elf_entry;
570 }
571 +#endif
572
573 /*
574 * These are the functions used to load ELF style executables and shared
575 @@ -458,7 +469,9 @@ out:
576 */
577
578 #define INTERPRETER_NONE 0
579 +#ifdef CONFIG_BINFMT_ELF_AOUT
580 #define INTERPRETER_AOUT 1
581 +#endif
582 #define INTERPRETER_ELF 2
583
584
585 @@ -482,7 +495,9 @@ static int load_elf_binary(struct linux_
586 struct elfhdr elf_ex;
587 struct elfhdr interp_elf_ex;
588 struct exec interp_ex;
589 +#ifdef CONFIG_BINFMT_ELF_AOUT
590 char passed_fileno[6];
591 +#endif
592 struct files_struct *files;
593
594 /* Get the exec-header */
595 @@ -612,6 +627,7 @@ static int load_elf_binary(struct linux_
596
597 /* Some simple consistency checks for the interpreter */
598 if (elf_interpreter) {
599 +#ifdef CONFIG_BINFMT_ELF_AOUT
600 interpreter_type = INTERPRETER_ELF | INTERPRETER_AOUT;
601
602 /* Now figure out which format our binary is */
603 @@ -619,6 +635,9 @@ static int load_elf_binary(struct linux_
604 (N_MAGIC(interp_ex) != ZMAGIC) &&
605 (N_MAGIC(interp_ex) != QMAGIC))
606 interpreter_type = INTERPRETER_ELF;
607 +#else
608 + interpreter_type = INTERPRETER_ELF;
609 +#endif
610
611 if (memcmp(interp_elf_ex.e_ident, ELFMAG, SELFMAG) != 0)
612 interpreter_type &= ~INTERPRETER_ELF;
613 @@ -627,6 +646,7 @@ static int load_elf_binary(struct linux_
614 if (!interpreter_type)
615 goto out_free_dentry;
616
617 +#ifdef CONFIG_BINFMT_ELF_AOUT
618 /* Make sure only one type was selected */
619 if ((interpreter_type & INTERPRETER_ELF) &&
620 interpreter_type != INTERPRETER_ELF) {
621 @@ -634,6 +654,7 @@ static int load_elf_binary(struct linux_
622 // printk(KERN_WARNING "ELF: Ambiguous type, using ELF\n");
623 interpreter_type = INTERPRETER_ELF;
624 }
625 +#endif
626 /* Verify the interpreter has a valid arch */
627 if ((interpreter_type == INTERPRETER_ELF) &&
628 !elf_check_arch(&interp_elf_ex))
629 @@ -651,6 +672,7 @@ static int load_elf_binary(struct linux_
630 /* OK, we are done with that, now set up the arg stuff,
631 and then start this sucker up */
632
633 +#ifdef CONFIG_BINFMT_ELF_AOUT
634 if (!bprm->sh_bang) {
635 char * passed_p;
636
637 @@ -669,6 +691,7 @@ static int load_elf_binary(struct linux_
638 /* Executables without an interpreter also need a personality */
639 SET_PERSONALITY(elf_ex, ibcs2_interpreter);
640 }
641 +#endif
642
643 /* Flush all traces of the currently running executable */
644 retval = flush_old_exec(bprm);
645 @@ -817,10 +840,12 @@ static int load_elf_binary(struct linux_
646 padzero(elf_bss);
647
648 if (elf_interpreter) {
649 +#ifdef CONFIG_BINFMT_ELF_AOUT
650 if (interpreter_type == INTERPRETER_AOUT)
651 elf_entry = load_aout_interp(&interp_ex,
652 interpreter);
653 else
654 +#endif
655 elf_entry = load_elf_interp(&interp_elf_ex,
656 interpreter,
657 &interp_load_addr);
658 @@ -849,7 +874,9 @@ static int load_elf_binary(struct linux_
659
660 kfree(elf_phdata);
661
662 +#ifdef CONFIG_BINFMT_ELF_AOUT
663 if (interpreter_type != INTERPRETER_AOUT)
664 +#endif
665 sys_close(elf_exec_fileno);
666
667 set_binfmt(&elf_format);
668 @@ -863,10 +890,14 @@ static int load_elf_binary(struct linux_
669 &elf_ex,
670 load_addr, load_bias,
671 interp_load_addr,
672 +#ifdef CONFIG_BINFMT_ELF_AOUT
673 (interpreter_type == INTERPRETER_AOUT ? 0 : 1));
674 /* N.B. passed_fileno might not be initialized? */
675 if (interpreter_type == INTERPRETER_AOUT)
676 current->mm->arg_start += strlen(passed_fileno) + 1;
677 +#else
678 + 1);
679 +#endif
680 current->mm->start_brk = current->mm->brk = elf_brk;
681 current->mm->end_code = end_code;
682 current->mm->start_code = start_code;
683 @@ -937,9 +968,9 @@ out_free_ph:
684 goto out;
685 }
686
687 +#ifdef CONFIG_BINFMT_ELF_AOUT
688 /* This is really simpleminded and specialized - we are loading an
689 a.out library that is given an ELF header. */
690 -
691 static int load_elf_library(struct file *file)
692 {
693 struct elf_phdr *elf_phdata;
694 @@ -1016,6 +1047,7 @@ out_free_ph:
695 out:
696 return error;
697 }
698 +#endif
699
700 /*
701 * Note that some platforms still use traditional core dumps and not
702 Index: linux-2.4.35.4/fs/exec.c
703 ===================================================================
704 --- linux-2.4.35.4.orig/fs/exec.c
705 +++ linux-2.4.35.4/fs/exec.c
706 @@ -109,6 +109,7 @@ static inline void put_binfmt(struct lin
707 */
708 asmlinkage long sys_uselib(const char * library)
709 {
710 +#if defined(CONFIG_BINFMT_AOUT) || defined(CONFIG_BINFMT_ELF_AOUT)
711 struct file * file;
712 struct nameidata nd;
713 int error;
714 @@ -155,6 +156,9 @@ out:
715 exit:
716 path_release(&nd);
717 goto out;
718 +#else
719 + return -ENOSYS;
720 +#endif
721 }
722
723 /*
This page took 0.072074 seconds and 5 git commands to generate.