fs/Kconfig.binfmt

Source file repositories/reference/linux-study-clean/fs/Kconfig.binfmt

File Facts

System
Linux kernel
Corpus path
fs/Kconfig.binfmt
Extension
.binfmt
Size
6889 bytes
Lines
197
Domain
Core OS
Bucket
VFS And Filesystem Core
Inferred role
Core OS: VFS And Filesystem Core
Status
atlas-only

Why This File Exists

Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.

Dependency Surface

Detected Declarations

Annotated Snippet

# SPDX-License-Identifier: GPL-2.0-only

menu "Executable file formats"

config BINFMT_ELF
	bool "Kernel support for ELF binaries"
	depends on MMU
	select ELFCORE
	default y
	help
	  ELF (Executable and Linkable Format) is a format for libraries and
	  executables used across different architectures and operating
	  systems. Saying Y here will enable your kernel to run ELF binaries
	  and enlarge it by about 13 KB. ELF support under Linux has now all
	  but replaced the traditional Linux a.out formats (QMAGIC and ZMAGIC)
	  because it is portable (this does *not* mean that you will be able
	  to run executables from different architectures or operating systems
	  however) and makes building run-time libraries very easy. Many new
	  executables are distributed solely in ELF format. You definitely
	  want to say Y here.

	  Information about ELF is contained in the ELF HOWTO available from
	  <http://www.tldp.org/docs.html#howto>.

	  If you find that after upgrading from Linux kernel 1.2 and saying Y
	  here, you still can't run any ELF binaries (they just crash), then
	  you'll have to install the newest ELF runtime libraries, including
	  ld.so (check the file <file:Documentation/Changes> for location and
	  latest version).

config BINFMT_ELF_KUNIT_TEST
	bool "Build KUnit tests for ELF binary support" if !KUNIT_ALL_TESTS
	depends on KUNIT=y && BINFMT_ELF=y
	default KUNIT_ALL_TESTS
	help
	  This builds the ELF loader KUnit tests, which try to gather
	  prior bug fixes into a regression test collection. This is really
	  only needed for debugging. Note that with CONFIG_COMPAT=y, the
	  compat_binfmt_elf KUnit test is also created.

config COMPAT_BINFMT_ELF
	def_bool y
	depends on COMPAT && BINFMT_ELF
	select ELFCORE

config ARCH_BINFMT_ELF_STATE
	bool

config ARCH_BINFMT_ELF_EXTRA_PHDRS
	bool

config ARCH_HAVE_ELF_PROT
	bool

config ARCH_USE_GNU_PROPERTY
	bool

config BINFMT_ELF_FDPIC
	bool "Kernel support for FDPIC ELF binaries"
	default y if !BINFMT_ELF
	depends on ARM || ((M68K || RISCV || SUPERH || XTENSA) && !MMU)
	select ELFCORE
	help
	  ELF FDPIC binaries are based on ELF, but allow the individual load
	  segments of a binary to be located in memory independently of each
	  other. This makes this format ideal for use in environments where no
	  MMU is available as it still permits text segments to be shared,
	  even if data segments are not.

	  It is also possible to run FDPIC ELF binaries on MMU linux also.

Annotation

Implementation Notes