4 ms·
Gnu Gold, llvm’s LLD, and now Mold all work just fine with GCC for mainstream Linux development for mainstream targets, and reasonably well for secondary target
by compiler-guy 4y ago
Gnu Gold, llvm’s LLD, and now Mold all work just fine with GCC for mainstream Linux development for mainstream targets, and reasonably well for secondary targets.
Dozens of companies use them. Google has an extremely demanding linking environment and developed and used Gold for a long time for it’s primary linker. It has since moved on to LLD. It is unlikely to adopt mold at the moment due to licensing issues.
All the compatibility issues were solved a long time ago with LLD and Gold. Probably only a matter of time for Mold.
The more obscure the target OS and architecture, the more likely gnu ld is the only linker capable of doing the job. But most users won’t notice. Gnu ld has the best linker script support by a wide margin too, so if you are doing really really wacky things with your layout where you need 100% total control, you have to use gnu ld also.
But those are obscure edge cases these days, and very uncommon in normal practice.