blob: 264d221970b1cced5ad07e0edfd0a0b8c8baaf2f [file] [log] [blame]
Sam Cleggc94d3932017-11-17 18:14:09 +00001WebAssembly lld port
2====================
3
Sam Cleggbd37e092018-09-27 00:42:49 +00004Note: The WebAssembly port is still a work in progress and is be lacking
5certain features.
6
Sam Cleggc94d3932017-11-17 18:14:09 +00007The WebAssembly version of lld takes WebAssembly binaries as inputs and produces
Sam Cleggbd37e092018-09-27 00:42:49 +00008a WebAssembly binary as its output. For the most part this port tried to mimic
9the behaviour of traditional ELF linkers and specifically the ELF lld port.
10Where possible that command line flags and the semantics should be the same.
Sam Cleggc94d3932017-11-17 18:14:09 +000011
12
13Object file format
14------------------
15
16The format the input object files that lld expects is specified as part of the
17the WebAssembly tool conventions
18https://github.com/WebAssembly/tool-conventions/blob/master/Linking.md.
19
20This is object format that the llvm will produce when run with the
Sam Clegg262e0902018-05-10 17:59:41 +000021``wasm32-unknown-unknown`` target. To build llvm with WebAssembly support
Sam Cleggc94d3932017-11-17 18:14:09 +000022currently requires enabling the experimental backed using
23``-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly``.
24
25
26Missing features
27----------------
28
Sam Cleggbd37e092018-09-27 00:42:49 +000029There are several key features that are not yet implement in the WebAssembly
30ports:
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.