We have two types of relocations that we apply on startup:
- Relocations that apply to wasm globals
- 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.
Still has an extra "a" in "create a synthetic functions" :)