Kconfig.binfmt 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. menu "Executable file formats"
  3. config BINFMT_ELF
  4. bool "Kernel support for ELF binaries"
  5. depends on MMU
  6. select ELFCORE
  7. default y
  8. help
  9. ELF (Executable and Linkable Format) is a format for libraries and
  10. executables used across different architectures and operating
  11. systems. Saying Y here will enable your kernel to run ELF binaries
  12. and enlarge it by about 13 KB. ELF support under Linux has now all
  13. but replaced the traditional Linux a.out formats (QMAGIC and ZMAGIC)
  14. because it is portable (this does *not* mean that you will be able
  15. to run executables from different architectures or operating systems
  16. however) and makes building run-time libraries very easy. Many new
  17. executables are distributed solely in ELF format. You definitely
  18. want to say Y here.
  19. Information about ELF is contained in the ELF HOWTO available from
  20. <http://www.tldp.org/docs.html#howto>.
  21. If you find that after upgrading from Linux kernel 1.2 and saying Y
  22. here, you still can't run any ELF binaries (they just crash), then
  23. you'll have to install the newest ELF runtime libraries, including
  24. ld.so (check the file <file:Documentation/Changes> for location and
  25. latest version).
  26. config BINFMT_ELF_KUNIT_TEST
  27. bool "Build KUnit tests for ELF binary support" if !KUNIT_ALL_TESTS
  28. depends on KUNIT=y && BINFMT_ELF=y
  29. default KUNIT_ALL_TESTS
  30. help
  31. This builds the ELF loader KUnit tests, which try to gather
  32. prior bug fixes into a regression test collection. This is really
  33. only needed for debugging. Note that with CONFIG_COMPAT=y, the
  34. compat_binfmt_elf KUnit test is also created.
  35. config COMPAT_BINFMT_ELF
  36. def_bool y
  37. depends on COMPAT && BINFMT_ELF
  38. select ELFCORE
  39. config ARCH_BINFMT_ELF_STATE
  40. bool
  41. config ARCH_BINFMT_ELF_EXTRA_PHDRS
  42. bool
  43. config ARCH_HAVE_ELF_PROT
  44. bool
  45. config ARCH_USE_GNU_PROPERTY
  46. bool
  47. config BINFMT_ELF_FDPIC
  48. bool "Kernel support for FDPIC ELF binaries"
  49. default y if !BINFMT_ELF
  50. depends on ARM || ((M68K || SUPERH || XTENSA) && !MMU)
  51. select ELFCORE
  52. help
  53. ELF FDPIC binaries are based on ELF, but allow the individual load
  54. segments of a binary to be located in memory independently of each
  55. other. This makes this format ideal for use in environments where no
  56. MMU is available as it still permits text segments to be shared,
  57. even if data segments are not.
  58. It is also possible to run FDPIC ELF binaries on MMU linux also.
  59. config ELFCORE
  60. bool
  61. help
  62. This option enables kernel/elfcore.o.
  63. config CORE_DUMP_DEFAULT_ELF_HEADERS
  64. bool "Write ELF core dumps with partial segments"
  65. default y
  66. depends on BINFMT_ELF && ELF_CORE
  67. help
  68. ELF core dump files describe each memory mapping of the crashed
  69. process, and can contain or omit the memory contents of each one.
  70. The contents of an unmodified text mapping are omitted by default.
  71. For an unmodified text mapping of an ELF object, including just
  72. the first page of the file in a core dump makes it possible to
  73. identify the build ID bits in the file, without paying the i/o
  74. cost and disk space to dump all the text. However, versions of
  75. GDB before 6.7 are confused by ELF core dump files in this format.
  76. The core dump behavior can be controlled per process using
  77. the /proc/PID/coredump_filter pseudo-file; this setting is
  78. inherited. See Documentation/filesystems/proc.rst for details.
  79. This config option changes the default setting of coredump_filter
  80. seen at boot time. If unsure, say Y.
  81. config BINFMT_SCRIPT
  82. tristate "Kernel support for scripts starting with #!"
  83. default y
  84. help
  85. Say Y here if you want to execute interpreted scripts starting with
  86. #! followed by the path to an interpreter.
  87. You can build this support as a module; however, until that module
  88. gets loaded, you cannot run scripts. Thus, if you want to load this
  89. module from an initramfs, the portion of the initramfs before loading
  90. this module must consist of compiled binaries only.
  91. Most systems will not boot if you say M or N here. If unsure, say Y.
  92. config ARCH_HAS_BINFMT_FLAT
  93. bool
  94. config BINFMT_FLAT
  95. bool "Kernel support for flat binaries"
  96. depends on ARCH_HAS_BINFMT_FLAT
  97. help
  98. Support uClinux FLAT format binaries.
  99. config BINFMT_FLAT_ARGVP_ENVP_ON_STACK
  100. bool
  101. config BINFMT_FLAT_OLD_ALWAYS_RAM
  102. bool
  103. config BINFMT_FLAT_NO_DATA_START_OFFSET
  104. bool
  105. config BINFMT_FLAT_OLD
  106. bool "Enable support for very old legacy flat binaries"
  107. depends on BINFMT_FLAT
  108. help
  109. Support decade old uClinux FLAT format binaries. Unless you know
  110. you have some of those say N here.
  111. config BINFMT_ZFLAT
  112. bool "Enable ZFLAT support"
  113. depends on BINFMT_FLAT
  114. select ZLIB_INFLATE
  115. help
  116. Support FLAT format compressed binaries
  117. config BINFMT_MISC
  118. tristate "Kernel support for MISC binaries"
  119. help
  120. If you say Y here, it will be possible to plug wrapper-driven binary
  121. formats into the kernel. You will like this especially when you use
  122. programs that need an interpreter to run like Java, Python, .NET or
  123. Emacs-Lisp. It's also useful if you often run DOS executables under
  124. the Linux DOS emulator DOSEMU (read the DOSEMU-HOWTO, available from
  125. <http://www.tldp.org/docs.html#howto>). Once you have
  126. registered such a binary class with the kernel, you can start one of
  127. those programs simply by typing in its name at a shell prompt; Linux
  128. will automatically feed it to the correct interpreter.
  129. You can do other nice things, too. Read the file
  130. <file:Documentation/admin-guide/binfmt-misc.rst> to learn how to use this
  131. feature, <file:Documentation/admin-guide/java.rst> for information about how
  132. to include Java support. and <file:Documentation/admin-guide/mono.rst> for
  133. information about how to include Mono-based .NET support.
  134. To use binfmt_misc, you will need to mount it:
  135. mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc
  136. You may say M here for module support and later load the module when
  137. you have use for it; the module is called binfmt_misc. If you
  138. don't know what to answer at this point, say Y.
  139. config COREDUMP
  140. bool "Enable core dump support" if EXPERT
  141. default y
  142. help
  143. This option enables support for performing core dumps. You almost
  144. certainly want to say Y here. Not necessary on systems that never
  145. need debugging or only ever run flawless code.
  146. endmenu