2020-04-01 06:32:27 +09:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
2019-12-04 08:56:24 +09:00
|
|
|
/*
|
|
|
|
* With CONFIG_LTO_CLANG, LLD always enables -fdata-sections and
|
|
|
|
* -ffunction-sections, which increases the size of the final module.
|
|
|
|
* Merge the split sections in the final binary.
|
|
|
|
*/
|
|
|
|
SECTIONS {
|
|
|
|
/*
|
|
|
|
* LLVM may emit .eh_frame with CONFIG_CFI_CLANG despite
|
|
|
|
* -fno-asynchronous-unwind-tables. Discard the section.
|
|
|
|
*/
|
|
|
|
/DISCARD/ : {
|
|
|
|
*(.eh_frame)
|
|
|
|
}
|
|
|
|
|
2020-06-11 02:14:32 +09:00
|
|
|
.bss : {
|
|
|
|
*(.bss .bss.[0-9a-zA-Z_]*)
|
2020-07-11 07:06:05 +09:00
|
|
|
*(.bss..L*)
|
2020-06-11 02:14:32 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
.data : {
|
|
|
|
*(.data .data.[0-9a-zA-Z_]*)
|
2020-07-11 07:06:05 +09:00
|
|
|
*(.data..L*)
|
2020-06-11 02:14:32 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
.rodata : {
|
|
|
|
*(.rodata .rodata.[0-9a-zA-Z_]*)
|
2020-07-11 07:06:05 +09:00
|
|
|
*(.rodata..L*)
|
2020-06-11 02:14:32 +09:00
|
|
|
}
|
2020-04-01 06:32:27 +09:00
|
|
|
|
|
|
|
/*
|
|
|
|
* With CFI_CLANG, ensure __cfi_check is at the beginning of the
|
2020-08-20 00:53:00 +09:00
|
|
|
* .text section, and that the section is aligned to 4k.
|
2020-04-01 06:32:27 +09:00
|
|
|
*/
|
2020-08-20 00:53:00 +09:00
|
|
|
.text : ALIGN(4096) {
|
2020-04-01 06:32:27 +09:00
|
|
|
*(.text.__cfi_check)
|
|
|
|
*(.text .text.[0-9a-zA-Z_]* .text..L.cfi*)
|
|
|
|
}
|
2019-12-04 08:56:24 +09:00
|
|
|
}
|