On Fri, Nov 7, 2025 at 5:42 PM Miguel Ojeda <[email protected]> wrote: > > On Thu, Nov 6, 2025 at 6:54 PM Miguel Ojeda > <[email protected]> wrote: > > > > Bisecting nightlies, it seemed to happen between: > > > > rustc 1.91.0-nightly (12eb345e5 2025-09-07) > > rustc 1.91.0-nightly (9c27f27ea 2025-09-08) > > Ok, for reference, it was upstream's ab91a63d403b ("Ignore intrinsic > calls in cross-crate-inlining cost model"): the object file stops > containing DWARF debug information because the `Default` > implementations contained `write_bytes()` calls which are now ignored > in that cost model and so everything is essentially as if `#[inline]`. > > If one generates the bindings without the `Debug` impls, indeed the > file stops containing DWARF even in Rust 1.90.0. > > For the moment, we can just skip `gendwarfksyms` starting with Rust > 1.91.0 (sending a quick patch for that), but it may be a bit brittle > in that new versions could again re-introduce some symbols that get > exported from that one etc.
Technically speaking, bindings.o still exports ~1500 symbols even with newer rustc versions. If we don't actually expect modules to use these symbols, the correct solution is to not export them. Otherwise, modules that depend on these symbols will nevertheless fail to load with modversions. > Sami, would it make sense to "auto-skip" in `gendwarfksyms` itself if > an object file does not have anything interesting and then remove that > from the `Makefile`? I'm not sure it makes sense to silently export unusable symbols. I feel like we should either ensure there's debugging information for these symbols, or just not export them. Sami
