[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CABCJKucCJLWfHz6o=wWWx95keLC6na+uO3a0WVLTPEz02gENPw@mail.gmail.com>
Date: Fri, 7 Nov 2025 18:49:35 -0800
From: Sami Tolvanen <samitolvanen@...gle.com>
To: Miguel Ojeda <miguel.ojeda.sandonis@...il.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 Fri, Nov 7, 2025 at 6:31 PM Miguel Ojeda
<miguel.ojeda.sandonis@...il.com> wrote:
>
> 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:
> () = ();
This looks reasonable to me, and indeed seems to fix the problem.
> And then later do something in the `cmd` command itself or teaching
> `genkallksyms` to auto-skip in cases like this.
>
> What do you think?
Like I mentioned in the other thread, we ideally wouldn't silently
skip symbol versioning because the exported symbols won't be usable in
this case.
Sami
Powered by blists - more mailing lists