authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2021-09-03 13:41:28+02:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2021-09-03 13:41:28+02:00
log1d2199b71c06e97be407c2bd0b05c07c8bd6cd2c
tree56a2df545dc931f46ad0308a9ff0a60776ddd1f9
parent7536a2f8cfdd66fc3b277514ec28ccbedfe83fc1

macho: dirty export trie when adding globals

Similarly, dirty rebase info when adding a GOT atom.

2 files changed, 4 insertions(+), 0 deletions(-)

src/link/MachO.zig+1
...@@ -2312,6 +2312,7 @@ fn resolveSymbolsInObject(...@@ -2312,6 +2312,7 @@ fn resolveSymbolsInObject(
2312 .local_sym_index = local_sym_index,2312 .local_sym_index = local_sym_index,
2313 .file = object_id,2313 .file = object_id,
2314 };2314 };
2315 self.export_info_dirty = true;
2315 } else if (symbolIsTentative(sym)) {2316 } else if (symbolIsTentative(sym)) {
2316 // Symbol is a tentative definition.2317 // Symbol is a tentative definition.
2317 const resolv = self.symbol_resolver.getPtr(n_strx) orelse {2318 const resolv = self.symbol_resolver.getPtr(n_strx) orelse {
src/link/MachO/TextBlock.zig+3
...@@ -844,6 +844,9 @@ pub fn parseRelocs(self: *TextBlock, relocs: []macho.relocation_info, context: R...@@ -844,6 +844,9 @@ pub fn parseRelocs(self: *TextBlock, relocs: []macho.relocation_info, context: R
844 .sect = context.macho_file.got_section_index.?,844 .sect = context.macho_file.got_section_index.?,
845 };845 };
846 _ = try context.macho_file.allocateAtom(atom, match);846 _ = try context.macho_file.allocateAtom(atom, match);
847 // TODO don't need both at once
848 context.macho_file.rebase_info_dirty = true;
849 context.macho_file.binding_info_dirty = true;
847 } else if (parsed_rel.payload == .unsigned) {850 } else if (parsed_rel.payload == .unsigned) {
848 switch (parsed_rel.where) {851 switch (parsed_rel.where) {
849 .undef => {852 .undef => {