authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2024-07-14 07:11:12+02:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2024-07-18 09:13:08+02:00
log234aa86802ececa8450d84e4cb16da7ce8a5cf79
treee50da8eac21009e8a70683b978dd2312e9694c12
parent387a71fa5bed4782d6f6789b8ca1ce637a31076f

macho: update non-incremental section sizes for ZigObject sections


1 files changed, 9 insertions(+), 0 deletions(-)

src/link/MachO.zig+9
...@@ -1843,6 +1843,15 @@ pub fn addAtomsToSections(self: *MachO) !void {...@@ -1843,6 +1843,15 @@ pub fn addAtomsToSections(self: *MachO) !void {
18431843
1844 const gpa = self.base.comp.gpa;1844 const gpa = self.base.comp.gpa;
18451845
1846 if (self.getZigObject()) |zo| {
1847 for (zo.getAtoms()) |atom_index| {
1848 const atom = zo.getAtom(atom_index) orelse continue;
1849 if (!atom.flags.alive) continue;
1850 if (self.isZigSection(atom.out_n_sect)) continue;
1851 const atoms = &self.sections.items(.atoms)[atom.out_n_sect];
1852 try atoms.append(gpa, .{ .index = atom_index, .file = zo.index });
1853 }
1854 }
1846 for (self.objects.items) |index| {1855 for (self.objects.items) |index| {
1847 const file = self.getFile(index).?;1856 const file = self.getFile(index).?;
1848 for (file.getAtoms()) |atom_index| {1857 for (file.getAtoms()) |atom_index| {