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*52418fc2SDimitry Andric* Experimental CREL relocations with explicit addends are now supported using the 30*52418fc2SDimitry Andric temporary section type code 0x40000020 (``clang -c -Wa,--crel,--allow-experimental-crel``). 31*52418fc2SDimitry Andric LLVM will change the code and break compatibility (Clang and lld of different 32*52418fc2SDimitry Andric versions are not guaranteed to cooperate, unlike other features). CREL with 33*52418fc2SDimitry Andric implicit addends are not supported. 34*52418fc2SDimitry Andric (`#98115 <https://github.com/llvm/llvm-project/pull/98115>`_) 350fca6ea1SDimitry Andric* ``EI_OSABI`` in the output is now inferred from input object files. 360fca6ea1SDimitry Andric (`#97144 <https://github.com/llvm/llvm-project/pull/97144>`_) 370fca6ea1SDimitry Andric* ``--compress-sections <section-glib>={none,zlib,zstd}[:level]`` is added to compress 380fca6ea1SDimitry Andric matched output sections without the ``SHF_ALLOC`` flag. 390fca6ea1SDimitry Andric (`#84855 <https://github.com/llvm/llvm-project/pull/84855>`_) 400fca6ea1SDimitry Andric (`#90567 <https://github.com/llvm/llvm-project/pull/90567>`_) 410fca6ea1SDimitry Andric* The default compression level for zlib is now independent of linker 420fca6ea1SDimitry Andric optimization level (``Z_BEST_SPEED``). 430fca6ea1SDimitry Andric* zstd compression parallelism no longer requires ``ZSTD_MULITHREAD`` build. 440fca6ea1SDimitry Andric* ``GNU_PROPERTY_AARCH64_FEATURE_PAUTH`` notes, ``R_AARCH64_AUTH_ABS64`` and 450fca6ea1SDimitry Andric ``R_AARCH64_AUTH_RELATIVE`` relocations are now supported. 460fca6ea1SDimitry Andric (`#72714 <https://github.com/llvm/llvm-project/pull/72714>`_) 470fca6ea1SDimitry Andric* ``--no-allow-shlib-undefined`` now rejects non-exported definitions in the 480fca6ea1SDimitry Andric ``def-hidden.so ref.so`` case. 490fca6ea1SDimitry Andric (`#86777 <https://github.com/llvm/llvm-project/issues/86777>`_) 500fca6ea1SDimitry Andric* ``--debug-names`` is added to create a merged ``.debug_names`` index 510fca6ea1SDimitry Andric from input ``.debug_names`` sections. Type units are not handled yet. 520fca6ea1SDimitry Andric (`#86508 <https://github.com/llvm/llvm-project/pull/86508>`_) 530fca6ea1SDimitry Andric* ``--enable-non-contiguous-regions`` option allows automatically packing input 540fca6ea1SDimitry Andric sections into memory regions by automatically spilling to later matches if a 550fca6ea1SDimitry Andric region would overflow. This reduces the toil of manually packing regions 560fca6ea1SDimitry Andric (typical for embedded). It also makes full LTO feasible in such cases, since 570fca6ea1SDimitry Andric IR merging currently prevents the linker script from referring to input 580fca6ea1SDimitry Andric files. (`#90007 <https://github.com/llvm/llvm-project/pull/90007>`_) 590fca6ea1SDimitry Andric* ``--default-script`/``-dT`` is implemented to specify a default script that is processed 600fca6ea1SDimitry Andric if ``--script``/``-T`` is not specified. 610fca6ea1SDimitry Andric (`#89327 <https://github.com/llvm/llvm-project/pull/89327>`_) 620fca6ea1SDimitry Andric* ``--force-group-allocation`` is implemented to discard ``SHT_GROUP`` sections 630fca6ea1SDimitry Andric and combine relocation sections if their relocated section group members are 640fca6ea1SDimitry Andric placed to the same output section. 650fca6ea1SDimitry Andric (`#94704 <https://github.com/llvm/llvm-project/pull/94704>`_) 660fca6ea1SDimitry Andric* ``--build-id`` now defaults to generating a 20-byte digest ("sha1") instead 670fca6ea1SDimitry Andric of 8-byte ("fast"). This improves compatibility with RPM packaging tools. 680fca6ea1SDimitry Andric (`#93943 <https://github.com/llvm/llvm-project/pull/93943>`_) 690fca6ea1SDimitry Andric* ``-z lrodata-after-bss`` is implemented to place ``.lrodata`` after ``.bss``. 700fca6ea1SDimitry Andric (`#81224 <https://github.com/llvm/llvm-project/pull/81224>`_) 710fca6ea1SDimitry Andric* ``--export-dynamic`` no longer creates dynamic sections for ``-no-pie`` static linking. 720fca6ea1SDimitry Andric* ``--lto-emit-asm`` is now added as the canonical spelling of ``--plugin-opt=emit-llvm``. 730fca6ea1SDimitry Andric* ``--lto-emit-llvm`` now uses the pre-codegen module. 740fca6ea1SDimitry Andric (`#97480 <https://github.com/llvm/llvm-project/pull/97480>`_) 750fca6ea1SDimitry Andric* When AArch64 PAuth is enabled, ``-z pack-relative-relocs`` now encodes ``R_AARCH64_AUTH_RELATIVE`` relocations in ``.rela.auth.dyn``. 760fca6ea1SDimitry Andric (`#96496 <https://github.com/llvm/llvm-project/pull/96496>`_) 770fca6ea1SDimitry Andric* ``-z gcs`` and ``-z gcs-report`` are now supported for AArch64 Guarded Control Stack extension. 780fca6ea1SDimitry Andric* ``-r`` now forces ``-Bstatic``. 790fca6ea1SDimitry Andric* Thumb2 PLT is now supported for Cortex-M processors. 800fca6ea1SDimitry Andric (`#93644 <https://github.com/llvm/llvm-project/pull/93644>`_) 810fca6ea1SDimitry Andric* ``DW_EH_sdata4`` of addresses larger than 0x80000000 is now supported for MIPS32. 820fca6ea1SDimitry Andric (`#92438 <https://github.com/llvm/llvm-project/pull/92438>`_) 830fca6ea1SDimitry Andric* Certain unknown section types are rejected. 840fca6ea1SDimitry Andric (`#85173 <https://github.com/llvm/llvm-project/pull/85173>`_) 850fca6ea1SDimitry Andric* ``PROVIDE(lhs = rhs) PROVIDE(rhs = ...)``, ``lhs`` is now defined only if ``rhs`` is needed. 860fca6ea1SDimitry Andric (`#74771 <https://github.com/llvm/llvm-project/issues/74771>`_) 870fca6ea1SDimitry Andric (`#87530 <https://github.com/llvm/llvm-project/pull/87530>`_) 880fca6ea1SDimitry Andric* ``OUTPUT_FORMAT(binary)`` is now supported. 890fca6ea1SDimitry Andric (`#98837 <https://github.com/llvm/llvm-project/pull/98837>`_) 900fca6ea1SDimitry Andric* ``NOCROSSREFS`` and ``NOCRFOSSREFS_TO`` commands now supported to prohibit 910fca6ea1SDimitry Andric cross references between certain output sections. 920fca6ea1SDimitry Andric (`#98773 <https://github.com/llvm/llvm-project/pull/98773>`_) 930fca6ea1SDimitry Andric* Orphan placement is refined to prefer the last similar section when its rank <= orphan's rank. 940fca6ea1SDimitry Andric (`#94099 <https://github.com/llvm/llvm-project/pull/94099>`_) 950fca6ea1SDimitry Andric Non-alloc orphan sections are now placed at the end. 960fca6ea1SDimitry Andric (`#94519 <https://github.com/llvm/llvm-project/pull/94519>`_) 97*52418fc2SDimitry Andric* ``R_X86_64_REX_GOTPCRELX`` of the addq form is no longer incorrectly optimized when the address is larger than 0x80000000. 9813138422SDimitry Andric 998c27c554SDimitry AndricBreaking changes 1008c27c554SDimitry Andric---------------- 10113138422SDimitry Andric 1025ffd83dbSDimitry AndricCOFF Improvements 1035ffd83dbSDimitry Andric----------------- 1045ffd83dbSDimitry Andric 1050b57cec5SDimitry AndricMinGW Improvements 1060b57cec5SDimitry Andric------------------ 1070b57cec5SDimitry Andric 10881ad6265SDimitry AndricMachO Improvements 10981ad6265SDimitry Andric------------------ 110e8d8bef9SDimitry Andric 1110fca6ea1SDimitry Andric* Chained fixups are now enabled by default when targeting macOS 13.0, 1120fca6ea1SDimitry Andric iOS 13.4, tvOS 14.0, watchOS 7.0, and visionOS 1.0 or later. 1130fca6ea1SDimitry Andric They can be disabled with the `-no_fixup_chains` flag. 1140fca6ea1SDimitry Andric (`#99255 <https://github.com/llvm/llvm-project/pull/99255>`_) 1150fca6ea1SDimitry Andric 116e8d8bef9SDimitry AndricWebAssembly Improvements 117e8d8bef9SDimitry Andric------------------------ 118e8d8bef9SDimitry Andric 11906c3fb27SDimitry AndricFixes 12006c3fb27SDimitry Andric##### 121