LLD 7.0.0 Release Notes¶
Introduction¶
lld is a high-performance linker that supports ELF (Unix), COFF (Windows), Mach-O (macOS), MinGW and WebAssembly. lld is command-line-compatible with GNU linkers and Microsoft link.exe, and is significantly faster than the system default linkers.
lld 7 for ELF, COFF and MinGW are production-ready.
- lld/ELF can build the entire FreeBSD/{AMD64,ARMv7} and will be the default linker of the next version of the operating system.
- lld/COFF is being used to create official builds of large popular programs such as Chrome and Firefox.
- lld/MinGW is being used by Firefox for their MinGW builds. lld/MinGW still needs a sysroot specifically built for lld, with llvm-dlltool, though.
- lld/WebAssembly is used as the default (only) linker in Emscripten when using the upstream LLVM compiler.
- lld/Mach-O is still experimental.
Non-comprehensive list of changes in this release¶
ELF Improvements¶
- Fixed a lot of long-tail compatibility issues with GNU linkers.
- Added
-z retpolinepltto emit a PLT entry that doesn’t contain an indirect jump instruction to mitigate Spectre v2 vulnerability. - Added experimental support for SHT_RELR sections to create a compact dynamic relocation table.
- Added support for split stacks.
- Added support for address significance table (section with type
SHT_LLVM_ADDRSIG) to improve Identical Code Folding (ICF). Combined with the
-faddrsigcompiler option added to Clang 7, lld’s--icf=allcan now safely merge functions and data to generate smaller outputs than before. - Improved
--gdb-indexso that it is faster (r336790) and uses less memory (r336672). - Reduced memory usage of
--compress-debug-sections(r338913). - Added linker script OVERLAY support (r335714).
- Added
--warn-backrefto make it easy to identify command line option order that doesn’t work with GNU linkers (r329636) - Added ld.lld.1 man page (r324512).
- Added support for multi-GOT.
- Added support for MIPS position-independent executable (PIE).
- Fixed MIPS TLS GOT entries for local symbols in shared libraries.
- Fixed calculation of MIPS GP relative relocations in case of relocatable output.
- Added support for PPCv2 ABI.
- Removed an incomplete support of PPCv1 ABI.
- Added support for Qualcomm Hexagon ISA.
- Added the following flags:
--apply-dynamic-relocs,--check-sections,--cref,--just-symbols,--keep-unique,--no-allow-multiple-definition,--no-apply-dynamic-relocs,--no-check-sections,--no-gnu-unique, ``--no-pic-executable,--no-undefined-version,--no-warn-common,--pack-dyn-relocs=relr,--pop-state,--print-icf-sections,--push-state,--thinlto-index-only,--thinlto-object-suffix-replace,--thinlto-prefix-replace,--warn-backref,-z combreloc,-z copyreloc,-z initfirst,-z keep-text-section-prefix,-z lazy,-z noexecstack,-z relro,-z retpolineplt,-z text
COFF Improvements¶
- Improved correctness of exporting mangled stdcall symbols.
- Completed support for ARM64 relocations.
- Added support for outputting PDB debug info for MinGW targets.
- Improved compatibility of output binaries with GNU binutils objcopy/strip.
- Sped up PDB file creation.
- Changed section layout to improve compatibility with link.exe.
- /subsystem inference is improved to cover more corner cases.
- Added the following flags:
--color-diagnostics={always,never,auto},--no-color-diagnostics,/brepro,/debug:full,/debug:ghash,/guard:cf,/guard:longjmp,/guard:nolongjmp,/integritycheck,/order,/pdbsourcepath,/timestamp
