Where do I find the list of approved/supported executable formats on my Linux system? I am expecting to find a list that contains ELF, Shebang, a.out etc.
I already know that I can find in /proc/sys/fs/binfmt_misc
a list of user added supported formats, but I want to see the built-in formats in the system. Where can I get that?

- 20,270
- 7
- 50
- 76

- 307
- 2
- 4
- 11
1 Answers
The kernel configuration file has a section named Executable file formats / Emulations. The file is named /boot/config-`uname -r` on some Linux distributions like Fedora for example.
Some of the available options for 3.14.12 x86 (64 bit) are:
- CONFIG_BINFMT_ELF
-
Say Y here if you want to execute interpreted scripts starting with #! followed by the path to an interpreter.
-
Include code to run legacy 32-bit programs under a 64-bit kernel.
-
Support old a.out binaries in the 32bit emulation.
-
Include code to run binaries for the x32 native 32-bit ABI for 64-bit processors. An x32 process gets access to the full 64-bit register file and wide data path while leaving pointers at 32 bits for smaller memory footprint.
-
kernel-3.14.1-200.fc20.x86_64 comes with this configuration:
CONFIG_BINFMT_ELF=y
CONFIG_COMPAT_BINFMT_ELF=y
CONFIG_ARCH_BINFMT_ELF_RANDOMIZE_PIE=y
CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y
CONFIG_BINFMT_SCRIPT=y
# CONFIG_HAVE_AOUT is not set
CONFIG_BINFMT_MISC=m
CONFIG_COREDUMP=y
CONFIG_IA32_EMULATION=y
# CONFIG_IA32_AOUT is not set
# CONFIG_X86_X32 is not set

- 20,270
- 7
- 50
- 76