[lld][WebAssembly] Disallow exporting of TLS symbols
authorSam Clegg <sbc@chromium.org>
Fri, 7 May 2021 03:29:05 +0000 (20:29 -0700)
committerSam Clegg <sbc@chromium.org>
Mon, 10 May 2021 16:58:44 +0000 (09:58 -0700)
commitbda8b8488442215e0557a53016a8d9c0a36b90c5
treed05fe03e977c1d5248d110b5c005ef21c43661f8
parentf44c6f20f5e9976357b4851c4432d96b4e4d3521
[lld][WebAssembly] Disallow exporting of TLS symbols

Cross module TLS is currently not supported by our ABI.  This
change makes explicitly exporting a TLS symbol into an error
and prevents implicit exporting (via --export-all).

See https://github.com/emscripten-core/emscripten/issues/14120

Differential Revision: https://reviews.llvm.org/D102044
lld/test/wasm/tls-export.s [new file with mode: 0644]
lld/wasm/InputChunks.h
lld/wasm/InputFiles.cpp
lld/wasm/OutputSegment.h
lld/wasm/Relocations.cpp
lld/wasm/Symbols.cpp
lld/wasm/Symbols.h
lld/wasm/Writer.cpp