Live data from Hacker News

Mold: A Massively Parallel Linker

arxiv.org

11–20 of 29 posts

Re: Mold: A Massively Parallel Linker

#11

Old tweet from Rui, but I saw it in a recent zig video and really liked the sentiment: ( https://x.com/rui314/status/1560277403787997185 ) > my strategy is to increase the value of commons by, say, 100 and get 1 as a return, so bear with me. If you want to use mold for free, you can just do that. This is my open-source business strategy. Wishing the best for Mold and Rui

Given the passing of nitter, xcancel, etc., thank you for quoting the relevant text.

Re: Mold: A Massively Parallel Linker

#12
This is a wonderful paper that includes many optimization tricks that are generally applicable, including various optimizations that they retrofitted into lld. But I thought there was one meta optimization that was especially interesting (from page 2):

> A new linker's early adopters knowingly accept such differences, which is one reason why drastic improvements tend to come from new linkers rather than existing ones

This is true of many things, not just linkers. I think this is encouraging for people to (re)try things that have already been done, because newcomers are allowed to take risks that established things can't take.

Re: Mold: A Massively Parallel Linker

#13
Here's a lwn.net link to Ian Lance Taylor's blog posts about his gold linker (his blog doesn't seem to have any table of contents or group the linker-related blog posts in one area/tag).

see https://lwn.net/Articles/276782/

GNU gold is deprecated and will probably be removed soon. ( https://www.phoronix.com/news/GNU-Gold-Linker-Deprecated )

But back in the late 2000s, the blog posts were a combination of algorithm optimization class and software history since no one seemed to step up to cleanup the technical debt that GNU ld had accumulated over the decades.

Re: Mold: A Massively Parallel Linker

#14

This is a wonderful paper that includes many optimization tricks that are generally applicable, including various optimizations that they retrofitted into lld. But I thought there was one meta optimization that was especially interesting (from page 2): > A new linker's early adopters knowingly accept such differences, which is one reason why drastic improvements tend to come from new linkers rather than existing ones…

Mold's definitely innovating.

I use mold a lot for code embedding in my lisp. I needed extra null PHT entries in the ELF so I could easily patch in custom segments into the interpreter after the link was done.

GNU pretty much ignored the feature request and LLVM probably never even saw the issue, but Rui shipped the --spare-program-headers feature pretty much immediately after I requested it and it immediately restored my sanity.

https://www.matheusmoreira.com/articles/self-contained-lone-...

Current version of my patcher supports ld and lld, but it has to move the PHT to the end of the file in order to append the new segments. Mold is still the only way to avoid the ugly hole where the PHT used to be.

Re: Mold: A Massively Parallel Linker

#15

Here's a lwn.net link to Ian Lance Taylor's blog posts about his gold linker (his blog doesn't seem to have any table of contents or group the linker-related blog posts in one area/tag). see https://lwn.net/Articles/276782/ GNU gold is deprecated and will probably be removed soon. ( https://www.phoronix.com/news/GNU-Gold-Linker-Deprecated ) But back in the late 2000s, the blog posts were a combination of algorithm op…

See also https://github.com/MattPD/cpplinks/blob/master/executables.l...

Re: Mold: A Massively Parallel Linker

#16

Old tweet from Rui, but I saw it in a recent zig video and really liked the sentiment: ( https://x.com/rui314/status/1560277403787997185 ) > my strategy is to increase the value of commons by, say, 100 and get 1 as a return, so bear with me. If you want to use mold for free, you can just do that. This is my open-source business strategy. Wishing the best for Mold and Rui

Given the passing of nitter, xcancel, etc., thank you for quoting the relevant text.

The nitter software still works and so do most of the servers except the most popular 2

Re: Mold: A Massively Parallel Linker

#17
post #6
post #4

Earlier quoted context omitted.

Rui mentioned today that he managed to speed up mold "about 1.5 times" while writing this paper https://x.com/rui314/status/2092486965186969699?s=20 Seems that some optimizations went to mold 2.42 and others are not yet released. Wild benchmarked mold 2.40 or 2.41

I guess this sentence from the Wild readme is also relevant: Mold is already very fast, however it doesn't do incremental linking and the author has stated that they don't intend to.

To be clear, Wild also doesn't do incremental linking yet but plans to in the future

Re: Mold: A Massively Parallel Linker

#18
post #16

Earlier quoted context omitted.

Given the passing of nitter, xcancel, etc., thank you for quoting the relevant text.

The nitter software still works and so do most of the servers except the most popular 2

> so do most of the servers except the most popular 2

Are you sure? All three servers I regularly use, as well as all of the mirrors that I found with a quick search, are down. If there are other servers still working then can you please give a hint about how I could find them?

Re: Mold: A Massively Parallel Linker

#19
shameless plug: lld 23.x is significantly faster than 22.x! I wrote about the optimizations in https://maskray.me/blog/2026-04-12-recent-lld-elf-performanc... As a side note, parallel input file parsing and symbol resolution aren't a silver bullet. I have an experimental branch (net ~800 lines of code) adding this to lld/ELF, but it actually loses performance when restricted to --threads={1,2}

I read how mold implements parallel input file parsing a while ago. It is overly complicated. wild's model seems superior.

---

"Table 4." in the paper feels misleading to me. I have never measured such high speedups. In addition, on debug builds (especially --gdb-index builds), mold's edge over lld is smaller.

On ICF, some unknown fraction of mold's speedup is due to "doesn't do the symbol bootkeeping". The symbol tables are different in mold but identical in lld.

Re: Mold: A Massively Parallel Linker

#20
post #16

Earlier quoted context omitted.

Given the passing of nitter, xcancel, etc., thank you for quoting the relevant text.

The nitter software still works and so do most of the servers except the most popular 2

xcancel.com and nittler.poast.org were the only remaining servers that worked reliably for me before the cease&desist.
Post reply on HN