lld 18.0.0git Release Notes

Warning

These are in-progress notes for the upcoming LLVM 18.0.0git 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 18.0.0git. 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

  • ELFCOMPRESS_ZSTD compressed input sections are now supported. (D129406)

  • --compress-debug-sections=zstd is now available to compress debug sections with zstd (ELFCOMPRESS_ZSTD). (D133548)

  • --no-warnings/-w is now available to suppress warnings. (D136569)

  • DT_RISCV_VARIANT_CC is now produced if at least one R_RISCV_JUMP_SLOT relocation references a symbol with the STO_RISCV_VARIANT_CC bit. (D107951)

  • When --threads= is not specified, the number of concurrency is now capped to 16. A large --thread= can harm performance, especially with some system malloc implementations like glibc’s. (D147493)

  • --remap-inputs= and --remap-inputs-file= are added to remap input files. (D148859)

  • --lto= is now available to support clang -funified-lto (D123805)

  • --lto-CGO[0-3] is now available to control CodeGenOptLevel independent of the LTO optimization level. (D141970)

  • --check-dynamic-relocations= is now correct 32-bit targets when the addend is larger than 0x80000000. (D149347)

  • --print-memory-usage has been implemented for memory regions. (D150644)

  • SHF_MERGE, --icf=, and --build-id=fast have switched to 64-bit xxh3. (D154813)

  • Quoted output section names can now be used in linker scripts. (#60496)

  • MEMORY can now be used without a SECTIONS command. (D145132)

  • REVERSE can now be used in input section descriptions to reverse the order of input sections. (D145381)

  • Program header assignment can now be used within OVERLAY. This functionality was accidentally lost in 2020. (D150445)

  • Operators ^ and ^= can now be used in linker scripts.

  • LoongArch is now supported.

  • DT_AARCH64_MEMTAG_* dynamic tags are now supported. (D143769)

  • AArch32 port now supports BE-8 and BE-32 modes for big-endian. (D140201) (D140202) (D150870)

  • R_ARM_THM_ALU_ABS_G* relocations are now supported. (D153407)

  • .ARM.exidx sections may start at non-zero output section offset. (D148033)

  • Arm Cortex-M Security Extensions is now implemented. (D139092)

  • BTI landing pads are now added to PLT entries accessed by range extension thunks or relative vtables. (D148704) (D153264)

  • AArch64 short range thunk has been implemented to mitigate the performance loss of a long range thunk. (D148701)

  • R_AVR_8_LO8/R_AVR_8_HI8/R_AVR_8_HLO8/R_AVR_LO8_LDI_GS/R_AVR_HI8_LDI_GS have been implemented. (D147100) (D147364)

  • --no-power10-stubs now works for PowerPC64.

  • DT_PPC64_OPT is now supported; (D150631)

  • PT_RISCV_ATTRIBUTES is added to include the SHT_RISCV_ATTRIBUTES section. (D152065)

  • R_RISCV_PLT32 is added to support C++ relative vtables. (D143115)

  • RISC-V global pointer relaxation has been implemented. Specify --relax-gp to enable the linker relaxation. (D143673)

  • The symbol value of foo is correctly handled when --wrap=foo and RISC-V linker relaxation are used. (D151768)

  • x86-64 large data sections are now placed away from code sections to alleviate relocation overflow pressure. (D150510)

  • --fat-lto-objects option is added to support LLVM FatLTO. Without --fat-lto-objects, LLD will link LLVM FatLTO objects using the relocatable object file. (D146778)

  • common-page-size can now be larger than the system page-size. (#57618)

Breaking changes

COFF Improvements

  • Added support for --time-trace and associated --time-trace-granularity. This generates a .json profile trace of the linker execution.

MinGW Improvements

MachO Improvements

WebAssembly Improvements

Fixes