llvm-capstone/lld/wasm
Sam Clegg e52881a287 [lld][WebAssembly] Split __wasm_apply_relocs function in two
We have two types of relocations that we apply on startup:
1. Relocations that apply to wasm globals
2. Relocations that apply to wasm memory

The first set of relocations use only the `__memory_base` import to
update a set of internal globals.  Because wasm globals are thread local
these need to run on each thread.  Memory relocations, like static
constructors, must only be run once.

To ensure global relocations run on all threads and because the only
depend on the immutable `__memory_base` import we can run them during
the WebAssembly start functions, instead of waiting until the
post-instantiation __wasm_call_ctors.

Differential Revision: https://reviews.llvm.org/D93066
2020-12-10 17:07:39 -08:00
..
CMakeLists.txt [lld][WebAssembly] Add initial support for -Map/--print-map 2020-09-12 16:10:51 -07:00
Config.h [LTO][wasm][NewPM] Allow using new pass manager for wasm LTO 2020-12-01 12:22:40 -08:00
Driver.cpp [lld][WebAssembly] Split __wasm_apply_relocs function in two 2020-12-10 17:07:39 -08:00
InputChunks.cpp [lld] Use -1 as tombstone value for discarded code ranges 2020-12-01 17:06:32 -08:00
InputChunks.h [lld] Use -1 as tombstone value for discarded code ranges 2020-12-01 17:06:32 -08:00
InputEvent.h [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
InputFiles.cpp [lld] Use -1 as tombstone value for discarded code ranges 2020-12-01 17:06:32 -08:00
InputFiles.h [lld] Use -1 as tombstone value for discarded code ranges 2020-12-01 17:06:32 -08:00
InputGlobal.h [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
LTO.cpp [LTO][wasm][NewPM] Allow using new pass manager for wasm LTO 2020-12-01 12:22:40 -08: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 [lld][WebAssembly] Split __wasm_apply_relocs function in two 2020-12-10 17:07:39 -08: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 [WebAssembly] Rename --lto-no-new-pass-manager to --no-lto-new-pass-manager 2020-12-01 16:52:37 -08:00
OutputSections.cpp [lld][WebAssembly] Fix malformed output with -pie + --shared-memory 2020-12-03 11:06:07 -08: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] Ensure stub symbols always get address 0 2020-11-25 18:26:34 -08:00
Relocations.h [Coding style change][lld] Rename variables for non-ELF ports 2019-07-11 05:40:30 +00:00
Symbols.cpp [lld][WebAssembly] Split __wasm_apply_relocs function in two 2020-12-10 17:07:39 -08:00
Symbols.h [lld][WebAssembly] Split __wasm_apply_relocs function in two 2020-12-10 17:07:39 -08:00
SymbolTable.cpp [lld][WebAssembly] Ensure stub symbols always get address 0 2020-11-25 18:26:34 -08:00
SymbolTable.h [lld][WebAssembly] Implement --unresolved-symbols 2020-11-17 16:27:06 -08:00
SyntheticSections.cpp [lld][WebAssembly] Split __wasm_apply_relocs function in two 2020-12-10 17:07:39 -08:00
SyntheticSections.h [lld][WebAssembly] Split __wasm_apply_relocs function in two 2020-12-10 17:07:39 -08:00
Writer.cpp [lld][WebAssembly] Split __wasm_apply_relocs function in two 2020-12-10 17:07:39 -08:00
Writer.h [WebAssembly] Refactor synthetic sections and relocation processing. NFC. 2019-05-21 09:13:09 +00:00
WriterUtils.cpp [WebAssembly] Fixed Writer::createInitMemoryFunction to work for wasm64 2020-12-03 16:20:55 -08:00
WriterUtils.h [WebAssembly] Fixed Writer::createInitMemoryFunction to work for wasm64 2020-12-03 16:20:55 -08:00