authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2024-01-20 23:45:32+01:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2024-01-24 12:34:42+01:00
log411c7f6669ed2eb758f371dfde59e03abf05aa0a
treec848d319be64b2b0ffd1f56430455e28ca15b6a0
parent5c4db4e5787eb534c8a83a6f7fc8f0fcfb1d01ef

macho: fix wrong symbol type for TLV vars


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

src/link/MachO/ZigObject.zig+3-1
...@@ -757,12 +757,14 @@ fn updateTlv(...@@ -757,12 +757,14 @@ fn updateTlv(
757 sym.out_n_sect = sect_index;757 sym.out_n_sect = sect_index;
758 atom.out_n_sect = sect_index;758 atom.out_n_sect = sect_index;
759759
760 sym.value = 0;
760 sym.name = try macho_file.strings.insert(gpa, decl_name);761 sym.name = try macho_file.strings.insert(gpa, decl_name);
761 atom.flags.alive = true;762 atom.flags.alive = true;
762 atom.name = sym.name;763 atom.name = sym.name;
763 nlist.n_strx = sym.name;764 nlist.n_strx = sym.name;
764 nlist.n_sect = sect_index + 1;765 nlist.n_sect = sect_index + 1;
765 nlist.n_type = macho.N_EXT;766 nlist.n_type = macho.N_SECT;
767 nlist.n_value = 0;
766 self.symtab.items(.size)[sym.nlist_idx] = code.len;768 self.symtab.items(.size)[sym.nlist_idx] = code.len;
767769
768 atom.alignment = required_alignment;770 atom.alignment = required_alignment;