]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lld/docs/ReleaseNotes.rst
Merge llvm, clang, lld, lldb, compiler-rt and libc++ release_70 branch
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lld / docs / ReleaseNotes.rst
1 =======================
2 LLD 7.0.0 Release Notes
3 =======================
4
5 .. contents::
6     :local:
7
8 Introduction
9 ============
10
11 lld is a high-performance linker that supports ELF (Unix), COFF (Windows),
12 Mach-O (macOS), MinGW and WebAssembly. lld is command-line-compatible with GNU
13 linkers and Microsoft link.exe, and is significantly faster than these system
14 default linkers.
15
16 lld 7 for ELF and COFF are production-ready. lld/ELF can build the entire
17 FreeBSD/AMD64 and will be the default linker of the next version of the
18 operating system. lld/COFF is being used to build popular large programs such as
19 the Chrome web browser. Mach-O, MinGW and WebAssembly supports are still
20 experimental.
21
22 Non-comprehensive list of changes in this release
23 =================================================
24
25 ELF Improvements
26 ----------------
27
28 * Fixed a lot of long-tail compatibility issues with GNU linkers.
29
30 * Added ``-z retpolineplt`` to emit a PLT entry that doesn't contain an indirect
31   jump instruction to mitigate Spectre v2 vulnerability.
32
33 * Added experimental support for `SHT_RELR sections
34   <https://groups.google.com/forum/#!topic/generic-abi/bX460iggiKg>`_ to create a
35   compact dynamic relocation table.
36
37 * Added support for `split stacks <https://gcc.gnu.org/wiki/SplitStacks>`_.
38
39 * Added support for address significance table (section with type
40   SHT_LLVM_ADDRSIG) to improve Identical Code Folding (ICF). Combined with the
41   ``-faddrsig`` compiler option added to Clang 7, lld's ``--icf=all`` can now
42   safely merge functions and data to generate smaller outputs than before.
43
44 * Improved ``--gdb-index`` so that it is faster (`r336790
45   <https://reviews.llvm.org/rL336790>`_) and uses less memory (`r336672
46   <https://reviews.llvm.org/rL336672>`_).
47
48 * Reduced memory usage of ``--compress-debug-sections`` (`r338913
49   <https://reviews.llvm.org/rL338913>`_).
50
51 * Added linker script OVERLAY support (`r335714 <https://reviews.llvm.org/rL335714>`_).
52
53 * Added ``--warn-backref`` to make it easy to identify command line option order
54   that doesn't work with GNU linkers (`r329636 <https://reviews.llvm.org/rL329636>`_)
55
56 * Added ld.lld.1 man page (`r324512 <https://reviews.llvm.org/rL324512>`_).
57
58 * Added support for multi-GOT.
59
60 * Added support for MIPS position-independent executable (PIE).
61
62 * Fixed MIPS TLS GOT entries for local symbols in shared libraries.
63
64 * Fixed calculation of MIPS GP relative relocations in case of relocatable
65   output.
66
67 * Added support for PPCv2 ABI.
68
69 * Removed an incomplete support of PPCv1 ABI.
70
71 * Added support for Qualcomm Hexagon ISA.
72
73 * Added the following flags: ``--apply-dynamic-relocs``, ``--check-sections``,
74   ``--cref``, ``--just-symbols``, ``--keep-unique``,
75   ``--no-allow-multiple-definition``, ``--no-apply-dynamic-relocs``,
76   ``--no-check-sections``, ``--no-gnu-unique, ``--no-pic-executable``,
77   ``--no-undefined-version``, ``--no-warn-common``, ``--pack-dyn-relocs=relr``,
78   ``--pop-state``, ``--print-icf-sections``, ``--push-state``,
79   ``--thinlto-index-only``, ``--thinlto-object-suffix-replace``,
80   ``--thinlto-prefix-replace``, ``--warn-backref``, ``-z combreloc``, ``-z
81   copyreloc``, ``-z initfirst``, ``-z keep-text-section-prefix``, ``-z lazy``,
82   ``-z noexecstack``, ``-z relro``, ``-z retpolineplt``, ``-z text``
83
84 COFF Improvements
85 -----------------
86
87 * Improved correctness of exporting mangled stdcall symbols.
88
89 * Completed support for ARM64 relocations.
90
91 * Added support for outputting PDB debug info for MinGW targets.
92
93 * Improved compatibility of output binaries with GNU binutils objcopy/strip.
94
95 * Sped up PDB file creation.
96
97 * Changed section layout to improve compatibility with link.exe.
98
99 * Added the following flags: ``--color-diagnostics={always,never,auto}``,
100   ``--no-color-diagnostics``, ``/brepro``, ``/debug:full``, ``/debug:ghash``,
101   ``/guard:cf``, ``/guard:longjmp``, ``/guard:nolongjmp``, ``/integritycheck``,
102   ``/order``, ``/pdbsourcepath``, ``/timestamp``