commit f7d4f72fd5e3e3026e395f43c5b2b2c3cb49fce2 (tree)
parent 6f7a9b31443debf3e6d2be645261372de1bc5877
Author: Luuk de Gram <luuk@degram.dev>
Date: Mon, 20 Nov 2023 21:08:40 +0100
wasm-linker: Only emit name of referenced symbols
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/link/Wasm.zig b/src/link/Wasm.zig
@@ -4293,6 +4293,9 @@ fn emitNameSection(wasm: *Wasm, binary_bytes: *std.ArrayList(u8), arena: std.mem
for (wasm.resolved_symbols.keys()) |sym_loc| {
const symbol = sym_loc.getSymbol(wasm).*;
+ if (symbol.isDead()) {
+ continue;
+ }
const name = sym_loc.getName(wasm);
switch (symbol.tag) {
.function => {