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(
23122312 .local_sym_index = local_sym_index,
23132313 .file = object_id,
23142314 };
2315 self.export_info_dirty = true;
23152316 } else if (symbolIsTentative(sym)) {
23162317 // Symbol is a tentative definition.
23172318 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
844844 .sect = context.macho_file.got_section_index.?,
845845 };
846846 _ = 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;
847850 } else if (parsed_rel.payload == .unsigned) {
848851 switch (parsed_rel.where) {
849852 .undef => {