diff options
Diffstat (limited to 'lld/docs')
-rw-r--r-- | lld/docs/DTLTO.rst | 37 | ||||
-rw-r--r-- | lld/docs/ReleaseNotes.rst | 61 | ||||
-rw-r--r-- | lld/docs/ld.lld.1 | 18 |
3 files changed, 53 insertions, 63 deletions
diff --git a/lld/docs/DTLTO.rst b/lld/docs/DTLTO.rst index 985decf..54fcc03 100644 --- a/lld/docs/DTLTO.rst +++ b/lld/docs/DTLTO.rst @@ -7,8 +7,7 @@ during the traditional link step. The implementation is documented here: https://llvm.org/docs/DTLTO.html. -Currently, DTLTO is only supported in ELF LLD. Support will be added to other -LLD flavours in the future. +Currently, DTLTO is only supported in ELF and COFF LLD. ELF LLD ------- @@ -40,3 +39,37 @@ The command-line interface is as follows: Some LLD LTO options (e.g., ``--lto-sample-profile=<file>``) are supported. Currently, other options are silently accepted but do not have the intended effect. Support for such options will be expanded in the future. + +COFF LLD +-------- + +The command-line interface is as follows: + +- ``/thinlto-distributor:<path>`` + Specifies the file to execute as the distributor process. If specified, + ThinLTO backend compilations will be distributed. + +- ``/thinlto-remote-compiler:<path>`` + Specifies the path to the compiler that the distributor process will use for + backend compilations. The compiler invoked must match the version of LLD. + +- ``/thinlto-distributor-arg:<arg>`` + Specifies ``<arg>`` on the command line when invoking the distributor. + Can be specified multiple times. + +- ``/thinlto-remote-compiler-arg:<arg>`` + Appends ``<arg>`` to the remote compiler's command line. + Can be specified multiple times. + + Options that introduce extra input/output files may cause miscompilation if + the distribution system does not automatically handle pushing/fetching them to + remote nodes. In such cases, configure the distributor - possibly using + ``/thinlto-distributor-arg:`` - to manage these dependencies. See the + distributor documentation for details. + +Some LLD LTO options (e.g., ``/lto-sample-profile:<file>``) are supported. +Currently, other options are silently accepted but do not have the intended +effect. Support for such options could be expanded in the future. + +Currently, there is no DTLTO command line interface supplied for ``clang-cl``, +as users are expected to invoke LLD directly.
\ No newline at end of file diff --git a/lld/docs/ReleaseNotes.rst b/lld/docs/ReleaseNotes.rst index 863b201..6f60efd 100644 --- a/lld/docs/ReleaseNotes.rst +++ b/lld/docs/ReleaseNotes.rst @@ -25,70 +25,9 @@ Non-comprehensive list of changes in this release ELF Improvements ---------------- -* Added ``-z dynamic-undefined-weak`` to make undefined weak symbols dynamic - when the dynamic symbol table is present. - (`#143831 <https://github.com/llvm/llvm-project/pull/143831>`_) -* For ``-z undefs`` (default for ``-shared``), relocations referencing undefined - strong symbols now behave like relocations referencing undefined weak symbols. -* ``--why-live=<glob>`` prints for each symbol matching ``<glob>`` a chain of - items that kept it live during garbage collection. This is inspired by the - Mach-O LLD feature of the same name. -* ``--thinlto-distributor=`` and ``--thinlto-remote-compiler=`` options are - added to support Integrated Distributed ThinLTO. - (`#142757 <https://github.com/llvm/llvm-project/pull/142757>`_) -* Linker script ``OVERLAY`` descriptions now support virtual memory regions - (e.g. ``>region``) and ``NOCROSSREFS``. -* When the last ``PT_LOAD`` segment is executable and includes BSS sections, - its ``p_memsz`` member is now correct. - (`#139207 <https://github.com/llvm/llvm-project/pull/139207>`_) -* Spurious ``ASSERT`` errors before the layout converges are now fixed. - -* For ARM and AArch64, ``--xosegment`` and ``--no-xosegment`` control whether - to place executable-only and readable-executable sections in the same - segment. The default option is ``--no-xosegment``. - (`#132412 <https://github.com/llvm/llvm-project/pull/132412>`_) -* For AArch64, added support for the ``SHF_AARCH64_PURECODE`` section flag, - which indicates that the section only contains program code and no data. - An output section will only have this flag set if all input sections also - have it set. (`#125689 <https://github.com/llvm/llvm-project/pull/125689>`_, - `#134798 <https://github.com/llvm/llvm-project/pull/134798>`_) -* For AArch64 and ARM, added ``-zexecute-only-report``, which checks for - missing ``SHF_AARCH64_PURECODE`` and ``SHF_ARM_PURECODE`` section flags - on executable sections. - (`#128883 <https://github.com/llvm/llvm-project/pull/128883>`_) -* For AArch64, ``-z nopac-plt`` has been added. -* For AArch64 and X86_64, added ``--branch-to-branch``, which rewrites branches - that point to another branch instruction to instead branch directly to the - target of the second instruction. Enabled by default at ``-O2``. -* For AArch64, added support for ``-zgcs-report-dynamic``, enabling checks for - GNU GCS Attribute Flags in Dynamic Objects when GCS is enabled. Inherits value - from ``-zgcs-report`` (capped at ``warning`` level) unless user-defined, - ensuring compatibility with GNU ld linker. -* 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. -* For LoongArch, the initial-exec to local-exec TLS optimization has been implemented. -* For LoongArch, several relaxation optimizations are supported, including relaxation for - ``R_LARCH_PCALA_HI20/LO12`` and ``R_LARCH_GOT_PC_HI20/LO12`` relocations, instruction - relaxation for ``R_LARCH_CALL36``, TLS local-exec (``LE``)/global dynamic (``GD``)/ - local dynamic (``LD``) model relaxation, and TLSDESC code sequence relaxation. -* For RISCV, an oscillation bug due to call relaxation is now fixed. - (`#142899 <https://github.com/llvm/llvm-project/pull/142899>`_) -* For x86-64, the ``.ltext`` section is now placed before ``.rodata``. - Breaking changes ---------------- -* Executable-only and readable-executable sections are now allowed to be placed - in the same segment by default. Pass ``--xosegment`` to lld in order to get - the old behavior back. - -* When using ``--no-pie`` without a ``SECTIONS`` command, the linker uses the - target's default image base. If ``-Ttext=`` or ``--section-start`` specifies - an output section address below this base, there will now be an error. - ``--image-base`` can be set at a lower address to fix the error. - (`#140187 <https://github.com/llvm/llvm-project/pull/140187>`_) COFF Improvements ----------------- diff --git a/lld/docs/ld.lld.1 b/lld/docs/ld.lld.1 index 7edc522..1835879 100644 --- a/lld/docs/ld.lld.1 +++ b/lld/docs/ld.lld.1 @@ -798,6 +798,13 @@ Specify how to report the missing GNU_PROPERTY_X86_FEATURE_1_IBT or GNU_PROPERTY .Cm none is the default, linker will not report the missing property otherwise will be reported as a warning or an error. .Pp +.It Cm gcs-report Ns = Ns Ar [none|warning|error] +Specify how to report missing +.Cm GNU_PROPERTY_AARCH64_FEATURE_1_GCS +property. GNU_PROPERTY_AARCH64_FEATURE_1_GCS indicates object file support for the Guarded Control Stack security feature. +.Cm none +is the default, linker will not report the missing property otherwise will be reported as a warning or an error. +.Pp .It Cm dynamic-undefined-weak Make undefined weak symbols dynamic when the dynamic symbol table is present, if they are referenced from relocatable object files and not forced local by symbol visibility or versioning. Do not make them dynamic when @@ -953,6 +960,17 @@ disallows overlap. .It Cm shstk x86 only, use shadow stack. .Pp +.It Cm gcs Ns = Ns Ar [implicit|never|always] +Specifies how the +.Cm GNU_PROPERTY_AARCH64_FEATURE_1_GCS +bit is set in the output ELF file. When set, it indicates support for the Guarded Control Stack (GCS) security feature. +.Cm implicit +(default) The GCS feature bit is set if all input relocatable files have a .note.gnu.property section containing the GNU_PROPERTY_AARCH64_FEATURE_1_GCS bit. +.Cm never +clears the GCS feature bit regardless of input relocatable files' markings. +.Cm always +sets the GCS feature bit regardless of input object markings. +.Pp .It Cm stack-size Ns = Ns Ar size Set the main thread's stack size to .Ar size . |