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.
|
|
|
|
|
*/
|
2022-10-27 17:59:06 +02:00
|
|
|
#ifdef CONFIG_UNWIND_TABLES
|
|
|
|
|
#define DISCARD_EH_FRAME
|
|
|
|
|
#else
|
|
|
|
|
#define DISCARD_EH_FRAME *(.eh_frame)
|
|
|
|
|
#endif
|
|
|
|
|
|
2024-03-21 09:36:35 -07:00
|
|
|
#include <asm-generic/codetag.lds.h>
|
|
|
|
|
|
2009-06-24 15:13:38 +09:00
|
|
|
SECTIONS {
|
2017-03-01 12:04:44 -06:00
|
|
|
/DISCARD/ : {
|
|
|
|
|
*(.discard)
|
|
|
|
|
*(.discard.*)
|
2024-04-17 13:35:30 +08:00
|
|
|
*(.export_symbol)
|
2025-02-02 03:51:41 +09:00
|
|
|
*(.no_trim_symbol)
|
2017-03-01 12:04:44 -06:00
|
|
|
}
|
2011-04-14 14:59:39 +02:00
|
|
|
|
2023-11-22 23:18:12 +01:00
|
|
|
__ksymtab 0 : ALIGN(8) { *(SORT(___ksymtab+*)) }
|
|
|
|
|
__kcrctab 0 : ALIGN(4) { *(SORT(___kcrctab+*)) }
|
2026-03-26 21:25:03 +00:00
|
|
|
__kflagstab 0 : ALIGN(1) { *(SORT(___kflagstab+*)) }
|
2015-02-13 14:40:10 -08:00
|
|
|
|
2021-07-06 15:02:52 +02:00
|
|
|
.ctors 0 : ALIGN(8) { *(SORT(.ctors.*)) *(.ctors) }
|
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
|
|
|
|
2022-07-08 11:44:54 +02:00
|
|
|
.altinstructions 0 : ALIGN(8) { KEEP(*(.altinstructions)) }
|
|
|
|
|
__bug_table 0 : ALIGN(8) { KEEP(*(__bug_table)) }
|
2017-03-01 14:04:53 -08:00
|
|
|
__jump_table 0 : ALIGN(8) { KEEP(*(__jump_table)) }
|
2023-11-22 23:18:14 +01:00
|
|
|
__ex_table 0 : ALIGN(4) { KEEP(*(__ex_table)) }
|
2020-12-11 10:46:22 -08:00
|
|
|
|
2026-03-04 20:52:37 -05:00
|
|
|
__patchable_function_entries 0 : { *(__patchable_function_entries) }
|
2020-12-11 10:46:22 -08:00
|
|
|
|
2026-01-23 11:26:57 +01:00
|
|
|
.init.klp_funcs 0 : ALIGN(8) { KEEP(*(.init.klp_funcs)) }
|
|
|
|
|
.init.klp_objects 0 : ALIGN(8) { KEEP(*(.init.klp_objects)) }
|
2025-09-17 09:03:59 -07:00
|
|
|
|
2022-09-08 14:54:47 -07:00
|
|
|
#ifdef CONFIG_ARCH_USES_CFI_TRAPS
|
2026-03-04 20:52:37 -05:00
|
|
|
__kcfi_traps 0 : { KEEP(*(.kcfi_traps)) }
|
2022-09-08 14:54:47 -07:00
|
|
|
#endif
|
|
|
|
|
|
2026-04-07 22:07:22 +02:00
|
|
|
#ifndef CONFIG_ARCH_WANTS_MODULES_TEXT_SECTIONS
|
2026-03-04 20:52:37 -05:00
|
|
|
.text 0 : {
|
2025-09-17 09:03:10 -07:00
|
|
|
*(.text .text.[0-9a-zA-Z_]*)
|
|
|
|
|
}
|
2026-04-07 22:07:22 +02:00
|
|
|
#endif
|
2025-09-17 09:03:10 -07:00
|
|
|
|
2026-03-04 20:52:37 -05:00
|
|
|
.bss 0 : {
|
2020-12-11 10:46:22 -08:00
|
|
|
*(.bss .bss.[0-9a-zA-Z_]*)
|
|
|
|
|
*(.bss..L*)
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-04 20:52:37 -05:00
|
|
|
.data 0 : {
|
2020-12-11 10:46:22 -08:00
|
|
|
*(.data .data.[0-9a-zA-Z_]*)
|
|
|
|
|
*(.data..L*)
|
|
|
|
|
}
|
|
|
|
|
|
2026-03-04 20:52:37 -05:00
|
|
|
.rodata 0 : {
|
2020-12-11 10:46:22 -08:00
|
|
|
*(.rodata .rodata.[0-9a-zA-Z_]*)
|
|
|
|
|
*(.rodata..L*)
|
|
|
|
|
}
|
2025-09-17 09:03:10 -07:00
|
|
|
|
2024-10-23 10:07:56 -07:00
|
|
|
MOD_SEPARATE_CODETAG_SECTIONS()
|
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>
|