~icefox/garnet#18: 
Linker thoughts

From readme: I am not CONVINCED that a linker is the best way to handle things. This has implications on things like distributing libraries, defining ABI's, using DLL's, and parallelizing the compiler itself. No solid thoughts here yet, but it is an area worth thinking about. Rust, C, Go and Swift present different points in this area to look at.

https://github.com/rui314/mold

Status
REPORTED
Submitter
~icefox
Assigned to
No-one
Submitted
3 years ago
Updated
8 months ago
Labels
T-LATER

~icefox 3 years ago

Semi-related: #8 , since it looks at "why modules and compilation units" a bit.

~icefox 3 years ago

For reference, it looks like Zig, like Rust, does a whole project as a single compilation unit. This post and the attached video suggest that Zig is also experimenting with re-thinking the traditional linker pipeline. It's pretty cool.

~icefox referenced this from #47 1 year, 2 months ago

~icefox referenced this from #52 1 year, 1 month ago

~icefox 8 months ago*

https://lobste.rs/s/mxwit7/link_time_optimisation_lto has some interesting conversations. It's pretty clear to me by now that the traditional 1970's linking model can be certainly be improved.

The trick to that, imo, is how to effectively parallelize compilation. That's the real problem that linkers try to solve these days. That kinda requires that whole-program analysis either be kept to an absolute minimum or also effectively parallelized (and stay effective as it's scaled up to 100's of cores and majillions of LoC). #52 has some related discussion.

Register here or Log in to comment, or comment via email.