diff options
| author | Luuk de Gram <luuk@degram.dev> | 2022-08-16 20:50:50 +0200 |
|---|---|---|
| committer | Luuk de Gram <luuk@degram.dev> | 2022-08-18 14:17:01 +0200 |
| commit | 4f2143beccb822f42c77d1d6c5ad31388123803e (patch) | |
| tree | f17629e9875ad5086ec7e90820096a3746764ca9 /src/Module.zig | |
| parent | 63c25cc1cc4aef1ae5c7425496d99b30db2f44d7 (diff) | |
| download | zig-4f2143beccb822f42c77d1d6c5ad31388123803e.tar.gz zig-4f2143beccb822f42c77d1d6c5ad31388123803e.zip | |
link/Wasm: improve symbol resolution
This adds additional checks during symbol resolution:
- Ensures function signatures match when a symbol will be replaced.
- Ensures global types match when the symbol is being replaced.
- When both symbols are undefined, ensures they have a matching module name.
Those changes ensure the result will pass the validator when
the runtime compiles the Wasm module.
Additionally, this also slightly changes the behavior when both
the existing symbol and new symbol are both defined. Rather than
always resulting in a collision, it only results in a collision
when both are also weak. Else, the non-weak symbol will be picked.
Diffstat (limited to 'src/Module.zig')
0 files changed, 0 insertions, 0 deletions
