wasm-linker: Only emit name of referenced symbols

This commit is contained in:
Luuk de Gram 2023-11-20 21:08:40 +01:00
parent 6f7a9b3144
commit f7d4f72fd5
No known key found for this signature in database
GPG Key ID: A8CFE58E4DC7D664

View File

@ -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 => {