diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2021-02-23 23:21:58 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-02-23 23:21:58 +0300 |
commit | 5cf0fd591f2e7833405bdc7ce2176c3502e8a11e (patch) | |
tree | 95d351a2e2e7c891506cae075367b8d0fe9c6ef5 /init/Kconfig | |
parent | 21a6ab2131ab0644eeef70507e20273338bf065c (diff) | |
download | linux-5cf0fd591f2e7833405bdc7ce2176c3502e8a11e.tar.xz |
Kbuild: disable TRIM_UNUSED_KSYMS option
The removal of EXPORT_UNUSED_SYMBOL() in commit 367948220fce looks like
(and was sold as) a no-op, but it actually had a rather serious and
subtle side effect: the UNUSED_SYMBOLS option not only enabled the
removed (unused) functionality, it also _disabled_ the TRIM_UNUSED_KSYMS
functionality.
And it turns out that TRIM_UNUSED_KSYMS is a huge time waste, and takes
up a third of the kernel build time for me. For no actual upside, since
no distro is likely to ever be able to enable it (because they all
support external kernel modules).
Rather than re-enable EXPORT_UNUSED_SYMBOL, this just disables the
TRIM_UNUSED_KSYMS option by marking it broken. I'm tempted to just
remove the support entirely, but maybe somebody has a use-case and can
fix the behavior of it.
I could have just disabled it for COMPILE_TEST, but it really smells
like the TRIM_UNUSED_KSYMS option is badly done and not really useful,
so this takes the more direct approach - let's see if anybody ever
actually notices or complains.
Cc: Miroslav Benes <mbenes@suse.cz>
Cc: Emil Velikov <emil.l.velikov@gmail.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Jessica Yu <jeyu@kernel.org>
Fixes: 367948220fce ("module: remove EXPORT_UNUSED_SYMBOL*")
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'init/Kconfig')
-rw-r--r-- | init/Kconfig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/init/Kconfig b/init/Kconfig index 8a2c0e41f1bb..ba8bd5256980 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -2274,6 +2274,7 @@ config MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS config TRIM_UNUSED_KSYMS bool "Trim unused exported kernel symbols" + depends on BROKEN help The kernel and some modules make many symbols available for other modules to use via EXPORT_SYMBOL() and variants. Depending |