diff options
-rw-r--r-- | arch/Kconfig | 15 | ||||
-rw-r--r-- | init/Kconfig | 27 |
2 files changed, 27 insertions, 15 deletions
diff --git a/arch/Kconfig b/arch/Kconfig index 706dec4d295a..c88fa0eb49df 100644 --- a/arch/Kconfig +++ b/arch/Kconfig | |||
@@ -596,21 +596,6 @@ config CC_STACKPROTECTOR_AUTO | |||
596 | 596 | ||
597 | endchoice | 597 | endchoice |
598 | 598 | ||
599 | config LD_DEAD_CODE_DATA_ELIMINATION | ||
600 | bool | ||
601 | help | ||
602 | Select this if the architecture wants to do dead code and | ||
603 | data elimination with the linker by compiling with | ||
604 | -ffunction-sections -fdata-sections and linking with | ||
605 | --gc-sections. | ||
606 | |||
607 | This requires that the arch annotates or otherwise protects | ||
608 | its external entry points from being discarded. Linker scripts | ||
609 | must also merge .text.*, .data.*, and .bss.* correctly into | ||
610 | output sections. Care must be taken not to pull in unrelated | ||
611 | sections (e.g., '.text.init'). Typically '.' in section names | ||
612 | is used to distinguish them from label names / C identifiers. | ||
613 | |||
614 | config HAVE_ARCH_WITHIN_STACK_FRAMES | 599 | config HAVE_ARCH_WITHIN_STACK_FRAMES |
615 | bool | 600 | bool |
616 | help | 601 | help |
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 | ||
1039 | endchoice | 1039 | endchoice |
1040 | 1040 | ||
1041 | config 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 | |||
1051 | config 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 | |||
1041 | config SYSCTL | 1068 | config SYSCTL |
1042 | bool | 1069 | bool |
1043 | 1070 | ||