xref: /freebsd/contrib/llvm-project/lld/docs/ReleaseNotes.rst (revision 0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583)
11fd87a68SDimitry Andric===========================
21fd87a68SDimitry Andriclld |release| Release Notes
31fd87a68SDimitry Andric===========================
40b57cec5SDimitry Andric
50b57cec5SDimitry Andric.. contents::
60b57cec5SDimitry Andric    :local:
70b57cec5SDimitry Andric
8bdd1243dSDimitry Andric.. only:: PreRelease
9bdd1243dSDimitry Andric
10bdd1243dSDimitry Andric  .. warning::
11bdd1243dSDimitry Andric     These are in-progress notes for the upcoming LLVM |release| release.
12bdd1243dSDimitry Andric     Release notes for previous releases can be found on
13bdd1243dSDimitry Andric     `the Download Page <https://releases.llvm.org/download.html>`_.
14bdd1243dSDimitry Andric
150b57cec5SDimitry AndricIntroduction
160b57cec5SDimitry Andric============
170b57cec5SDimitry Andric
181fd87a68SDimitry AndricThis document contains the release notes for the lld linker, release |release|.
1985868e8aSDimitry AndricHere we describe the status of lld, including major improvements
2085868e8aSDimitry Andricfrom the previous release. All lld releases may be downloaded
2185868e8aSDimitry Andricfrom the `LLVM releases web site <https://llvm.org/releases/>`_.
220b57cec5SDimitry Andric
230b57cec5SDimitry AndricNon-comprehensive list of changes in this release
240b57cec5SDimitry Andric=================================================
250b57cec5SDimitry Andric
260b57cec5SDimitry AndricELF Improvements
270b57cec5SDimitry Andric----------------
280b57cec5SDimitry Andric
29*0fca6ea1SDimitry Andric* ``EI_OSABI`` in the output is now inferred from input object files.
30*0fca6ea1SDimitry Andric  (`#97144 <https://github.com/llvm/llvm-project/pull/97144>`_)
31*0fca6ea1SDimitry Andric* ``--compress-sections <section-glib>={none,zlib,zstd}[:level]`` is added to compress
32*0fca6ea1SDimitry Andric  matched output sections without the ``SHF_ALLOC`` flag.
33*0fca6ea1SDimitry Andric  (`#84855 <https://github.com/llvm/llvm-project/pull/84855>`_)
34*0fca6ea1SDimitry Andric  (`#90567 <https://github.com/llvm/llvm-project/pull/90567>`_)
35*0fca6ea1SDimitry Andric* The default compression level for zlib is now independent of linker
36*0fca6ea1SDimitry Andric  optimization level (``Z_BEST_SPEED``).
37*0fca6ea1SDimitry Andric* zstd compression parallelism no longer requires ``ZSTD_MULITHREAD`` build.
38*0fca6ea1SDimitry Andric* ``GNU_PROPERTY_AARCH64_FEATURE_PAUTH`` notes, ``R_AARCH64_AUTH_ABS64`` and
39*0fca6ea1SDimitry Andric  ``R_AARCH64_AUTH_RELATIVE`` relocations are now supported.
40*0fca6ea1SDimitry Andric  (`#72714 <https://github.com/llvm/llvm-project/pull/72714>`_)
41*0fca6ea1SDimitry Andric* ``--no-allow-shlib-undefined`` now rejects non-exported definitions in the
42*0fca6ea1SDimitry Andric  ``def-hidden.so ref.so`` case.
43*0fca6ea1SDimitry Andric  (`#86777 <https://github.com/llvm/llvm-project/issues/86777>`_)
44*0fca6ea1SDimitry Andric* ``--debug-names`` is added to create a merged ``.debug_names`` index
45*0fca6ea1SDimitry Andric  from input ``.debug_names`` sections. Type units are not handled yet.
46*0fca6ea1SDimitry Andric  (`#86508 <https://github.com/llvm/llvm-project/pull/86508>`_)
47*0fca6ea1SDimitry Andric* ``--enable-non-contiguous-regions`` option allows automatically packing input
48*0fca6ea1SDimitry Andric  sections into memory regions by automatically spilling to later matches if a
49*0fca6ea1SDimitry Andric  region would overflow. This reduces the toil of manually packing regions
50*0fca6ea1SDimitry Andric  (typical for embedded). It also makes full LTO feasible in such cases, since
51*0fca6ea1SDimitry Andric  IR merging currently prevents the linker script from referring to input
52*0fca6ea1SDimitry Andric  files. (`#90007 <https://github.com/llvm/llvm-project/pull/90007>`_)
53*0fca6ea1SDimitry Andric* ``--default-script`/``-dT`` is implemented to specify a default script that is processed
54*0fca6ea1SDimitry Andric  if ``--script``/``-T`` is not specified.
55*0fca6ea1SDimitry Andric  (`#89327 <https://github.com/llvm/llvm-project/pull/89327>`_)
56*0fca6ea1SDimitry Andric* ``--force-group-allocation`` is implemented to discard ``SHT_GROUP`` sections
57*0fca6ea1SDimitry Andric  and combine relocation sections if their relocated section group members are
58*0fca6ea1SDimitry Andric  placed to the same output section.
59*0fca6ea1SDimitry Andric  (`#94704 <https://github.com/llvm/llvm-project/pull/94704>`_)
60*0fca6ea1SDimitry Andric* ``--build-id`` now defaults to generating a 20-byte digest ("sha1") instead
61*0fca6ea1SDimitry Andric  of 8-byte ("fast"). This improves compatibility with RPM packaging tools.
62*0fca6ea1SDimitry Andric  (`#93943 <https://github.com/llvm/llvm-project/pull/93943>`_)
63*0fca6ea1SDimitry Andric* ``-z lrodata-after-bss`` is implemented to place ``.lrodata`` after ``.bss``.
64*0fca6ea1SDimitry Andric  (`#81224 <https://github.com/llvm/llvm-project/pull/81224>`_)
65*0fca6ea1SDimitry Andric* ``--export-dynamic`` no longer creates dynamic sections for ``-no-pie`` static linking.
66*0fca6ea1SDimitry Andric* ``--lto-emit-asm`` is now added as the canonical spelling of ``--plugin-opt=emit-llvm``.
67*0fca6ea1SDimitry Andric* ``--lto-emit-llvm`` now uses the pre-codegen module.
68*0fca6ea1SDimitry Andric  (`#97480 <https://github.com/llvm/llvm-project/pull/97480>`_)
69*0fca6ea1SDimitry Andric* When AArch64 PAuth is enabled, ``-z pack-relative-relocs`` now encodes ``R_AARCH64_AUTH_RELATIVE`` relocations in ``.rela.auth.dyn``.
70*0fca6ea1SDimitry Andric  (`#96496 <https://github.com/llvm/llvm-project/pull/96496>`_)
71*0fca6ea1SDimitry Andric* ``-z gcs`` and ``-z gcs-report`` are now supported for AArch64 Guarded Control Stack extension.
72*0fca6ea1SDimitry Andric* ``-r`` now forces ``-Bstatic``.
73*0fca6ea1SDimitry Andric* Thumb2 PLT is now supported for Cortex-M processors.
74*0fca6ea1SDimitry Andric  (`#93644 <https://github.com/llvm/llvm-project/pull/93644>`_)
75*0fca6ea1SDimitry Andric* ``DW_EH_sdata4`` of addresses larger than 0x80000000 is now supported for MIPS32.
76*0fca6ea1SDimitry Andric  (`#92438 <https://github.com/llvm/llvm-project/pull/92438>`_)
77*0fca6ea1SDimitry Andric* Certain unknown section types are rejected.
78*0fca6ea1SDimitry Andric  (`#85173 <https://github.com/llvm/llvm-project/pull/85173>`_)
79*0fca6ea1SDimitry Andric* ``PROVIDE(lhs = rhs) PROVIDE(rhs = ...)``, ``lhs`` is now defined only if ``rhs`` is needed.
80*0fca6ea1SDimitry Andric  (`#74771 <https://github.com/llvm/llvm-project/issues/74771>`_)
81*0fca6ea1SDimitry Andric  (`#87530 <https://github.com/llvm/llvm-project/pull/87530>`_)
82*0fca6ea1SDimitry Andric* ``OUTPUT_FORMAT(binary)`` is now supported.
83*0fca6ea1SDimitry Andric  (`#98837 <https://github.com/llvm/llvm-project/pull/98837>`_)
84*0fca6ea1SDimitry Andric* ``NOCROSSREFS`` and ``NOCRFOSSREFS_TO`` commands now supported to prohibit
85*0fca6ea1SDimitry Andric  cross references between certain output sections.
86*0fca6ea1SDimitry Andric  (`#98773 <https://github.com/llvm/llvm-project/pull/98773>`_)
87*0fca6ea1SDimitry Andric* Orphan placement is refined to prefer the last similar section when its rank <= orphan's rank.
88*0fca6ea1SDimitry Andric  (`#94099 <https://github.com/llvm/llvm-project/pull/94099>`_)
89*0fca6ea1SDimitry Andric  Non-alloc orphan sections are now placed at the end.
90*0fca6ea1SDimitry Andric  (`#94519 <https://github.com/llvm/llvm-project/pull/94519>`_)
91*0fca6ea1SDimitry Andric* R_X86_64_REX_GOTPCRELX of the addq form is no longer incorrectly optimized when the address is larger than 0x80000000.
9213138422SDimitry Andric
938c27c554SDimitry AndricBreaking changes
948c27c554SDimitry Andric----------------
9513138422SDimitry Andric
965ffd83dbSDimitry AndricCOFF Improvements
975ffd83dbSDimitry Andric-----------------
985ffd83dbSDimitry Andric
990b57cec5SDimitry AndricMinGW Improvements
1000b57cec5SDimitry Andric------------------
1010b57cec5SDimitry Andric
10281ad6265SDimitry AndricMachO Improvements
10381ad6265SDimitry Andric------------------
104e8d8bef9SDimitry Andric
105*0fca6ea1SDimitry Andric* Chained fixups are now enabled by default when targeting macOS 13.0,
106*0fca6ea1SDimitry Andric  iOS 13.4, tvOS 14.0, watchOS 7.0, and visionOS 1.0 or later.
107*0fca6ea1SDimitry Andric  They can be disabled with the `-no_fixup_chains` flag.
108*0fca6ea1SDimitry Andric  (`#99255 <https://github.com/llvm/llvm-project/pull/99255>`_)
109*0fca6ea1SDimitry Andric
110e8d8bef9SDimitry AndricWebAssembly Improvements
111e8d8bef9SDimitry Andric------------------------
112e8d8bef9SDimitry Andric
11306c3fb27SDimitry AndricFixes
11406c3fb27SDimitry Andric#####
115