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 <[email protected]>
Signed-off-by: Masahiro Yamada <[email protected]>
This commit is contained in:
Nicholas Piggin 2018-05-09 23:00:00 +10:00 • committed by Masahiro Yamada
commit 5d20ee3192
2 changed files with 27 additions and 15 deletions

View file

@ -596,21 +596,6 @@ config CC_STACKPROTECTOR_AUTO
endchoice
config LD_DEAD_CODE_DATA_ELIMINATION
bool
help
Select this if the architecture wants to do dead code and
data elimination with the linker by compiling with
-ffunction-sections -fdata-sections and linking with
--gc-sections.
This requires that the arch annotates or otherwise protects
its external entry points from being discarded. Linker scripts
must also merge .text.*, .data.*, and .bss.* correctly into
output sections. Care must be taken not to pull in unrelated
sections (e.g., '.text.init'). Typically '.' in section names
is used to distinguish them from label names / C identifiers.
config HAVE_ARCH_WITHIN_STACK_FRAMES
bool
help