Trying Out LLVM 4.0's LLD Linker On Ubuntu 17.04 vs. GNU LD, GNU Gold

Written by Michael Larabel in Software on 16 March 2017 at 10:42 AM EDT. Page 1 of 3. 14 Comments.

With this week's LLVM 4.0 release making the LLD linker ready for production use on some platforms, namely ELF on x86_64 / AArch64, I decided to finally try it out on one of my test systems. I set LLD as the default linker on an Ubuntu 17.04 system and set off to run some benchmarks.

This LLVM Linker is designed as a drop-in replacement to GNU ld/Gold and has been generating a fair amount of interest due to its speed, particularly on modern multi-core systems. LLD is also doing a good job at linking with being able to link nearly all of the FreeBSD AMD64 packages, the FreeBSD operating system continues working towards using it by default and NetBSD has also been exploring it for the default system linker in the future. More background information on LLD is available from the project's site.

For some initial tests today I compared the performance of LLD to GNU Gold and GNU LD (the default system linker currently on Ubuntu). Gold and LD were from Binutils 2.28 on Ubuntu 17.04. All the tests happened on an Intel Core i7 6800K test box.

All the tests were carried out via the Phoronix Test Suite. In a follow-up article will be a larger comparison, including compiler tests with different linkers and also looking at the resulting binary size.


Related Articles