Skip to content

Commit 4bc0d50

Browse files
committed
Update ReleaseNotes for lld 9.0.
llvm-svn: 371034
1 parent fa0bc00 commit 4bc0d50

File tree

1 file changed

+170
-25
lines changed

1 file changed

+170
-25
lines changed

lld/docs/ReleaseNotes.rst

Lines changed: 170 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ lld 9.0.0 Release Notes
88
Introduction
99
============
1010

11-
This document contains the release notes for the lld linker, release 9.0.0.
12-
Here we describe the status of lld, including major improvements
13-
from the previous release. All lld releases may be downloaded
14-
from the `LLVM releases web site <https://llvm.org/releases/>`_.
11+
lld is a high-performance linker that supports ELF (Unix), COFF
12+
(Windows), Mach-O (macOS), MinGW and WebAssembly. lld is
13+
command-line-compatible with GNU linkers and Microsoft link.exe and is
14+
significantly faster than the system default linkers.
15+
16+
lld 9.0 has lots of feature improvements and bug fixes.
1517

1618
Non-comprehensive list of changes in this release
1719
=================================================
@@ -22,52 +24,189 @@ ELF Improvements
2224
* ld.lld now has typo suggestions for flags:
2325
``$ ld.lld --call-shared`` now prints
2426
``unknown argument '--call-shared', did you mean '--call_shared'``.
27+
(`r361518 <https://reviews.llvm.org/rL361518>`_)
28+
29+
* ``--allow-shlib-undefined`` and ``--no-allow-shlib-undefined``
30+
options are added. ``--no-allow-shlib-undefined`` is the default for
31+
executables.
32+
(`r352826 <https://reviews.llvm.org/rL352826>`_)
33+
34+
* ``-nmagic`` and ``-omagic`` options are fully supported.
35+
(`r360593 <https://reviews.llvm.org/rL360593>`_)
36+
37+
* Segment layout has changed. PT_GNU_RELRO, which was previously
38+
placed in the middle of readable/writable PT_LOAD segments, is now
39+
placed at the beginning of them. This change permits lld-produced
40+
ELF files to be read correctly by GNU strip older than 2.31, which
41+
has a bug to discard a PT_GNU_RELRO in the former layout.
42+
43+
* ``-z common-page-size`` is supported.
44+
(`r360593 <https://reviews.llvm.org/rL360593>`_)
45+
46+
* Diagnostics messages have improved. A new flag ``--vs-diagnostics``
47+
alters the format of diagnostic output to enable source hyperlinks
48+
in Microsoft Visual Studio IDE.
49+
50+
* Linker script compatibility with GNU BFD linker has generally improved.
51+
52+
* The clang ``--dependent-library`` form of autolinking is supported.
53+
54+
This feature is added to implement the Windows-style autolinking for
55+
Unix. On Unix, in order to use a library, you usually have to
56+
include a header file provided by the library and then explicitly
57+
link the library with the linker ``-l`` option. On Windows, header
58+
files usually contain pragmas that list needed libraries. Compilers
59+
copies that information to object files, so that linkers can
60+
automatically link needed libraries. ``--dependent-library`` is
61+
added for implementing that Windows semantics on Unix.
62+
(`r360984 <https://reviews.llvm.org/rL360984>`_)
63+
64+
* AArch64 BTI and PAC are supported.
65+
(`r362793 <https://reviews.llvm.org/rL362793>`_)
2566

2667
* lld now supports replacing ``JAL`` with ``JALX`` instructions in case
27-
of MIPS - microMIPS cross-mode jumps.
68+
of MIPS ↔ microMIPS cross-mode jumps.
69+
(`r354311 <https://reviews.llvm.org/rL354311>`_)
2870

2971
* lld now creates LA25 thunks for MIPS R6 code.
72+
(`r354312 <https://reviews.llvm.org/rL354312>`_)
3073

3174
* Put MIPS-specific .reginfo, .MIPS.options, and .MIPS.abiflags sections
3275
into corresponding PT_MIPS_REGINFO, PT_MIPS_OPTIONS, and PT_MIPS_ABIFLAGS
3376
segments.
3477

