1/* SPDX-License-Identifier: GPL-2.0 */ 2/* 3 * With CONFIG_LTO_CLANG, LLD always enables -fdata-sections and 4 * -ffunction-sections, which increases the size of the final module. 5 * Merge the split sections in the final binary. 6 */ 7SECTIONS { 8 /* 9 * LLVM may emit .eh_frame with CONFIG_CFI_CLANG despite 10 * -fno-asynchronous-unwind-tables. Discard the section. 11 */ 12 /DISCARD/ : { 13 *(.eh_frame) 14 } 15 16 .bss : { 17 *(.bss .bss.[0-9a-zA-Z_]*) 18 *(.bss..L*) 19 } 20 21 .data : { 22 *(.data .data.[0-9a-zA-Z_]*) 23 *(.data..L*) 24 } 25 26 .rodata : { 27 *(.rodata .rodata.[0-9a-zA-Z_]*) 28 *(.rodata..L*) 29 } 30 31 /* 32 * With CFI_CLANG, ensure __cfi_check is at the beginning of the 33 * .text section, and that the section is aligned to 4k. 34 */ 35 .text : ALIGN(4096) { 36 *(.text.__cfi_check) 37 *(.text .text.[0-9a-zA-Z_]* .text..L.cfi*) 38 } 39} 40