Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'objtool-urgent-2025-02-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull objtool fixes from Ingo Molnar:
"Fix an objtool false positive, and objtool related build warnings that
happens on PIE-enabled architectures such as LoongArch"

* tag 'objtool-urgent-2025-02-28' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
objtool: Add bch2_trans_unlocked_or_in_restart_error() to bcachefs noreturns
objtool: Fix C jump table annotations for Clang
vmlinux.lds: Ensure that const vars with relocations are mapped R/O

+8 -7
+1 -1
include/asm-generic/vmlinux.lds.h
··· 457 457 . = ALIGN((align)); \ 458 458 .rodata : AT(ADDR(.rodata) - LOAD_OFFSET) { \ 459 459 __start_rodata = .; \ 460 - *(.rodata) *(.rodata.*) \ 460 + *(.rodata) *(.rodata.*) *(.data.rel.ro*) \ 461 461 SCHED_DATA \ 462 462 RO_AFTER_INIT_DATA /* Read only after init */ \ 463 463 . = ALIGN(8); \
+1 -1
include/linux/compiler.h
··· 110 110 /* Unreachable code */ 111 111 #ifdef CONFIG_OBJTOOL 112 112 /* Annotate a C jump table to allow objtool to follow the code flow */ 113 - #define __annotate_jump_table __section(".rodata..c_jump_table,\"a\",@progbits #") 113 + #define __annotate_jump_table __section(".data.rel.ro.c_jump_table") 114 114 #else /* !CONFIG_OBJTOOL */ 115 115 #define __annotate_jump_table 116 116 #endif /* CONFIG_OBJTOOL */
+4 -3
tools/objtool/check.c
··· 2472 2472 * 2473 2473 * - .rodata: can contain GCC switch tables 2474 2474 * - .rodata.<func>: same, if -fdata-sections is being used 2475 - * - .rodata..c_jump_table: contains C annotated jump tables 2475 + * - .data.rel.ro.c_jump_table: contains C annotated jump tables 2476 2476 * 2477 2477 * .rodata.str1.* sections are ignored; they don't contain jump tables. 2478 2478 */ 2479 2479 for_each_sec(file, sec) { 2480 - if (!strncmp(sec->name, ".rodata", 7) && 2481 - !strstr(sec->name, ".str1.")) { 2480 + if ((!strncmp(sec->name, ".rodata", 7) && 2481 + !strstr(sec->name, ".str1.")) || 2482 + !strncmp(sec->name, ".data.rel.ro", 12)) { 2482 2483 sec->rodata = true; 2483 2484 found = true; 2484 2485 }
+1 -1
tools/objtool/include/objtool/special.h
··· 10 10 #include <objtool/check.h> 11 11 #include <objtool/elf.h> 12 12 13 - #define C_JUMP_TABLE_SECTION ".rodata..c_jump_table" 13 + #define C_JUMP_TABLE_SECTION ".data.rel.ro.c_jump_table" 14 14 15 15 struct special_alt { 16 16 struct list_head list;
+1 -1
tools/objtool/noreturns.h
··· 19 19 NORETURN(arch_cpu_idle_dead) 20 20 NORETURN(bch2_trans_in_restart_error) 21 21 NORETURN(bch2_trans_restart_error) 22 - NORETURN(bch2_trans_unlocked_error) 22 + NORETURN(bch2_trans_unlocked_or_in_restart_error) 23 23 NORETURN(cpu_bringup_and_idle) 24 24 NORETURN(cpu_startup_entry) 25 25 NORETURN(do_exit)