| ... | @@ -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; |
| 759 | | 759 | |
| | 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; |
| 767 | | 769 | |
| 768 | atom.alignment = required_alignment; | 770 | atom.alignment = required_alignment; |