authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2024-01-28 10:02:28+01:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2024-01-28 10:02:28+01:00
log17215bd2c8debedea2b98d78b0c09cd5fe8d386a
tree93c7f4f0f70965fc991b3d729b0ab1d556f7ebda
parent2d757c65d84337d3b0a6dbdc06074966138084a0

macho: insert global symbol name into the correct strtab


1 files changed, 2 insertions(+), 1 deletions(-)

src/link/MachO/ZigObject.zig+2-1
......@@ -1268,7 +1268,8 @@ pub fn getGlobalSymbol(self: *ZigObject, macho_file: *MachO, name: []const u8, l
12681268 nlist.n_strx = off;
12691269 nlist.n_type = macho.N_EXT;
12701270 lookup_gop.value_ptr.* = nlist_index;
1271 const gop = try macho_file.getOrCreateGlobal(off);
1271 const global_name_off = try macho_file.strings.insert(gpa, sym_name);
1272 const gop = try macho_file.getOrCreateGlobal(global_name_off);
12721273 try self.symbols.append(gpa, gop.index);
12731274 }
12741275 return lookup_gop.value_ptr.*;