lld 12.0.0 Release Notes¶
Warning
These are in-progress notes for the upcoming LLVM 12.0.0 release. Release notes for previous releases can be found on the Download Page.
Introduction¶
This document contains the release notes for the lld linker, release 12.0.0. Here we describe the status of lld, including major improvements from the previous release. All lld releases may be downloaded from the LLVM releases web site.
Non-comprehensive list of changes in this release¶
ELF Improvements¶
--dependency-filehas been added. (Similar tocc -M -MF.) (D82437)--error-handling-scripthas been added to allow for user-defined handlers upon missing libraries. (D87758)--exclude-libscan now localize defined version symbols and bitcode referenced libcall symbols. (D94280)--gdb-indexnow works with DWARF v5 and--icf={safe,all}. (D85579) (D89751)--gdb-index --emit-relocscan now be used together. (D94354)--icf={safe,all}conservatively no longer fold text sections with LSDA. Previously ICF on-fexceptionscode could be unsafe. (D84610)--icf={safe,all}can now fold two sections with relocations referencing aliased symbols. (D88830)--lto-pseudo-probe-for-profilinghas been added. (D95056)--no-lto-whole-program-visibilityhas been added. (D92060)--oformat-binaryhas been fixed to respect LMA. (D85086)--reproduceincludes--lto-sample-profile,--just-symbols,--call-graph-ordering-file,--retain-symbols-filefiles.-r --gc-sectionsis now supported. (D84131)A
-uspecified symbol will no longer change the binding toSTB_WEAK. (D88945)--wrapsupport has been improved. + Iffoois not referenced, there is no longer an undefined symbol__wrap_foo. + If__real_foois not referenced, there is no longer an undefined symbolfoo.SHF_LINK_ORDERsections can now have zerosh_linkvalues.SHF_LINK_ORDERand non-SHF_LINK_ORDERsections can now be mixed within an input section description. (D84001)LOG2CEILis now supported in linker scripts. (D84054)DEFINEDhas been fixed to check whether the symbol is defined. (D83758)An input section description may now have multiple
SORT_*. The matched sections are ordered by radix sort with the keys being(SORT*, --sort-section, input order). (D91127)Users can now provide a GNU style linker script to convert
.ctorsinto.init_array. (D91187)An empty output section can now be discarded even if it is assigned to a program header. (D92301)
Non-
SHF_ALLOCsections now have larger file offsets thanSHF_ALLOCsections. (D85867)Some symbol versioning improvements. + Defined
foo@@v1now resolve undefinedfoo@v1(D92259) + Undefinedfoo@v1now gets an error (D92260)The AArch64 port now has support for
STO_AARCH64_VARIANT_PCSandDT_AARCH64_VARIANT_PCS. (D93045)The AArch64 port now has support for
R_AARCH64_LD64_GOTPAGE_LO15.The PowerPC64 port now detects missing R_PPC64_TLSGD/R_PPC64_TLSLD and disables TLS relaxation. This allows linking with object files produced by very old IBM XL compilers. (D92959)
Many PowerPC PC-relative relocations are now supported.
R_PPC_ADDR24andR_PPC64_ADDR16_HIGHare now supported.powerpcle is now supported. Tested with FreeBSD loader and freestanding. (D93917)
RISC-V: the first
SHT_RISCV_ATTRIBUTESsection is now retained. (D86309)LTO pipeline now defaults to the new PM if the CMake variable
ENABLE_EXPERIMENTAL_NEW_PASS_MANAGERis on. (D92885)
Breaking changes¶
COFF Improvements¶
Error out clearly if creating a DLL with too many exported symbols. (D86701)
MinGW Improvements¶
Enabled dynamicbase by default. (D86654)
Tolerate mismatches between COMDAT section sizes with different amount of padding (produced by binutils) by inspecting the aux section definition. (D86659)
Support setting the subsystem version via the subsystem argument. (D88804)
Handle the
--demangleand--no-demangleoptions. (D93950)
Mach-O Improvements¶
We’ve gotten the new implementation of LLD for Mach-O to the point where it is able to link large x86_64 programs, and we’d love to get some alpha testing on it. The new Darwin back-end can be invoked as follows:
To reach this point, we implemented numerous features, and it’s easier to list the major features we haven’t yet completed:
LTO support
Stack unwinding for exceptions
Support for arm64, arm, and i386 architectures
If you stumble upon an issue and it doesn’t fall into one of these categories, please file a bug report!
