[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANiq72nKC5r24VHAp9oUPR1HVPqT+=0ab9N0w6GqTF-kJOeiSw@mail.gmail.com>
Date: Sat, 8 Nov 2025 03:30:57 +0100
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Sami Tolvanen <samitolvanen@...gle.com>
Cc: Alex Gaynor <alex.gaynor@...il.com>, linux-modules@...r.kernel.org,
linux-kbuild@...r.kernel.org, Boqun Feng <boqun.feng@...il.com>,
Gary Guo <gary@...yguo.net>, Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <lossin@...nel.org>, Andreas Hindborg <a.hindborg@...nel.org>,
Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>,
Danilo Krummrich <dakr@...nel.org>, rust-for-linux@...r.kernel.org,
linux-kernel@...r.kernel.org, patches@...ts.linux.dev, stable@...r.kernel.org,
Haiyue Wang <haiyuewa@....com>, Miguel Ojeda <ojeda@...nel.org>
Subject: Re: [PATCH] rust: kbuild: skip gendwarfksyms in `bindings.o` for Rust
>= 1.91.0
On Sat, Nov 8, 2025 at 2:44 AM Miguel Ojeda <ojeda@...nel.org> wrote:
>
> note that `CLIPPY=1` does not reproduce it
And obviously this means we have to special case this one too...
$(obj)/bindings.o: private skip_gendwarfksyms := $(if $(call
rustc-min-version,109100),$(if $(KBUILD_CLIPPY),,1))
There may be other cases that disable the optimization or similar,
plus we may have other small crates in the future that could also
suffer from this, so it may be best to simply force to generate the
DWARF with a dummy symbol from that crate for the time being as the
fix:
#[expect(unused)]
static DUMMY_SYMBOL_FOR_DWARF_DEBUGINFO_GENERATION_FOR_GENDWARFKSYMS:
() = ();
With `#[no_mangle]` may be more reliable and it also gives an actual
exported symbol.
And then later do something in the `cmd` command itself or teaching
`genkallksyms` to auto-skip in cases like this.
What do you think?
Cheers,
Miguel
Powered by blists - more mailing lists