summaryrefslogtreecommitdiff
path: root/scripts/module.lds.S
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2025-11-21 13:21:20 +0300
committerPeter Zijlstra <peterz@infradead.org>2025-11-21 13:21:20 +0300
commit2ace52718376fdb56aca863da2eebe70d7e2ddb1 (patch)
tree494517cf79608fa93840a3c84ee5e6118da5f26f /scripts/module.lds.S
parenta53d0cf7f1cb3182ad533ff5cacfa5fd29c419ad (diff)
parent11991999a20145b7f8af21202d0cac6b1f90a6e4 (diff)
downloadlinux-2ace52718376fdb56aca863da2eebe70d7e2ddb1.tar.xz
Merge branch 'objtool/core'
Bring in the UDB and objtool data annotations to avoid conflicts while further extending the bug exceptions. Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Diffstat (limited to 'scripts/module.lds.S')
-rw-r--r--scripts/module.lds.S22
1 files changed, 14 insertions, 8 deletions
diff --git a/scripts/module.lds.S b/scripts/module.lds.S
index ee79c41059f3..3037d5e5527c 100644
--- a/scripts/module.lds.S
+++ b/scripts/module.lds.S
@@ -34,16 +34,22 @@ SECTIONS {
__patchable_function_entries : { *(__patchable_function_entries) }
+ __klp_funcs 0: ALIGN(8) { KEEP(*(__klp_funcs)) }
+
+ __klp_objects 0: ALIGN(8) {
+ __start_klp_objects = .;
+ KEEP(*(__klp_objects))
+ __stop_klp_objects = .;
+ }
+
#ifdef CONFIG_ARCH_USES_CFI_TRAPS
- __kcfi_traps : { KEEP(*(.kcfi_traps)) }
+ __kcfi_traps : { KEEP(*(.kcfi_traps)) }
#endif
-#ifdef CONFIG_LTO_CLANG
- /*
- * 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.
- */
+ .text : {
+ *(.text .text.[0-9a-zA-Z_]*)
+ }
+
.bss : {
*(.bss .bss.[0-9a-zA-Z_]*)
*(.bss..L*)
@@ -58,7 +64,7 @@ SECTIONS {
*(.rodata .rodata.[0-9a-zA-Z_]*)
*(.rodata..L*)
}
-#endif
+
MOD_SEPARATE_CODETAG_SECTIONS()
}