summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2018-05-09 09:00:00 -0400
committerMasahiro Yamada <yamada.masahiro@socionext.com>2018-05-17 09:45:01 -0400
commit5d20ee3192a58750ef8cc24b21aad23a82689be0 (patch)
tree7a91f8a8ee8ab7126f6d36bad1b0b121746a60c3 /init
parent6ca8d9433d7712d4c3c6102816b685470504dc3d (diff)
kbuild: Allow LD_DEAD_CODE_DATA_ELIMINATION to be selectable if enabled
Architectures that are capable can select HAVE_LD_DEAD_CODE_DATA_ELIMINATION to enable selection of that option (as an EXPERT kernel option). Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig27
1 files changed, 27 insertions, 0 deletions
diff --git a/init/Kconfig b/init/Kconfig
index f013afc74b11..1706d963766b 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -1038,6 +1038,33 @@ config CC_OPTIMIZE_FOR_SIZE
1038 1038
1039endchoice 1039endchoice
1040 1040
1041config HAVE_LD_DEAD_CODE_DATA_ELIMINATION
1042 bool
1043 help
1044 This requires that the arch annotates or otherwise protects
1045 its external entry points from being discarded. Linker scripts
1046 must also merge .text.*, .data.*, and .bss.* correctly into
1047 output sections. Care must be taken not to pull in unrelated
1048 sections (e.g., '.text.init'). Typically '.' in section names
1049 is used to distinguish them from label names / C identifiers.
1050
1051config LD_DEAD_CODE_DATA_ELIMINATION
1052 bool "Dead code and data elimination (EXPERIMENTAL)"
1053 depends on HAVE_LD_DEAD_CODE_DATA_ELIMINATION
1054 depends on EXPERT
1055 help
1056 Select this if the architecture wants to do dead code and
1057 data elimination with the linker by compiling with
1058 -ffunction-sections -fdata-sections, and linking with
1059 --gc-sections.
1060
1061 This can reduce on disk and in-memory size of the kernel
1062 code and static data, particularly for small configs and
1063 on small systems. This has the possibility of introducing
1064 silently broken kernel if the required annotations are not
1065 present. This option is not well tested yet, so use at your
1066 own risk.
1067
1041config SYSCTL 1068config SYSCTL
1042 bool 1069 bool
1043 1070