Re: [PATCH] objtool/rust: add one more `noreturn` Rust function

From: Miguel Ojeda

Date: Tue Oct 21 2025 - 13:25:24 EST


On Tue, Oct 21, 2025 at 7:19 PM Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
>
> I'll go stick it in tip/objtool/core; but I gotta ask, where are we with
> the toolchain support for noreturn?

Thanks Peter!

We discussed it with upstream Rust, and they understood the need, so
we may get something like `--emit=noreturn` or similar, but it is
still open (and not too high in the priority list since we can survive
with this for now and we have other things that we really need them to
get stabilized etc. But if you feel it should be prioritized more,
please let me know).

I have the status under "Export (somehow) a list of all noreturn symbols." at:

https://github.com/Rust-for-Linux/linux/issues/355

In particular, Gary proposed an alternative during those discussions:

"Gary proposed reading DWARF instead and wrote a quick Rust script
for it via object and gimli, though DWARF would need to be available
or generated on the fly just for that (and we cannot commit a fixed
list since the kernel config may change and we support several Rust
versions and so on):
https://gist.github.com/nbdd0121/449692570622c2f46a29ad9f47c3379a.";

Cheers,
Miguel