Skip to contentSkip to conversation

objtool/rust: add one more `noreturn` Rust function for Rust 1.101.0

PATCH Applied Miguel Ojeda 2 participants 2 messages Oct 18 – Oct 20

Subsystems (3)
lore
Share & tools
lore

Miguel Ojeda

author maintainer
#0 lore raw

PATCH 1/1 objtool/rust: add one more `noreturn` Rust function for Rust 1.101.0

Starting with Rust 1.101.0 (expected 2026-12-24), objtool may report:

rust/kernel.o: warning: objtool: _R..._4core6result13unwrap_failed...() falls through to next function _R..._4core6result13unwrap_failed...()

(and others) due to calls to the noreturn symbol:

core::result::unwrap_failed::unwrap_failed_inner

Rust introduced this helper when making unwrap_failed generic [1]. The existing entry for unwrap_failed does not match the new helper.

Thus add the mangled one to the list so that objtool knows it is actually noreturn.

See commit 56d680dd23c3 ("objtool/rust: list noreturn Rust functions") for more details.

Cc [email protected] # Needed in 6.12.y and later (Rust is pinned in older LTSs).
Cc Josh Poimboeuf <[email protected]>
Cc Peter Zijlstra <[email protected]>
Assisted-by LLM
---
 tools/objtool/check.c | 1 +
 1 file changed, 1 insertion(+)
tools/objtool/check.c +1 -0
index 464f6c9d9ff0..931c5c412f15 100644
@@ -201,6 +201,7 @@ static bool is_rust_noreturn(const struct symbol *func)
 	       str_ends_with(func->name, "_4core6option13expect_failed")				||
 	       str_ends_with(func->name, "_4core6option13unwrap_failed")				||
 	       str_ends_with(func->name, "_4core6result13unwrap_failed")				||
+	       str_ends_with(func->name, "_4core6result13unwrap_failed19unwrap_failed_inner")		||
 	       str_ends_with(func->name, "_4core9panicking5panic")					||
 	       str_ends_with(func->name, "_4core9panicking9panic_fmt")					||
 	       str_ends_with(func->name, "_4core9panicking14panic_explicit")				||

base-commit: 24a19b953e2a3d0ea5a8c4951a0ab8f32720c907

Signature · 1 line
2.56.0
Applied
#1 lore raw
Quoted 19 lines · Miguel Ojeda

Starting with Rust 1.101.0 (expected 2026-12-24), objtool may report:

rust/kernel.o: warning: objtool: _R..._4core6result13unwrap_failed...() falls through to next function _R..._4core6result13unwrap_failed...()

(and others) due to calls to the noreturn symbol:

core::result::unwrap_failed::unwrap_failed_inner

Rust introduced this helper when making unwrap_failed generic [1]. The existing entry for unwrap_failed does not match the new helper.

Thus add the mangled one to the list so that objtool knows it is actually noreturn.

See commit 56d680dd23c3 ("objtool/rust: list noreturn Rust functions") for more details.

Quoted 6 lines
Cc [email protected] # Needed in 6.12.y and later (Rust is pinned in older LTSs).
Cc Josh Poimboeuf <[email protected]>
Cc Peter Zijlstra <[email protected]>
Assisted-by LLM

Applied to rust-fixes -- tags still welcome!

Cheers,
Miguel