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
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.
15 Kernel support for a.out binaries
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
30 + called binfmt_aout.o.
32 OSF/1 v4 readv/writev compatibility
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
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
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
56 +# CONFIG_BINFMT_ELF_AOUT is not set
57 # CONFIG_BINFMT_MISC is not set
58 # CONFIG_BINFMT_EM86 is not set
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
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
81 # CONFIG_KCORE_AOUT is not set
83 +# CONFIG_BINFMT_AOUT is not set
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
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
101 string 'Kernel command line' CONFIG_ETRAX_CMDLINE "root=/dev/mtdblock3"
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
111 +# CONFIG_BINFMT_ELF_AOUT is not set
112 # CONFIG_ETRAX_KGDB is not set
113 # CONFIG_ETRAX_WATCHDOG is not set
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
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
126 tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
127 bool 'Select task to kill on out of memory condition' CONFIG_OOM_KILLER
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
136 # CONFIG_KCORE_AOUT is not set
137 -CONFIG_BINFMT_AOUT=y
138 +# CONFIG_BINFMT_AOUT is not set
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
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
157 tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
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
168 +# CONFIG_BINFMT_ELF_AOUT is not set
169 # CONFIG_BINFMT_MISC is not set
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
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
183 tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
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
193 # CONFIG_KCORE_AOUT is not set
194 -CONFIG_BINFMT_AOUT=y
195 +# CONFIG_BINFMT_AOUT is not set
197 +# CONFIG_BINFMT_ELF_AOUT is not set
198 # CONFIG_BINFMT_MISC is not set
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
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
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
232 * Copyright 1993, 1994: Eric Youngdale (ericy@cais.com).
235 +#include <linux/config.h>
236 #include <linux/module.h>
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 *);
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
250 irix_core_dump, PAGE_SIZE
253 @@ -794,6 +800,7 @@ out_free_ph:
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.
261 @@ -873,6 +880,7 @@ static int load_irix_library(struct file
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
277 +# CONFIG_BINFMT_ELF_AOUT is not set
278 CONFIG_MIPS32_COMPAT=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
292 tristate 'Kernel support for SOM binaries' CONFIG_BINFMT_SOM
293 tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
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
303 +# CONFIG_BINFMT_ELF_AOUT is not set
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
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
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
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
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
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
345 tristate 'Kernel support for 32 bit ELF binaries' CONFIG_BINFMT_ELF32
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
355 +# CONFIG_BINFMT_ELF_AOUT is not set
356 CONFIG_BINFMT_ELF32=y
357 # CONFIG_BINFMT_MISC is not set
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
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
381 +# CONFIG_BINFMT_ELF_AOUT is not set
382 # CONFIG_BINFMT_MISC is not set
383 # CONFIG_PROCESS_DEBUG is not set
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
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
407 +# CONFIG_BINFMT_ELF_AOUT is not set
408 # CONFIG_BINFMT_MISC is not set
409 # CONFIG_PROCESS_DEBUG is not set
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
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
422 tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
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
431 # CONFIG_KCORE_AOUT is not set
433 +# CONFIG_BINFMT_ELF_AOUT is not set
434 # CONFIG_BINFMT_MISC is not set
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
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
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
459 -CONFIG_BINFMT_AOUT=y
460 +# CONFIG_BINFMT_AOUT is not set
462 -CONFIG_BINFMT_MISC=m
463 +# CONFIG_BINFMT_ELF_AOUT is not set
464 +# CONFIG_BINFMT_MISC is not set
466 # CONFIG_OOM_KILLER is not set
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
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
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
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
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
507 tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
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
518 +# CONFIG_BINFMT_ELF_AOUT is not set
519 # CONFIG_BINFMT_MISC is not set
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
527 * Copyright 1993, 1994: Eric Youngdale (ericy@cais.com).
530 +#include <linux/config.h>
531 #include <linux/module.h>
533 #include <linux/fs.h>
535 #include <linux/elf.h>
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*);
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))
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
555 + elf_core_dump, ELF_EXEC_PAGESIZE
558 #define BAD_ADDR(x) ((unsigned long)(x) >= TASK_SIZE)
559 @@ -404,6 +413,7 @@ out:
563 +#ifdef CONFIG_BINFMT_ELF_AOUT
564 static unsigned long load_aout_interp(struct exec * interp_ex,
565 struct file * interpreter)
567 @@ -451,6 +461,7 @@ static unsigned long load_aout_interp(st
574 * These are the functions used to load ELF style executables and shared
575 @@ -458,7 +469,9 @@ out:
578 #define INTERPRETER_NONE 0
579 +#ifdef CONFIG_BINFMT_ELF_AOUT
580 #define INTERPRETER_AOUT 1
582 #define INTERPRETER_ELF 2
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];
592 struct files_struct *files;
594 /* Get the exec-header */
595 @@ -612,6 +627,7 @@ static int load_elf_binary(struct linux_
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;
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;
608 + interpreter_type = INTERPRETER_ELF;
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;
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;
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 */
633 +#ifdef CONFIG_BINFMT_ELF_AOUT
634 if (!bprm->sh_bang) {
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);
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_
648 if (elf_interpreter) {
649 +#ifdef CONFIG_BINFMT_ELF_AOUT
650 if (interpreter_type == INTERPRETER_AOUT)
651 elf_entry = load_aout_interp(&interp_ex,
655 elf_entry = load_elf_interp(&interp_elf_ex,
658 @@ -849,7 +874,9 @@ static int load_elf_binary(struct linux_
662 +#ifdef CONFIG_BINFMT_ELF_AOUT
663 if (interpreter_type != INTERPRETER_AOUT)
665 sys_close(elf_exec_fileno);
667 set_binfmt(&elf_format);
668 @@ -863,10 +890,14 @@ static int load_elf_binary(struct linux_
670 load_addr, load_bias,
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;
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:
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. */
691 static int load_elf_library(struct file *file)
693 struct elf_phdr *elf_phdata;
694 @@ -1016,6 +1047,7 @@ out_free_ph:
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
708 asmlinkage long sys_uselib(const char * library)
710 +#if defined(CONFIG_BINFMT_AOUT) || defined(CONFIG_BINFMT_ELF_AOUT)
714 @@ -155,6 +156,9 @@ out: