Generated by GPT-5-mini| lld | |
|---|---|
| Name | lld |
| Developer | LLVM Project |
| Released | 2015 |
| Programming language | C++ |
| Operating system | Linux, Microsoft Windows, macOS, FreeBSD |
| Genre | Linker |
| License | University of Illinois/NCSA Open Source License |
lld
lld is a high-performance linker implemented as part of the LLVM Project toolchain. It aims to provide faster link times and improved diagnostics compared with traditional linkers such as those from GNU Project and Microsoft. lld supports multiple platforms and object formats, integrating with compilers like Clang and toolchains used by projects such as Chromium and Mozilla Firefox.
lld is designed to replace system linkers on Linux, Microsoft Windows, and macOS with a unified, modern implementation. It implements frontends for formats including ELF, Mach-O, and PE/COFF so it can be used by large applications like KDE, GNOME, LibreOffice, and Google Chrome. lld emphasizes performance, scalability for large codebases such as Android and Firefox, and improved error messages similar to innovations in Clang and LLVM diagnostics.
Development of lld began within the LLVM Project to address limitations observed with traditional linkers like the GNU linker (ld.bfd) and gold. Early work was influenced by link-time optimization efforts in LLVM and performance requirements of projects including Android and Chromium OS. Key milestones include initial public releases around 2015, adoption in build systems for Kubernetes components, and integration into continuous integration environments for organizations such as Apple and Intel. Contributors have included engineers from Google, AMD, ARM Holdings, and independent contributors coordinated through LLVM Foundation events and repositories.
lld's architecture is modular with separate frontends for each binary format and shared backends for symbol resolution and section layout. The linker uses algorithms and data structures refined in LLVM components like LLD's internal design (implementation files in the LLVM Project repository) and borrows ideas from projects such as Binutils and gold. For ELF, lld implements GNU-style semantics compatible with linkers used by GCC-based toolchains and supports features required by glibc and musl. For Mach-O, lld handles Xcode-style linking scenarios encountered in Apple projects. The PE/COFF frontend aims at compatibility with Microsoft Visual Studio linkers, enabling cross-compilation for Windows targets from Unix-like hosts.
lld provides features expected by modern build systems: incremental linking for reduced rebuild times used by projects like Android builds, thin archive support leveraged by CMake-driven projects such as KDE, and link-time optimization hooks used alongside Clang's LTO. Performance benchmarks have shown lld often outperforms linkers like GNU linker and Microsoft LINK in large-scale workloads for projects including Chromium and Firefox. Its memory usage and parallelism strategies are designed to scale on servers used by vendors such as Google and Facebook. lld also offers enhanced diagnostics inspired by Clang and LLVM tooling, improving developer workflows at organizations like Microsoft and Apple.
lld integrates with build systems and package managers including CMake, Ninja, Bazel, and Meson, enabling use in projects such as LLVM itself, Chromium, and KDE applications. Tooling around lld includes wrappers and compatibility layers that mimic command-line flags of GNU linkers and Microsoft LINK to ease adoption by projects like LibreOffice and OpenJDK. Debuggers and binary utilities such as GDB, LLDB, objdump, and readelf interoperate with binaries produced by lld, which is important for heavy users like NASA research groups and academic projects at MIT and Stanford University.
Adoption of lld spans large open-source projects and commercial vendors. Significant users include Chromium, Mozilla Firefox, Android Open Source Project, KDE, and many Linux distributions such as Fedora and Debian for select packages. Contributions come from corporations like Google, Apple, Intel, AMD, and ARM Holdings, as well as independent contributors coordinated through channels such as LLVM Developer Meeting sessions and the LLVM mailing list. Community efforts include performance tuning for cloud CI platforms used by GitHub and GitLab and integration work for cross-compilation environments used by Yocto Project and OpenEmbedded.
lld is distributed under the University of Illinois/NCSA Open Source License, the same permissive license used by other LLVM Project components. This license has facilitated contributions and corporate adoption by entities such as Google, Microsoft, Apple, and Amazon Web Services. The project accepts patches and contributions via the LLVM Project contribution process, requiring adherence to coding standards and use of Phabricator (previously) or the current LLVM Gerrit/GitHub workflows. Corporate contributors often work alongside independent developers during events like LLVM Developer Meeting and FOSDEM to coordinate roadmap and maintenance.
Category:Linkers