| ... | @@ -1461,7 +1461,6 @@ pub fn updateDeclExports( | ... | @@ -1461,7 +1461,6 @@ pub fn updateDeclExports( |
| 1461 | const decl = mod.declPtr(decl_index); | 1461 | const decl = mod.declPtr(decl_index); |
| 1462 | const atom_index = try self.getOrCreateAtomForDecl(decl_index); | 1462 | const atom_index = try self.getOrCreateAtomForDecl(decl_index); |
| 1463 | const atom = self.getAtom(atom_index); | 1463 | const atom = self.getAtom(atom_index); |
| 1464 | const decl_sym = atom.getSymbol(self); | | |
| 1465 | const decl_metadata = self.decls.getPtr(decl_index).?; | 1464 | const decl_metadata = self.decls.getPtr(decl_index).?; |
| 1466 | | 1465 | |
| 1467 | for (exports) |exp| { | 1466 | for (exports) |exp| { |
| ... | @@ -1505,7 +1504,7 @@ pub fn updateDeclExports( | ... | @@ -1505,7 +1504,7 @@ pub fn updateDeclExports( |
| 1505 | const sym_loc = SymbolWithLoc{ .sym_index = sym_index, .file = null }; | 1504 | const sym_loc = SymbolWithLoc{ .sym_index = sym_index, .file = null }; |
| 1506 | const sym = self.getSymbolPtr(sym_loc); | 1505 | const sym = self.getSymbolPtr(sym_loc); |
| 1507 | try self.setSymbolName(sym, mod.intern_pool.stringToSlice(exp.opts.name)); | 1506 | try self.setSymbolName(sym, mod.intern_pool.stringToSlice(exp.opts.name)); |
| 1508 | sym.value = decl_sym.value; | 1507 | sym.value = atom.getSymbol(self).value; |
| 1509 | sym.section_number = @as(coff.SectionNumber, @enumFromInt(self.text_section_index.? + 1)); | 1508 | sym.section_number = @as(coff.SectionNumber, @enumFromInt(self.text_section_index.? + 1)); |
| 1510 | sym.type = .{ .complex_type = .FUNCTION, .base_type = .NULL }; | 1509 | sym.type = .{ .complex_type = .FUNCTION, .base_type = .NULL }; |
| 1511 | | 1510 | |