2020-03-31 17:32:27 -04:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
2019-12-03 18:56:24 -05: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-10 13:14:32 -04:00
|
|
|
.bss : {
|
|
|
|
*(.bss .bss.[0-9a-zA-Z_]*)
|
2020-07-10 18:06:05 -04:00
|
|
|
*(.bss..L*)
|
2020-06-10 13:14:32 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
.data : {
|
|
|
|
*(.data .data.[0-9a-zA-Z_]*)
|
2020-07-10 18:06:05 -04:00
|
|
|
*(.data..L*)
|
2020-06-10 13:14:32 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
.rodata : {
|
|
|
|
*(.rodata .rodata.[0-9a-zA-Z_]*)
|
2020-07-10 18:06:05 -04:00
|
|
|
*(.rodata..L*)
|
2020-06-10 13:14:32 -04:00
|
|
|
}
|
2020-03-31 17:32:27 -04:00
|
|
|
|
|
|
|
/*
|
|
|
|
* With CFI_CLANG, ensure __cfi_check is at the beginning of the
|
2020-08-19 11:53:00 -04:00
|
|
|
* .text section, and that the section is aligned to 4k.
|
2020-03-31 17:32:27 -04:00
|
|
|
*/
|
2020-08-19 11:53:00 -04:00
|
|
|
.text : ALIGN(4096) {
|
2020-03-31 17:32:27 -04:00
|
|
|
*(.text.__cfi_check)
|
|
|
|
*(.text .text.[0-9a-zA-Z_]* .text..L.cfi*)
|
|
|
|
}
|
2019-12-03 18:56:24 -05:00
|
|
|
}
|