78+
* The quality of RISC-V and PowerPC ports have greatly improved. Many
79+
applications can now be linked by lld. PowerPC64 is now almost
80+
production ready.
81+
82+
* The Linux kernel for arm32_7, arm64, ppc64le and x86_64 can now be
83+
linked by lld.
84+
85+
* x86-64 TLSDESC is supported.
86+
(`r361911 <https://reviews.llvm.org/rL361911>`_,
87+
`r362078 <https://reviews.llvm.org/rL362078>`_)
88+
89+
* DF_STATIC_TLS flag is set for i386 and x86-64 when needed.
90+
(`r353293 <https://reviews.llvm.org/rL353293>`_,
91+
`r353378 <https://reviews.llvm.org/rL353378>`_)
92+
93+
* The experimental partitioning feature is added to allow a program to
94+
be split into multiple pieces.
95+
96+
The feature allows you semi-automatically split a single program
97+
into multiple ELF files called "partitions". Since all partitions
98+
share the same memory address space and don't use PLT/GOT, split
99+
programs run as fast as regular programs.
100+
101+
With the mechanism, you can start a program only with a "main"
102+
partition and load remaining partitions on-demand. For example, you
103+
can split a web browser into a main partition and a PDF reader
104+
sub-partition and load the PDF reader partition only when a user
105+
tries to open a PDF file.
106+
107+
See https://lld.llvm.org/Partitions.html for more information.
108+
109+
* If "-" is given as an output filename, lld write the final result
110+
to the standard output. Previously, it created a file "-" in the
111+
current directory.
112+
(`r351852 <https://reviews.llvm.org/rL351852>`_)
113+
114+
* ``-z ifunc-noplt`` option is added to reduce IFunc function call
115+
overhead in a freestanding environment such as the OS kernel.
116+
117+
Functions resolved by the IFunc mechanism are usually dispatched via
118+
PLT and thus slower than regular functions because of the cost of
119+
indirection. With ``-z ifunc-noplt``, you can eliminate it by doing
120+
text relocations at load-time. You need a special loader to utilize
121+
this feature. This feature is added for the FreeBSD kernel but can
122+
be used by any operating systems.
123+
(`r360685 <https://reviews.llvm.org/rL360685>`_)
124+
125+
* ``--undefined-glob`` option is added. The new option is an extension
126+
to ``--undefined`` to take a glob pattern instead of a single symbol
127+
name.
128+
(`r363396 <https://reviews.llvm.org/rL363396>`_)
129+
130+
35131
COFF Improvements
36132
-----------------
37133

38134
* Like the ELF driver, lld-link now has typo suggestions for flags.
135+
(`r361518 <https://reviews.llvm.org/rL361518>`_)
39136

40-
* lld-link now correctly reports duplicate symbol errors for obj files
41-
that were compiled with /Gy.
137+
* lld-link now correctly reports duplicate symbol errors for object
138+
files that were compiled with ``/Gy``.
139+
(`r352590 <https://reviews.llvm.org/rL352590>`_)
42140

43-
* lld-link now correctly reports duplicate symbol errors when several res
44-
input files define resources with the same type, name, and language.
45-
This can be demoted to a warning using ``/force:multipleres``.
141+
* lld-link now correctly reports duplicate symbol errors when several
142+
resource (.res) input files define resources with the same type,
143+
name and language. This can be demoted to a warning using
144+
``/force:multipleres``.
145+
(`r359829 <https://reviews.llvm.org/rL359829>`_)
46146

47-
* lld-link now rejects more than one resource obj input files, matching
48-
link.exe. Previously, lld-link would silently ignore all but one.
49-
If you hit this: Don't pass resource obj files to the linker, instead pass
50-
res files to the linker directly. Don't put res files in static libraries,
51-
pass them on the command line.
147+
* lld-link now rejects more than one resource object input files,
148+
matching link.exe. Previously, lld-link would silently ignore all
149+
but one. If you hit this: Don't pass resource object files to the
150+
linker, instead pass res files to the linker directly. Don't put
151+
resource files in static libraries, pass them on the command line.
152+
(`r359749 <https://reviews.llvm.org/rL359749>`_)
52153

53154
* Having more than two ``/natvis:`` now works correctly; it used to not
54155
work for larger binaries before.
156+
(`r327895 <https://reviews.llvm.org/rL327895>`_)
55157

