aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-generic/vmlinux.lds.h')
-rw-r--r--include/asm-generic/vmlinux.lds.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index b2b3d81b1535..8988a2e445d8 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -90,15 +90,18 @@
90 * .data. We don't want to pull in .data..other sections, which Linux 90 * .data. We don't want to pull in .data..other sections, which Linux
91 * has defined. Same for text and bss. 91 * has defined. Same for text and bss.
92 * 92 *
93 * With LTO_CLANG, the linker also splits sections by default, so we need
94 * these macros to combine the sections during the final link.
95 *
93 * RODATA_MAIN is not used because existing code already defines .rodata.x 96 * RODATA_MAIN is not used because existing code already defines .rodata.x
94 * sections to be brought in with rodata. 97 * sections to be brought in with rodata.
95 */ 98 */
96#ifdef CONFIG_LD_DEAD_CODE_DATA_ELIMINATION 99#if defined(CONFIG_LD_DEAD_CODE_DATA_ELIMINATION) || defined(CONFIG_LTO_CLANG)
97#define TEXT_MAIN .text .text.[0-9a-zA-Z_]* 100#define TEXT_MAIN .text .text.[0-9a-zA-Z_]*
98#define DATA_MAIN .data .data.[0-9a-zA-Z_]* .data..LPBX* 101#define DATA_MAIN .data .data.[0-9a-zA-Z_]* .data..L* .data..compoundliteral*
99#define SDATA_MAIN .sdata .sdata.[0-9a-zA-Z_]* 102#define SDATA_MAIN .sdata .sdata.[0-9a-zA-Z_]*
100#define RODATA_MAIN .rodata .rodata.[0-9a-zA-Z_]* 103#define RODATA_MAIN .rodata .rodata.[0-9a-zA-Z_]* .rodata..L*
101#define BSS_MAIN .bss .bss.[0-9a-zA-Z_]* 104#define BSS_MAIN .bss .bss.[0-9a-zA-Z_]* .bss..compoundliteral*
102#define SBSS_MAIN .sbss .sbss.[0-9a-zA-Z_]* 105#define SBSS_MAIN .sbss .sbss.[0-9a-zA-Z_]*
103#else 106#else
104#define TEXT_MAIN .text 107#define TEXT_MAIN .text