Most active commenters
  • ajb(3)

←back to thread

383 points hkalbasi | 14 comments | | HN request time: 0.768s | source | bottom
1. ajb ◴[] No.42816737[source]
2008: Gold, a new linker, intended to be faster than Gnu LD

2015(?): Lld a drop in replacement linker, at least 2x as fast as Gold

2021: mold, a new linker, several times faster than lld

2025: wild, a new linker...

replies(4): >>42816811 #>>42817077 #>>42817811 #>>42819983 #
2. dundarious ◴[] No.42816811[source]
For windows, there is also [The RAD Linker](https://github.com/EpicGamesExt/raddebugger?tab=readme-ov-fi...) though quite early days.
3. wolfd ◴[] No.42817077[source]
I’m not sure if you’re intending to leave a negative or positive remark, or just a brief history, but the fact that people are still managing to squeeze better performance into linkers is very encouraging to me.
replies(1): >>42817366 #
4. ajb ◴[] No.42817366[source]
Certainly no intention to be negative. Not having run the numbers, I don't know if the older ones got slower over time due to more features, or the new ones are squeezing out new performance gains. I guess it's also partly that the bigger codebases scaled up so much over this period, so that there are gains to be had that weren't interesting before.
replies(1): >>42817965 #
5. cbmuser ◴[] No.42817811[source]
Gold is slated for removal from binutils for version 2.44.0, so it's officially dead.
replies(1): >>42819494 #
6. wolfd ◴[] No.42817965{3}[source]
Good question, I always wonder the same thing. https://www.phoronix.com/news/Mold-Linker-2024-Performance seems to show that that the newer linkers still outperform their predecessors, even after maturing. But of course this doesn’t show the full picture.
7. saagarjha ◴[] No.42819494[source]
Where is the effort going now? lld?
8. o11c ◴[] No.42819983[source]
Rarely mentioned: all of these occur at the cost of not implementing a very large number of useful features used by real-world programs.
replies(2): >>42820569 #>>42840620 #
9. einpoklum ◴[] No.42820569[source]
Can you name a few of these features, for those of us who don't know much about linking beyond the fact that it takes compiled object files and makes an executable (and maybe does LTO)?
replies(1): >>42822076 #
10. kibwen ◴[] No.42822076{3}[source]
Presumably they're talking about linker scripts, and IMO if you're one of the vanishingly rare people who absolutely needs a linker script for some reason, then, firstly, my condolences, and secondly, given that 99.999% percent of users never need linker scripts, and given how much complexity and fragility their support adds to linker codebases, I'm perfectly happy to say that the rest of us can happily use fast and simple linkers that don't support linker scripts, and the other poor souls can keep using ld.
replies(2): >>42822818 #>>42822974 #
11. ajb ◴[] No.42822818{4}[source]
Anyone wondering why you'd need a linker script: They are essential on bare metal, as you have to tell the linker where the hardware requires you to put stuff. There are lots in the linux kernel repo, u-boot, probably Arduino, etc.
replies(1): >>42840638 #
12. mshockwave ◴[] No.42822974{4}[source]
It’s pretty common to roll your own linker script in embedded software development
13. account42 ◴[] No.42840620[source]
Like ICF? Wait no, everyone supports that except GNU ld.
14. account42 ◴[] No.42840638{5}[source]
They are also very useful if you care a lot about the size of the resulting binary.