Patch to make shbang scripts a configuration option
Subsystems (10)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi!
This patch adds a tri state option in configuration so that kernels could be created without scripts support (shbang first line).
Why would you want that ? Embedded systems which only run a few binaries and would like to save a little RAM. The default is 'Y' and the configure.help states that you should put a 'Y' if unsure.
The patch is for 2.4.19.
This is my first patch to the kernel so please don't flame me too hard...
Any comments are welcome.
Mark
- --
Name: Mark Veltzer
Email: mailto:[email protected]
Homepage: http://www.veltzer.org
Get my public key at http://www.veltzer.org/ascx/public_key.asc
Add my public key using gpg --keyserver wwwkeys.pgp.net --recv-keys C71E5D38. -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE9gU0hxlxDIcceXTgRAhZYAJ9/L70P9jwiRu3+RkwiB0xsq6YW9wCg1GZ3 Sw8qCaI5zFyu8yRGrNi/WJo=
=Ia4L
-----END PGP SIGNATURE-----
Documentation/Configure.help +9 -0
@@ -3813,6 +3813,15 @@ Not necessary unless you're using a very out-of-date binutils version. You probably want KCORE_ELF. +Kernel support for Shbang scripts +CONFIG_BINFMT_SHBANG + Shbang scripts are text files which have a "#![interpreter]" prefix + and which can be run by the kernel. Most systems need this type of + support since a lot of the system is made up of these types of + scripts. Say N here only if you are making a very weird type of + system (embedded perhaps) and you are sure that your system doesnt + have any shbang script. If unsure - say Y here. + Kernel support for ELF binaries CONFIG_BINFMT_ELF ELF (Executable and Linkable Format) is a format for libraries and
arch/alpha/config.in +1 -0
@@ -288,6 +288,7 @@ fi tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF +tristate 'Kernel support for SHBANG binaries' CONFIG_BINFMT_SHBANG tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC tristate 'Kernel support for Linux/Intel ELF binaries' CONFIG_BINFMT_EM86 source drivers/parport/Config.in
arch/alpha/defconfig +1 -0
@@ -71,6 +71,7 @@ # CONFIG_KCORE_AOUT is not set # CONFIG_BINFMT_AOUT is not set CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_SHBANG=y # CONFIG_BINFMT_MISC is not set # CONFIG_BINFMT_EM86 is not set
arch/arm/config.in +1 -0
@@ -435,6 +435,7 @@ A.OUT CONFIG_KCORE_AOUT" ELF tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF +tristate 'Kernel support for SHBANG binaries' CONFIG_BINFMT_SHBANG tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC dep_bool 'Power Management support (experimental)' CONFIG_PM $CONFIG_EXPERIMENTAL dep_tristate 'RISC OS personality' CONFIG_ARTHUR $CONFIG_CPU_32
arch/arm/defconfig +1 -0
@@ -85,6 +85,7 @@ # CONFIG_KCORE_AOUT is not set CONFIG_BINFMT_AOUT=y CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_SHBANG=y # CONFIG_BINFMT_MISC is not set # CONFIG_PM is not set # CONFIG_ARTHUR is not set
arch/cris/config.in +1 -0
@@ -31,6 +31,7 @@ bool 'Sysctl support' CONFIG_SYSCTL tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF +tristate 'Kernel support for SHBANG binaries' CONFIG_BINFMT_SHBANG bool 'Use kernel gdb debugger' CONFIG_ETRAX_KGDB
arch/cris/defconfig +1 -0
@@ -18,6 +18,7 @@ # CONFIG_BSD_PROCESS_ACCT is not set # CONFIG_SYSCTL is not set CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_SHBANG=y # CONFIG_ETRAX_KGDB is not set # CONFIG_ETRAX_WATCHDOG is not set
arch/i386/config.in +1 -0
@@ -268,6 +268,7 @@ fi tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF +tristate 'Kernel support for SHBANG binaries' CONFIG_BINFMT_SHBANG tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC bool 'Power Management support' CONFIG_PM
arch/i386/defconfig +1 -0
@@ -107,6 +107,7 @@ CONFIG_BINFMT_AOUT=y CONFIG_BINFMT_ELF=y CONFIG_BINFMT_MISC=y +CONFIG_BINFMT_SHBANG=y CONFIG_PM=y # CONFIG_APM is not set
arch/ia64/config.in +1 -0
@@ -104,6 +104,7 @@ bool 'BSD Process Accounting' CONFIG_BSD_PROCESS_ACCT bool 'Sysctl support' CONFIG_SYSCTL tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF +tristate 'Kernel support for SHBANG binaries' CONFIG_BINFMT_SHBANG tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC if [ "$CONFIG_IA64_HP_SIM" = "n" ]; then
arch/ia64/defconfig +1 -0
@@ -55,6 +55,7 @@ # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_SHBANG=y # CONFIG_BINFMT_MISC is not set # CONFIG_ACPI_DEBUG is not set # CONFIG_ACPI_BUSMGR is not set
arch/m68k/config.in +1 -0
@@ -99,6 +99,7 @@ fi tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF +tristate 'Kernel support for SHBANG binaries' CONFIG_BINFMT_SHBANG tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC if [ "$CONFIG_AMIGA" = "y" ]; then
arch/m68k/defconfig +1 -0
@@ -46,6 +46,7 @@ # CONFIG_KCORE_AOUT is not set CONFIG_BINFMT_AOUT=y CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_SHBANG=y # CONFIG_BINFMT_MISC is not set CONFIG_ZORRO=y # CONFIG_AMIGA_PCMCIA is not set
arch/mips/config.in +1 -0
@@ -458,6 +458,7 @@ define_bool CONFIG_BINFMT_AOUT n define_bool CONFIG_BINFMT_ELF y tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC +tristate 'Kernel support for SHBANG binaries' CONFIG_BINFMT_SHBANG dep_bool 'Power Management support (EXPERIMENTAL)' CONFIG_PM $CONFIG_EXPERIMENTAL $CONFIG_MIPS_AU1000 endmenu
arch/mips/defconfig +1 -0
@@ -106,6 +106,7 @@ # CONFIG_KCORE_AOUT is not set # CONFIG_BINFMT_AOUT is not set CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_SHBANG=y # CONFIG_BINFMT_MISC is not set # CONFIG_PM is not set
arch/mips64/config.in +1 -0
@@ -183,6 +183,7 @@ define_bool CONFIG_KCORE_ELF y define_bool CONFIG_KCORE_AOUT n tristate 'Kernel support for 64-bit ELF binaries' CONFIG_BINFMT_ELF +tristate 'Kernel support for SHBANG binaries' CONFIG_BINFMT_SHBANG bool 'Kernel support for Linux/MIPS 32-bit binary compatibility' CONFIG_MIPS32_COMPAT define_bool CONFIG_BINFMT_ELF32 $CONFIG_MIPS32_COMPAT tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC
arch/mips64/defconfig +1 -0
@@ -72,6 +72,7 @@ CONFIG_KCORE_ELF=y # CONFIG_KCORE_AOUT is not set CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_SHBANG=y CONFIG_MIPS32_COMPAT=y CONFIG_BINFMT_ELF32=y # CONFIG_BINFMT_MISC is not set
arch/parisc/config.in +1 -0
@@ -67,6 +67,7 @@ bool 'Sysctl support' CONFIG_SYSCTL tristate 'Kernel support for SOM binaries' CONFIG_BINFMT_SOM tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF +tristate 'Kernel support for SHBANG binaries' CONFIG_BINFMT_SHBANG tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then tristate 'Kernel support for JAVA binaries (obsolete)' CONFIG_BINFMT_JAVA
arch/parisc/defconfig +1 -0
@@ -39,6 +39,7 @@ CONFIG_SYSCTL=y CONFIG_BINFMT_SOM=y CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_SHBANG=y # CONFIG_BINFMT_MISC is not set # CONFIG_BINFMT_JAVA is not set
arch/ppc/config.in +1 -0
@@ -167,6 +167,7 @@ define_bool CONFIG_BINFMT_ELF y define_bool CONFIG_KERNEL_ELF y tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC +tristate 'Kernel support for SHBANG binaries' CONFIG_BINFMT_SHBANG source drivers/pci/Config.in
arch/ppc/defconfig +1 -0
@@ -54,6 +54,7 @@ # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_KCORE_ELF=y CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_SHBANG=y CONFIG_KERNEL_ELF=y CONFIG_BINFMT_MISC=m CONFIG_PCI_NAMES=y
arch/ppc64/config.in +1 -0
@@ -71,6 +71,7 @@ fi bool 'Kernel Support for 64 bit ELF binaries' CONFIG_BINFMT_ELF +tristate 'Kernel support for SHBANG binaries' CONFIG_BINFMT_SHBANG tristate 'Kernel support for 32 bit binaries' CONFIG_BINFMT_ELF32
arch/ppc64/defconfig +1 -0
@@ -47,6 +47,7 @@ # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_KCORE_ELF=y CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_SHBANG=y CONFIG_BINFMT_ELF32=y # CONFIG_BINFMT_MISC is not set CONFIG_PCI_NAMES=y
arch/s390/config.in +1 -0
@@ -51,6 +51,7 @@ bool 'Sysctl support' CONFIG_SYSCTL define_bool CONFIG_KCORE_ELF y tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF +tristate 'Kernel support for SHBANG binaries' CONFIG_BINFMT_SHBANG tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC bool 'Show crashed user process info' CONFIG_PROCESS_DEBUG bool 'Pseudo page fault support' CONFIG_PFAULT
arch/s390/defconfig +1 -0
@@ -41,6 +41,7 @@ CONFIG_SYSCTL=y CONFIG_KCORE_ELF=y CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_SHBANG=y # CONFIG_BINFMT_MISC is not set # CONFIG_PROCESS_DEBUG is not set CONFIG_PFAULT=y
arch/s390x/config.in +1 -0
@@ -52,6 +52,7 @@ bool 'Sysctl support' CONFIG_SYSCTL define_bool CONFIG_KCORE_ELF y tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF +tristate 'Kernel support for SHBANG binaries' CONFIG_BINFMT_SHBANG tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC bool 'Show crashed user process info' CONFIG_PROCESS_DEBUG bool 'Pseudo page fault support' CONFIG_PFAULT
arch/s390x/defconfig +1 -0
@@ -42,6 +42,7 @@ CONFIG_SYSCTL=y CONFIG_KCORE_ELF=y CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_SHBANG=y # CONFIG_BINFMT_MISC is not set # CONFIG_PROCESS_DEBUG is not set CONFIG_PFAULT=y
arch/sh/config.in +1 -0
@@ -211,6 +211,7 @@ A.OUT CONFIG_KCORE_AOUT" ELF fi tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF +tristate 'Kernel support for SHBANG binaries' CONFIG_BINFMT_SHBANG tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC source drivers/parport/Config.in
arch/sh/defconfig +1 -0
@@ -48,6 +48,7 @@ CONFIG_KCORE_ELF=y # CONFIG_KCORE_AOUT is not set CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_SHBANG=y # CONFIG_BINFMT_MISC is not set #
arch/sparc/config.in +1 -0
@@ -70,6 +70,7 @@ fi tristate 'Kernel support for a.out binaries' CONFIG_BINFMT_AOUT tristate 'Kernel support for ELF binaries' CONFIG_BINFMT_ELF +tristate 'Kernel support for SHBANG binaries' CONFIG_BINFMT_SHBANG tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC bool 'SunOS binary emulation' CONFIG_SUNOS_EMUL source drivers/parport/Config.in
arch/sparc/defconfig +1 -0
@@ -51,6 +51,7 @@ CONFIG_KCORE_ELF=y CONFIG_BINFMT_AOUT=y CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_SHBANG=y CONFIG_BINFMT_MISC=m CONFIG_SUNOS_EMUL=y
arch/sparc64/config.in +1 -0
@@ -73,6 +73,7 @@ bool ' Kernel support for 32-bit (ie. SunOS) a.out binaries' CONFIG_BINFMT_AOUT32 fi tristate 'Kernel support for 64-bit ELF binaries' CONFIG_BINFMT_ELF +tristate 'Kernel support for SHBANG binaries' CONFIG_BINFMT_SHBANG tristate 'Kernel support for MISC binaries' CONFIG_BINFMT_MISC bool 'SunOS binary emulation' CONFIG_SUNOS_EMUL if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
arch/sparc64/defconfig +1 -0
@@ -55,6 +55,7 @@ CONFIG_BINFMT_ELF32=y # CONFIG_BINFMT_AOUT32 is not set CONFIG_BINFMT_ELF=y +CONFIG_BINFMT_SHBANG=y CONFIG_BINFMT_MISC=m # CONFIG_SUNOS_EMUL is not set CONFIG_SOLARIS_EMUL=m
fs/Makefile +1 -2
@@ -73,8 +73,7 @@ obj-$(CONFIG_BINFMT_EM86) += binfmt_em86.o obj-$(CONFIG_BINFMT_MISC) += binfmt_misc.o -# binfmt_script is always there -obj-y += binfmt_script.o +obj-$(CONFIG_BINFMT_SHBNAG) += binfmt_script.o obj-$(CONFIG_BINFMT_ELF) += binfmt_elf.o