Re: `KSYM_NAME_LEN` strikes again
From: John Hubbard
Date: Sun Nov 30 2025 - 23:57:09 EST
On 11/30/25 6:16 PM, Miguel Ojeda wrote:
Hi all,...
In some Rust configs with -Os and doctests enabled, we are hitting
KSYM_NAME_LEN again:
Other options:I'm impressed that you listed this last one, because it seems like a
- Conditionally doing it only for those builds that need it, to avoid
penalizing other builds (including normal Rust builds).
- Building the Rust side with -O2 for now, or at least tweaking some
of the inlining behavior under -Os.
- Not supporting Rust for `CC_OPTIMIZE_FOR_SIZE` for now (e.g. under
`BROKEN`).
- Stop all this and go with a hashing approach like Willy/Linus
discussed back then:
https://lore.kernel.org/rust-for-linux/CAHk-=whzXv=Fu7dQshSTyd9H1-JS5=gyKwW-GMNGccAKs4Mwpg@xxxxxxxxxxxxxx/
somewhat extensive project!
But if it's actually an option, it seems like a very nice one:
a durable and long-lasting fix.
Maybe we would also get demangled backtraces at runtime as a side
effect, which would remove another minor bit of unhappiness too.
thanks,
--
John Hubbard