Skip to content

Commit

Permalink
module: move CONFIG_UNUSED_SYMBOLS to the sub-menu of MODULES
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Jessica Yu <[email protected]>
  • Loading branch information
masahir0y authored and Jessica Yu committed Sep 11, 2019
1 parent d189c2a commit efd9763
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
16 changes: 16 additions & 0 deletions init/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2130,6 +2130,22 @@ config MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS

If unsure, say N.

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

config TRIM_UNUSED_KSYMS
bool "Trim unused exported kernel symbols"
depends on !UNUSED_SYMBOLS
Expand Down
16 changes: 0 additions & 16 deletions lib/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -277,22 +277,6 @@ config READABLE_ASM
to keep kernel developers who have to stare a lot at assembler listings
sane.

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

config DEBUG_FS
bool "Debug Filesystem"
help
Expand Down

0 comments on commit efd9763

Please sign in to comment.