]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lld/docs/WebAssembly.rst
Merge vendor lld/docs directory from r337145
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lld / docs / WebAssembly.rst
1 WebAssembly lld port
2 ====================
3
4 Note: The WebAssembly port is still a work in progress and is be lacking
5 certain features.
6
7 The WebAssembly version of lld takes WebAssembly binaries as inputs and produces
8 a WebAssembly binary as its output.  For the most part this port tried to mimic
9 the behaviour of traditional ELF linkers and specifically the ELF lld port.
10 Where possible that command line flags and the semantics should be the same.
11
12
13 Object file format
14 ------------------
15
16 The format the input object files that lld expects is specified as part of the
17 the WebAssembly tool conventions
18 https://github.com/WebAssembly/tool-conventions/blob/master/Linking.md.
19
20 This is object format that the llvm will produce when run with the
21 ``wasm32-unknown-unknown`` target.  To build llvm with WebAssembly support
22 currently requires enabling the experimental backed using
23 ``-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly``.
24
25
26 Missing features
27 ----------------
28
29 There are several key features that are not yet implement in the WebAssembly
30 ports:
31
32 - COMDAT support.  This means that support for C++ is still very limited.
33 - Function stripping.  Currently there is no support for ``--gc-sections`` so
34   functions and data from a given object will linked as a unit.
35 - Section start/end symbols.  The synthetic symbols that mark the start and
36   of data regions are not yet created in the output file.