| ... | @@ -1801,6 +1801,7 @@ fn addGotEntry(self: *MachO, target: SymbolWithLoc) !void { | ... | @@ -1801,6 +1801,7 @@ fn addGotEntry(self: *MachO, target: SymbolWithLoc) !void { |
| 1801 | const got_index = try self.got_table.allocateEntry(self.base.allocator, target); | 1801 | const got_index = try self.got_table.allocateEntry(self.base.allocator, target); |
| 1802 | try self.writeOffsetTableEntry(got_index); | 1802 | try self.writeOffsetTableEntry(got_index); |
| 1803 | self.got_table_count_dirty = true; | 1803 | self.got_table_count_dirty = true; |
| | 1804 | self.markRelocsDirtyByTarget(target); |
| 1804 | } | 1805 | } |
| 1805 | | 1806 | |
| 1806 | fn addStubEntry(self: *MachO, target: SymbolWithLoc) !void { | 1807 | fn addStubEntry(self: *MachO, target: SymbolWithLoc) !void { |
| ... | @@ -1808,6 +1809,7 @@ fn addStubEntry(self: *MachO, target: SymbolWithLoc) !void { | ... | @@ -1808,6 +1809,7 @@ fn addStubEntry(self: *MachO, target: SymbolWithLoc) !void { |
| 1808 | const stub_index = try self.stub_table.allocateEntry(self.base.allocator, target); | 1809 | const stub_index = try self.stub_table.allocateEntry(self.base.allocator, target); |
| 1809 | try self.writeStubTableEntry(stub_index); | 1810 | try self.writeStubTableEntry(stub_index); |
| 1810 | self.stub_table_count_dirty = true; | 1811 | self.stub_table_count_dirty = true; |
| | 1812 | self.markRelocsDirtyByTarget(target); |
| 1811 | } | 1813 | } |
| 1812 | | 1814 | |
| 1813 | pub fn updateFunc(self: *MachO, module: *Module, func: *Module.Fn, air: Air, liveness: Liveness) !void { | 1815 | pub fn updateFunc(self: *MachO, module: *Module, func: *Module.Fn, air: Air, liveness: Liveness) !void { |
| ... | @@ -2294,6 +2296,7 @@ fn updateDeclCode(self: *MachO, decl_index: Module.Decl.Index, code: []u8) !u64 | ... | @@ -2294,6 +2296,7 @@ fn updateDeclCode(self: *MachO, decl_index: Module.Decl.Index, code: []u8) !u64 |
| 2294 | log.debug(" (updating GOT entry)", .{}); | 2296 | log.debug(" (updating GOT entry)", .{}); |
| 2295 | const got_atom_index = self.got_table.lookup.get(.{ .sym_index = sym_index }).?; | 2297 | const got_atom_index = self.got_table.lookup.get(.{ .sym_index = sym_index }).?; |
| 2296 | try self.writeOffsetTableEntry(got_atom_index); | 2298 | try self.writeOffsetTableEntry(got_atom_index); |
| | 2299 | self.markRelocsDirtyByTarget(.{ .sym_index = sym_index }); |
| 2297 | } | 2300 | } |
| 2298 | } else if (code_len < atom.size) { | 2301 | } else if (code_len < atom.size) { |
| 2299 | self.shrinkAtom(atom_index, code_len); | 2302 | self.shrinkAtom(atom_index, code_len); |