mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nicolas Pitre <nicolas.pitre@linaro.org>
To: Michal Marek <mmarek@suse.com>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v5 8/8] kconfig option for TRIM_UNUSED_KSYMS
Date: Fri,  4 Mar 2016 00:40:50 -0500	[thread overview]
Message-ID: <1457070050-1564-9-git-send-email-nicolas.pitre@linaro.org> (raw)
In-Reply-To: <1457070050-1564-1-git-send-email-nicolas.pitre@linaro.org>

The config option to enable it all.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
---
 init/Kconfig | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/init/Kconfig b/init/Kconfig
index 22320804fb..e6f666331b 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1990,6 +1990,22 @@ config MODULE_COMPRESS_XZ
 
 endchoice
 
+config TRIM_UNUSED_KSYMS
+	bool "Trim unused exported kernel 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
-- 
2.5.0

      parent reply	other threads:[~2016-03-04  5:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-04  5:40 [PATCH v5 0/8] Trim unused exported kernel symbols Nicolas Pitre
2016-03-04  5:40 ` [PATCH v5 1/8] kbuild: record needed exported symbols for modules Nicolas Pitre
2016-03-04  5:40 ` [PATCH v5 2/8] allow for per-symbol configurable EXPORT_SYMBOL() Nicolas Pitre
2016-03-04  5:40 ` [PATCH v5 3/8] fixdep: accept extra dependencies on stdin Nicolas Pitre
2016-03-04  5:40 ` [PATCH v5 4/8] kbuild: de-duplicate fixdep usage Nicolas Pitre
2016-03-04  5:40 ` [PATCH v5 5/8] kbuild: add fine grained build dependencies for exported symbols Nicolas Pitre
2016-03-04 22:51   ` Michal Marek
2016-03-04 22:53     ` Michal Marek
2016-03-05  7:12       ` Michal Marek
2016-03-06  2:33         ` Nicolas Pitre
2016-03-06  6:20           ` Nicolas Pitre
2016-03-04  5:40 ` [PATCH v5 6/8] create/adjust generated/autoksyms.h Nicolas Pitre
2016-03-04  5:40 ` [PATCH v5 7/8] kbuild: build sample modules along with the rest of the kernel Nicolas Pitre
2016-03-04  5:40 ` Nicolas Pitre [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1457070050-1564-9-git-send-email-nicolas.pitre@linaro.org \
    --to=nicolas.pitre@linaro.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®