llvm-project/lld/wasm
Sam Clegg 29a3056bb5 [lld][WebAssembly] Allow references to __tls_base without shared memory
Previously we limited the use of atomics and TLS to programs
linked with `--shared-memory`.

However, as of https://reviews.llvm.org/D79530 we now allow
programs that use atomic to be linked without `--shared-memory`.
For this to be useful we also want to all TLS usage in such
programs.  In this case, since we know we are single threaded
we simply include the TLS data as a regular active segment
and create an immutable `__tls_base` global that point to the
start of this segment.

Fixes: https://github.com/emscripten-core/emscripten/issues/12489

Differential Revision: https://reviews.llvm.org/D91115
2020-11-10 17:58:06 -08:00
..
CMakeLists.txt [lld][WebAssembly] Add initial support for -Map/--print-map 2020-09-12 16:10:51 -07:00
Config.h [lld][WebAssembly] Add support for -Bsymbolic flag 2020-10-12 17:25:04 -07:00
Driver.cpp [lld][WebAssembly] Allow references to __tls_base without shared memory 2020-11-10 17:58:06 -08:00
InputChunks.cpp [lld][WebAssembly] Give better warnings on bad relocation sites 2020-10-30 10:11:04 -07:00
InputChunks.h [WebAssembly] New-style command support 2020-09-30 19:02:40 -07:00
InputEvent.h [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
InputFiles.cpp [WebAssembly] Improved LLD error messages in case of mixed wasm32/wasm64 object files 2020-10-29 17:15:59 -07:00
InputFiles.h [WebAssembly] Improved LLD error messages in case of mixed wasm32/wasm64 object files 2020-10-29 17:15:59 -07:00
InputGlobal.h [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
LTO.cpp [ThinLTO] Allow usage of all hardware threads in the system 2020-03-27 10:20:58 -04:00
LTO.h [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
MapFile.cpp [lld][WebAssembly] Add initial support for -Map/--print-map 2020-09-12 16:10:51 -07:00
MapFile.h [lld][WebAssembly] Add initial support for -Map/--print-map 2020-09-12 16:10:51 -07:00
MarkLive.cpp [WebAssembly] GC constructor functions in otherwise unused archive objects 2020-10-12 18:54:57 -07:00
MarkLive.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Options.td [lld][WebAssembly] Add support for -Bsymbolic flag 2020-10-12 17:25:04 -07:00
OutputSections.cpp [lld][WebAssembly] Add initial support for -Map/--print-map 2020-09-12 16:10:51 -07:00
OutputSections.h [lld][WebAssembly] Add initial support for -Map/--print-map 2020-09-12 16:10:51 -07:00
OutputSegment.h [WebAssembly] wasm64: fix memory.init operand types 2020-08-10 10:15:20 -07:00
Relocations.cpp [lld][WebAssembly] Add support for -Bsymbolic flag 2020-10-12 17:25:04 -07:00
Relocations.h [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
SymbolTable.cpp [lld][WebAssembly] Allow references to __tls_base without shared memory 2020-11-10 17:58:06 -08:00
SymbolTable.h [lld][WebAssembly] Allow references to __tls_base without shared memory 2020-11-10 17:58:06 -08:00
Symbols.cpp [WebAssembly] GC constructor functions in otherwise unused archive objects 2020-10-12 18:54:57 -07:00
Symbols.h [WebAssembly] New-style command support 2020-09-30 19:02:40 -07:00
SyntheticSections.cpp [WebAssembly] Added .tabletype to asm and multiple table support in obj files 2020-10-13 07:52:23 -07:00
SyntheticSections.h [lld][WebAssembly] Add support for -Bsymbolic flag 2020-10-12 17:25:04 -07:00
Writer.cpp [lld][WebAssembly] Allow references to __tls_base without shared memory 2020-11-10 17:58:06 -08:00
Writer.h [WebAssembly] Refactor synthetic sections and relocation processing. NFC. 2019-05-21 09:13:09 +00:00
WriterUtils.cpp [WebAssembly] Added .tabletype to asm and multiple table support in obj files 2020-10-13 07:52:23 -07:00
WriterUtils.h [WebAssembly] Adding 64-bit version of R_WASM_MEMORY_ADDR_* relocs 2020-06-15 10:07:42 -07:00