←back to thread

383 points hkalbasi | 4 comments | | HN request time: 0.001s | source
Show context
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 #
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 #
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 #
1. kibwen ◴[] No.42822076[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 #
2. ajb ◴[] No.42822818[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 #
3. mshockwave ◴[] No.42822974[source]
It’s pretty common to roll your own linker script in embedded software development
4. account42 ◴[] No.42840638[source]
They are also very useful if you care a lot about the size of the resulting binary.