From acec06cfaf9a82ec8037a23993ff36fa72eb6e82 Mon Sep 17 00:00:00 2001 From: Luuk de Gram Date: Mon, 21 Feb 2022 21:43:38 +0100 Subject: wasm-linker: Implement `updateDeclExports` We now correctly implement exporting decls. This means it is possible to export a decl with a different name than the decl that is doing the export. This also sets the symbols with the correct flags, so when we emit a relocatable object file, a linker can correctly resolve symbols and/or export the symbol to the host environment. This commit also includes fixes to ensure relocations have the correct offset to how other linkers will expect the offset, rather than what we use internally. Other linkers accept the offset, relative to the section. Internally we use an offset relative to the atom. --- src/link.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/link.zig') diff --git a/src/link.zig b/src/link.zig index cf62b96cfc..46314327d9 100644 --- a/src/link.zig +++ b/src/link.zig @@ -237,7 +237,7 @@ pub const File = struct { macho: MachO.Export, plan9: Plan9.Export, c: void, - wasm: void, + wasm: Wasm.Export, spirv: void, nvptx: void, }; -- cgit v1.2.3