emscripten
emscripten copied to clipboard
Export data addresses from the Wasm module just like other symbols.
This removes the special handling of exported immutable globals which simplifies the code in a few different ways.
For programs that export data addresses (this is relatively rare) this means codesize reduction for the generated JS (since it no longer contains the constant values) and the codesize increase for the Wasm binary (since it now contains extra exports).
The main reason for this is consistency with dynamic linking (where data exports are always needed) and a reduction in complexity.
Fixes: #25556