56158
* Undefined symbols are now printed only in demangled form. Pass
57159
``/demangle:no`` to see raw symbol names instead.
58-
59-
* The following flags have been added: ``/functionpadmin``, ``/swaprun:``,
60-
``/threads:no``
160+
(`r355878 <https://reviews.llvm.org/rL355878>`_)
61161

62162
* Several speed and memory usage improvements.
63163

64-
* Range extension thunks are now created for ARM64, if needed
164+
* Range extension thunks are now created for ARM64, if needed.
65165

66166
* lld-link now supports resource object files created by GNU windres and
67-
MS cvtres, not only llvm-cvtres
167+
MS cvtres, not only llvm-cvtres.
68168

69169
* The generated thunks for delayimports now share the majority of code
70-
among thunks, significantly reducing the overhead of using delayimport
170+
among thunks, significantly reducing the overhead of using delayimport.
171+
(`r365823 <https://reviews.llvm.org/rL365823>`_)
172+
173+
* ``IMAGE_REL_ARM{,64}_REL32`` relocations are supported.
174+
(`r352325 <https://reviews.llvm.org/rL352325>`_)
175+
176+
* Range extension thunks for AArch64 are now supported, so lld can
177+
create large executables for Windows/ARM64.
178+
(`r352929 <https://reviews.llvm.org/rL352929>`_)
179+
180+
* The following flags have been added:
181+
``/functionpadmin`` (`r354716 <https://reviews.llvm.org/rL354716>`_),
182+
``/swaprun:`` (`r359192 <https://reviews.llvm.org/rL359192>`_),
183+
``/threads:no`` (`r355029 <https://reviews.llvm.org/rL355029>`_),
184+
``/filealign`` (`r361634 <https://reviews.llvm.org/rL361634>`_)
185+
186+
WebAssembly Improvements
187+
------------------------
188+
189+
* Imports from custom module names are supported.
190+
(`r352828 <https://reviews.llvm.org/rL352828>`_)
191+
192+
* Symbols that are in llvm.used are no exported by default.
193+
(`r353364 <https://reviews.llvm.org/rL353364>`_)
194+
195+
* Initial support for PIC and dynamic linking has landed.
196+
(`r357022 <https://reviews.llvm.org/rL357022>`_)
197+
198+
* wasm-ld now add ``__start_``/``__stop_`` symbols for data sections.
199+
(`r361236 <https://reviews.llvm.org/rL361236>`_)
200+
201+
* wasm-ld now doesn't report an error on archives without a symbol index.
202+
(`r364338 <https://reviews.llvm.org/rL364338>`_)
203+
204+
* The following flags have been added:
205+
``--emit-relocs`` (`r361635 <https://reviews.llvm.org/rL361635>`_),
206+
``--wrap`` (`r361639 <https://reviews.llvm.org/rL361639>`_),
207+
``--trace`` and ``--trace-symbol``
208+
(`r353264 <https://reviews.llvm.org/rL353264>`_).
209+
71210

72211
MinGW Improvements
73212
------------------
@@ -77,12 +216,18 @@ MinGW Improvements
77216
DWARF exception handling with libgcc and gcc's crtend.o.
78217

79218
* lld now also handles DWARF unwind info generated by GCC, when linking
80-
with libgcc
81-
82-
* Many more GNU ld options are now supported, which e.g. allows the lld
83-
MinGW frontend to be called by GCC
219+
with libgcc.
84220

85221
* PDB output can be requested without manually specifying the PDB file
86222
name, with the new option ``-pdb=`` with an empty value to the option.
87223
(The old existing syntax ``-pdb <filename>`` was more cumbersome to use
88224
with an empty parameter value.)
225+
226+
* ``--no-insert-timestamp`` option is added as an alias to ``/timestamp:0``.
227+
(`r353145 <https://reviews.llvm.org/rL353145>`_)
228+
229+
* Many more GNU ld options are now supported, which e.g. allows the lld
230+
MinGW frontend to be called by GCC.
231+
232+
* The following options are added: ``--exclude-all-symbols``,
233+
``--appcontainer``, ``--emit-relocs``, ``--wrap``, ``--undefined``

0 commit comments

Comments
 (0)