Rui Ueyama: "We are rewriting the mold linker in Rust"
twitter.com
twitter.com
That's not a good reason to replace GNU ld with mold, I'm still skeptical about rewriting EVERYTHING in Rust. What's the real reasoning? Who's pushing this so much?
Legitimate question, why not just use GNU ld? Does link time take so long that it requires a complete rewrite?
Traditionally the link time was a single-threaded step at the end of compilation, and it scaled very poorly. While compilation is embarrassingly parallel and has continued to scale. So link time was becoming a significant bottleneck, especially with incremental compilation. When you want to iterate on a large project, with GNU ld you might have to wait several minutes of link time on every dev build.
Although, "with GNU ld you might have to wait several minutes of link time on every dev build." Meh, I might prefer to wait a few minutes and stick with something I know works.
"The creator of mold is also the original creator of LLVM lld" That's cool, why not implement these features in LLVM lld? Why not implement them in GNU ld? Is it a gatekeeping thing? Parallel ld would be very useful.
Also, why Rust?
As for trying to do that in BFD, patches welcome. Or maybe not welcome, I'm not sure the maintainers are really looking for a major redesign of GNU ld. But either way I'm not volunteering, it's much easier to start fresh than try to carve out and replace the entire guts of this old thing.
"But either way I'm not volunteering, it's much easier to start fresh than try to carve out and replace the entire guts of this old thing."
Fair enough :D