diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 |
commit | cfca06d7963fa0909f90483b42a6d7d194d01e08 (patch) | |
tree | 209fb2a2d68f8f277793fc8df46c753d31bc853b /lld/docs/WebAssembly.rst | |
parent | 706b4fc47bbc608932d3b491ae19a3b9cde9497b (diff) |
Notes
Diffstat (limited to 'lld/docs/WebAssembly.rst')
-rw-r--r-- | lld/docs/WebAssembly.rst | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/lld/docs/WebAssembly.rst b/lld/docs/WebAssembly.rst index 1b01cab5c253..b23f2cd462b4 100644 --- a/lld/docs/WebAssembly.rst +++ b/lld/docs/WebAssembly.rst @@ -112,8 +112,8 @@ The default behaviour is to generate these stub function and to produce a warning. The ``--fatal-warnings`` flag can be used to disable this behaviour and error out if mismatched are found. -Imports and Exports -~~~~~~~~~~~~~~~~~~~ +Exports +~~~~~~~ When building a shared library any symbols marked as ``visibility=default`` will be exported. @@ -130,6 +130,17 @@ Finally, just like with native ELF linker the ``--export-dynamic`` flag can be used to export symbols in the executable which are marked as ``visibility=default``. +Imports +~~~~~~~ + +By default no undefined symbols are allowed in the final binary. The flag +``--allow-undefined`` results in a WebAssembly import being defined for each +undefined symbol. It is then up to the runtime to provide such symbols. + +Alternatively symbols can be marked in the source code as with the +``import_name`` and/or ``import_module`` clang attributes which signals that +they are expected to be undefined at static link time. + Garbage Collection ~~~~~~~~~~~~~~~~~~ |