Message ID | 1454963315-20468-7-git-send-email-nicolas.pitre@linaro.org |
---|---|
State | Superseded |
Headers | show |
On Tue, 9 Feb 2016, Rusty Russell wrote: > Nicolas Pitre <nicolas.pitre@linaro.org> writes: > > The config option to enable it all. > > > > Signed-off-by: Nicolas Pitre <nico@linaro.org> > > Nice series! In case you need it, here's my Ack. Despite the overlap > with modules, it's all build trickery, so best via Sam's tree. > > Acked-by: Rusty Russell <rusty@rustcorp.com.au> Thanks Nicolas
On Tue, 9 Feb 2016, Christoph Hellwig wrote: > On Mon, Feb 08, 2016 at 03:28:35PM -0500, Nicolas Pitre wrote: > > The config option to enable it all. > > Just enable it by default.. :-) Viro took the opposite view with this patch: http://lkml.org/lkml/2016/2/3/1068 where he's ensuring that no exports are dropped, even if obviously they're not used (otherwise some complaints would have come about). So I'm not sure if having this turned on by default is a good thing. But I don't mind being convinced otherwise. Nicolas
diff --git a/init/Kconfig b/init/Kconfig index 22320804fb..893c4979a9 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -1990,6 +1990,22 @@ config MODULE_COMPRESS_XZ endchoice +config TRIM_UNUSED_EXPSYMS + bool "Trim unused exported symbols" + depends on MODULES && !UNUSED_SYMBOLS + help + The kernel and some modules make many symbols available for + other modules to use via EXPORT_SYMBOL() and variants. Depending + on the set of modules being selected in your kernel configuration, + many of those exported symbols might never be used. + + This option allows for unused exported symbols to be dropped from + the build. In turn, this provides the compiler more opportunities + (especially when using LTO) for optimizing the code and reducing + binary size. This might have some security advantages as well. + + If unsure say N. + endif # MODULES config MODULES_TREE_LOOKUP
The config option to enable it all. Signed-off-by: Nicolas Pitre <nico@linaro.org> --- init/Kconfig | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) -- 2.5.0