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