2009-06-24 15:13:38 +09:00
|
|
|
/*
|
|
|
|
|
* Common module linker script, always used when linking a module.
|
|
|
|
|
* Archs are free to supply their own linker scripts. ld will
|
|
|
|
|
* combine them automatically.
|
|
|
|
|
*/
|
2020-03-31 11:10:15 -07:00
|
|
|
#include <asm/page.h>
|
|
|
|
|
|
2009-06-24 15:13:38 +09:00
|
|
|
SECTIONS {
|
2017-03-01 12:04:44 -06:00
|
|
|
/DISCARD/ : {
|
|
|
|
|
*(.discard)
|
|
|
|
|
*(.discard.*)
|
2020-03-31 11:10:15 -07:00
|
|
|
/*
|
|
|
|
|
* LLD may emit .eh_frame with CONFIG_CFI_CLANG despite
|
|
|
|
|
* -fno-asynchronous-unwind-tables. Discard the section.
|
|
|
|
|
*/
|
|
|
|
|
*(.eh_frame)
|
2017-03-01 12:04:44 -06:00
|
|
|
}
|
2011-04-14 14:59:39 +02:00
|
|
|
|
2015-02-06 15:09:57 +10:30
|
|
|
__ksymtab 0 : { *(SORT(___ksymtab+*)) }
|
|
|
|
|
__ksymtab_gpl 0 : { *(SORT(___ksymtab_gpl+*)) }
|
|
|
|
|
__ksymtab_unused 0 : { *(SORT(___ksymtab_unused+*)) }
|
|
|
|
|
__ksymtab_unused_gpl 0 : { *(SORT(___ksymtab_unused_gpl+*)) }
|
|
|
|
|
__ksymtab_gpl_future 0 : { *(SORT(___ksymtab_gpl_future+*)) }
|
|
|
|
|
__kcrctab 0 : { *(SORT(___kcrctab+*)) }
|
|
|
|
|
__kcrctab_gpl 0 : { *(SORT(___kcrctab_gpl+*)) }
|
|
|
|
|
__kcrctab_unused 0 : { *(SORT(___kcrctab_unused+*)) }
|
|
|
|
|
__kcrctab_unused_gpl 0 : { *(SORT(___kcrctab_unused_gpl+*)) }
|
|
|
|
|
__kcrctab_gpl_future 0 : { *(SORT(___kcrctab_gpl_future+*)) }
|
2015-02-13 14:40:10 -08:00
|
|
|
|
2017-03-07 17:31:08 -08:00
|
|
|
.init_array 0 : ALIGN(8) { *(SORT(.init_array.*)) *(.init_array) }
|
2017-03-01 14:04:53 -08:00
|
|
|
|
|
|
|
|
__jump_table 0 : ALIGN(8) { KEEP(*(__jump_table)) }
|
2019-12-03 15:56:24 -08:00
|
|
|
|
|
|
|
|
__patchable_function_entries : { *(__patchable_function_entries) }
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* 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.
|
|
|
|
|
*/
|
|
|
|
|
.bss : {
|
|
|
|
|
*(.bss .bss.[0-9a-zA-Z_]*)
|
|
|
|
|
*(.bss..L*)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.data : {
|
|
|
|
|
*(.data .data.[0-9a-zA-Z_]*)
|
|
|
|
|
*(.data..L*)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.rodata : {
|
|
|
|
|
*(.rodata .rodata.[0-9a-zA-Z_]*)
|
|
|
|
|
*(.rodata..L*)
|
|
|
|
|
}
|
|
|
|
|
|
2020-03-31 11:10:15 -07:00
|
|
|
#ifdef CONFIG_CFI_CLANG
|
|
|
|
|
/*
|
|
|
|
|
* With CFI_CLANG, ensure __cfi_check is at the beginning of the
|
|
|
|
|
* .text section, and that the section is aligned to page size.
|
|
|
|
|
*/
|
|
|
|
|
.text : ALIGN(PAGE_SIZE) {
|
|
|
|
|
*(.text.__cfi_check)
|
|
|
|
|
*(.text .text.[0-9a-zA-Z_]* .text..L.cfi*)
|
|
|
|
|
}
|
|
|
|
|
#endif
|
2009-06-24 15:13:38 +09:00
|
|
|
}
|
2020-09-08 13:27:08 +09:00
|
|
|
|
|
|
|
|
/* bring in arch-specific sections */
|
|
|
|
|
#include <asm/module.lds.h>
|