xref: /freebsd/contrib/llvm-project/lld/docs/ReleaseNotes.rst (revision 7ef62cebc2f965b0f640263e179276928885e33d)
1===========================
2lld |release| Release Notes
3===========================
4
5.. contents::
6    :local:
7
8.. only:: PreRelease
9
10  .. warning::
11     These are in-progress notes for the upcoming LLVM |release| release.
12     Release notes for previous releases can be found on
13     `the Download Page <https://releases.llvm.org/download.html>`_.
14
15Introduction
16============
17
18This document contains the release notes for the lld linker, release |release|.
19Here we describe the status of lld, including major improvements
20from the previous release. All lld releases may be downloaded
21from the `LLVM releases web site <https://llvm.org/releases/>`_.
22
23Non-comprehensive list of changes in this release
24=================================================
25
26ELF Improvements
27----------------
28
29* Link speed improved greatly compared with lld 15.0. Notably input section
30  initialization and relocation scanning are now parallel.
31  (`D130810 <https://reviews.llvm.org/D130810>`_)
32  (`D133003 <https://reviews.llvm.org/D133003>`_)
33* ``ELFCOMPRESS_ZSTD`` compressed input sections are now supported.
34  (`D129406 <https://reviews.llvm.org/D129406>`_)
35* ``--compress-debug-sections=zstd`` is now available to compress debug
36  sections with zstd (``ELFCOMPRESS_ZSTD``).
37  (`D133548 <https://reviews.llvm.org/D133548>`_)
38* ``--no-warnings``/``-w`` is now available to suppress warnings.
39  (`D136569 <https://reviews.llvm.org/D136569>`_)
40* ``DT_RISCV_VARIANT_CC`` is now produced if at least one ``R_RISCV_JUMP_SLOT``
41  relocation references a symbol with the ``STO_RISCV_VARIANT_CC`` bit.
42  (`D107951 <https://reviews.llvm.org/D107951>`_)
43* ``DT_STATIC_TLS`` is now set for AArch64/PPC32/PPC64 initial-exec TLS models
44  when producing a shared object.
45* ``--no-undefined-version`` is now the default; symbols named in version
46  scripts that have no matching symbol in the output will be reported. Use
47  ``--undefined-version`` to revert to the old behavior.
48  (`D135402 <https://reviews.llvm.org/D135402>`_)
49* ``-V`` is now an alias for ``-v`` to support ``gcc -fuse-ld=lld -v`` on many targets.
50* ``-r`` no longer defines ``__global_pointer$`` or ``_TLS_MODULE_BASE_``.
51* A corner case of mixed GCC and Clang object files (``STB_WEAK`` and
52  ``STB_GNU_UNIQUE`` in different COMDATs) is now supported.
53  (`D136381 <https://reviews.llvm.org/D136381>`_)
54* The output ``SHT_RISCV_ATTRIBUTES`` section now merges all input components
55  instead of picking the first input component.
56  (`D138550 <https://reviews.llvm.org/D138550>`_)
57* For x86-32, ``-fno-plt`` GD/LD TLS models ``call *___tls_get_addr@GOT(%reg)``
58  are now supported. Previous output might have runtime crash.
59* Armv4(T) thunks are now supported.
60  (`D139888 <https://reviews.llvm.org/D139888>`_)
61  (`D141272 <https://reviews.llvm.org/D141272>`_)
62
63Breaking changes
64----------------
65
66COFF Improvements
67-----------------
68
69* The linker command line entry in ``S_ENVBLOCK`` of the PDB is now stripped
70  from input files, to align with MSVC behavior.
71  (`D137723 <https://reviews.llvm.org/D137723>`_)
72* Switched from SHA1 to BLAKE3 for PDB type hashing / ``-gcodeview-ghash``
73  (`D137101 <https://reviews.llvm.org/D137101>`_)
74* Improvements to the PCH.OBJ files handling. Now LLD behaves the same as MSVC
75  link.exe when merging PCH.OBJ files that don't have the same signature.
76  (`D136762 <https://reviews.llvm.org/D136762>`_)
77* Changed the OrdinalBase for DLLs from 0 to 1, matching the output from
78  both MS link.exe and GNU ld. (`D134140 <https://reviews.llvm.org/D134140>`_)
79
80MinGW Improvements
81------------------
82
83* The lld-specific options ``--guard-cf``, ``--no-guard-cf``,
84  ``--guard-longjmp`` and ``--no-guard-longjmp`` has been added to allow
85  enabling Control Flow Guard and long jump hardening. These options are
86  disabled by default, but enabling ``--guard-cf`` will also enable
87  ``--guard-longjmp`` unless ``--no-guard-longjmp`` is also specified.
88  ``--guard-longjmp`` depends on ``--guard-cf`` and cannot be used by itself.
89  Note that these features require the ``_load_config_used`` symbol to contain
90  the load config directory and be filled with the required symbols.
91  (`D132808 <https://reviews.llvm.org/D132808>`_)
92
93* Pick up libraries named ``<name>.lib`` when linked with ``-l<name>``, even
94  if ``-static`` has been specified. This fixes conformance to what
95  GNU ld does. (`D135651 <https://reviews.llvm.org/D135651>`_)
96
97* Unwinding in Rust code on i386 in MinGW builds has been fixed, by avoiding
98  to leave out the ``rust_eh_personality`` symbol.
99  (`D136879 <https://reviews.llvm.org/D136879>`_)
100
101MachO Improvements
102------------------
103
104WebAssembly Improvements
105------------------------
106
107