Skip to content

Commit efd9763

Browse files
masahir0yJessica Yu
authored andcommitted
module: move CONFIG_UNUSED_SYMBOLS to the sub-menu of MODULES
When CONFIG_MODULES is disabled, CONFIG_UNUSED_SYMBOLS is pointless, thus it should be invisible. Instead of adding "depends on MODULES", I moved it to the sub-menu "Enable loadable module support", which is a better fit. I put it close to TRIM_UNUSED_KSYMS because it depends on !UNUSED_SYMBOLS. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Jessica Yu <jeyu@kernel.org>
1 parent d189c2a commit efd9763

2 files changed

Lines changed: 16 additions & 16 deletions

File tree

‎init/Kconfig‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2130,6 +2130,22 @@ config MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS
21302130

21312131
If unsure, say N.
21322132

2133+
config UNUSED_SYMBOLS
2134+
bool "Enable unused/obsolete exported symbols"
2135+
default y if X86
2136+
help
2137+
Unused but exported symbols make the kernel needlessly bigger. For
2138+
that reason most of these unused exports will soon be removed. This
2139+
option is provided temporarily to provide a transition period in case
2140+
some external kernel module needs one of these symbols anyway. If you
2141+
encounter such a case in your module, consider if you are actually
2142+
using the right API. (rationale: since nobody in the kernel is using
2143+
this in a module, there is a pretty good chance it's actually the
2144+
wrong interface to use). If you really need the symbol, please send a
2145+
mail to the linux kernel mailing list mentioning the symbol and why
2146+
you really need it, and what the merge plan to the mainline kernel for
2147+
your module is.
2148+
21332149
config TRIM_UNUSED_KSYMS
21342150
bool "Trim unused exported kernel symbols"
21352151
depends on !UNUSED_SYMBOLS

‎lib/Kconfig.debug‎

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -277,22 +277,6 @@ config READABLE_ASM
277277
to keep kernel developers who have to stare a lot at assembler listings
278278
sane.
279279

280-
config UNUSED_SYMBOLS
281-
bool "Enable unused/obsolete exported symbols"
282-
default y if X86
283-
help
284-
Unused but exported symbols make the kernel needlessly bigger. For
285-
that reason most of these unused exports will soon be removed. This
286-
option is provided temporarily to provide a transition period in case
287-
some external kernel module needs one of these symbols anyway. If you
288-
encounter such a case in your module, consider if you are actually
289-
using the right API. (rationale: since nobody in the kernel is using
290-
this in a module, there is a pretty good chance it's actually the
291-
wrong interface to use). If you really need the symbol, please send a
292-
mail to the linux kernel mailing list mentioning the symbol and why
293-
you really need it, and what the merge plan to the mainline kernel for
294-
your module is.
295-
296280
config DEBUG_FS
297281
bool "Debug Filesystem"
298282
help

0 commit comments

Comments
 (0)