Mold is a high-performance linker designed to replace standard system tools for the creation of executable binaries and shared libraries. It functions as a drop-in replacement for existing linkers, focusing on accelerating the final build phase of large software projects to improve developer productivity.
The tool achieves its performance by utilizing multi-threaded processing to distribute the linking of object files across multiple CPU cores. It supports cross-architecture binary linking, allowing it to process compiled files for diverse platforms efficiently. By intercepting standard linker invocations, it integrates into existing build systems without requiring manual configuration changes.
The software employs several technical strategies to minimize build times, including memory-mapped file input and output, lock-free symbol tables, and optimized relocation processing. These methods reduce system call overhead and prioritize cache locality during the generation of output binaries.