GCC 12 Adds Support For Using The Mold Linker

Written by Michael Larabel in GNU on 29 December 2021 at 02:47 PM EST. 26 Comments
A small but noteworthy change that landed today for the GCC 12 compiler itself is support for using the Mold linker.

Released last week was Mold 1.0 as a high-speed linker that can deliver better performance than GNU's old Gold linker and even LLVM's LLD. Mold was designed by Rui Ueyama who originally working on LLVM's linker. With Mold 1.0, Rui feels that the linker is now production-ready and has been delivering mighty impressive performance results:

Mold's insane performance is attributed to faster algorithms and efficient data structures compared to the other common linkers. Mold is available on GitHub for those interested in the linker itself.

With this commit using the Mold linker is supported alongside the Gold, BDF, and LLD linkers. The -fuse-ld=mold is introduced for GCC 12 if preferring to use the Modern Linker (Mold) in place of the default linker.

SUSE's Martin Liška who wrote up this Mold linker support patch justified the addition as "The mold linker is getting quite popular and I think we should support it."
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week