• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * With CONFIG_LTO_CLANG, LLD always enables -fdata-sections and
3 * -ffunction-sections, which increases the size of the final module.
4 * Merge the split sections in the final binary.
5 */
6SECTIONS {
7	/*
8	 * LLVM may emit .eh_frame with CONFIG_CFI_CLANG despite
9	 * -fno-asynchronous-unwind-tables. Discard the section.
10	 */
11	/DISCARD/ : {
12		*(.eh_frame)
13	}
14
15	.bss : { *(.bss .bss[.0-9a-zA-Z_]*) }
16	.data : { *(.data .data[.0-9a-zA-Z_]*) }
17	.rela.data : { *(.rela.data .rela.data[.0-9a-zA-Z_]*) }
18	.rela.rodata : { *(.rela.rodata .rela.rodata[.0-9a-zA-Z_]*) }
19	.rela.text : { *(.rela.text .rela.text[.0-9a-zA-Z_]*) }
20	.rodata : { *(.rodata .rodata[.0-9a-zA-Z_]*) }
21	.text : { *(.text .text[.0-9a-zA-Z_]*) }
22}
23