lld 20.1.7 Release Notes¶
Introduction¶
This document contains the release notes for the lld linker, release 20.1.7. 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¶
-z nosectionheaderhas been implemented to omit the section header table. The operation is similar tollvm-objcopy --strip-sections. (#101286)--randomize-section-padding=<seed>is introduced to insert random padding between input sections and at the start of each segment. This can be used to control measurement bias in A/B experiments. (#117653)The reproduce tarball created with
--reproduce=now excludes directories specified in the--dependency-fileargument (used by Ninja). This resolves an error where non-existent directories could cause issues when invokingld.lld @response.txt.--symbol-ordering-file=and call graph profile can now be used together.When
--call-graph-ordering-file=is specified,.llvm.call-graph-profilesections in relocatable files are no longer used.--lto-basic-block-sections=labelsis deprecated in favor of--lto-basic-block-address-map. (#110697)In non-relocatable links, a
.note.GNU-stacksection with theSHF_EXECINSTRflag is now rejected unless-z execstackis specified. (#124068)In relocatable links, the
sh_entsizemember of aSHF_MERGEsection with relocations is now respected in the output.Quoted names can now be used in output section phdr, memory region names,
OVERLAY, the LHS of--defsym, andINSERT AFTER.Section
CLASSlinker script syntax binds input sections to named classes, which are referenced later one or more times. This provides access to the automatic spilling mechanism of –enable-non-contiguous-regions without globally changing the semantics of section matching. It also independently increases the expressive power of linker scripts. (#95323)INCLUDEcycle detection has been fixed. A linker script can now be included twice.The
archivename:syntax when matching input sections is now supported. (#119293)To support Arm v6-M, short thunks using B.w are no longer generated. (#118111)
For AArch64, BTI-aware long branch thunks can now be created to a destination function without a BTI instruction. (#108989) (#116402)
Relocations related to GOT and TLSDESC for the AArch64 Pointer Authentication ABI are now supported.
Supported relocation types for x86-64 target: *
R_X86_64_CODE_4_GOTPCRELX(#109783) (#116737) *R_X86_64_CODE_4_GOTTPOFF(#116634) *R_X86_64_CODE_4_GOTPC32_TLSDESC(#116909) *R_X86_64_CODE_6_GOTTPOFF(#117675)Supported relocation types for LoongArch target:
R_LARCH_TLS_{LD,GD,DESC}_PCREL20_S2. (#100105)The default Hexagon architecture version in ELF object files produced by lld is changed to v68. This change is only effective when the version is not provided in the command line by the user and cannot be inferred from inputs.
Breaking changes¶
Removed support for the (deprecated) R_RISCV_RVC_LUI relocation. This was a binutils-internal relocation used during relaxation, and was not emitted by compilers/assemblers.
COFF Improvements¶
/includeglobhas been implemented to match the behavior of--undefined-globavailable for ELF./lldsavetempsallows saving select intermediate LTO compilation results (e.g. resolution, preopt, promote, internalize, import, opt, precodegen, prelink, combinedindex)./machine:arm64ecsupport completed, enabling the linking of ARM64EC images.COFF weak anti-dependency alias symbols are now supported.
MinGW Improvements¶
--undefined-globis now supported by translating into the/includeglobflag.
