mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-08 04:24:33 +01:00
macho: update non-incremental section sizes for ZigObject sections
This commit is contained in:
parent
387a71fa5b
commit
234aa86802
1 changed files with 9 additions and 0 deletions
|
|
@ -1843,6 +1843,15 @@ pub fn addAtomsToSections(self: *MachO) !void {
|
|||
|
||||
const gpa = self.base.comp.gpa;
|
||||
|
||||
if (self.getZigObject()) |zo| {
|
||||
for (zo.getAtoms()) |atom_index| {
|
||||
const atom = zo.getAtom(atom_index) orelse continue;
|
||||
if (!atom.flags.alive) continue;
|
||||
if (self.isZigSection(atom.out_n_sect)) continue;
|
||||
const atoms = &self.sections.items(.atoms)[atom.out_n_sect];
|
||||
try atoms.append(gpa, .{ .index = atom_index, .file = zo.index });
|
||||
}
|
||||
}
|
||||
for (self.objects.items) |index| {
|
||||
const file = self.getFile(index).?;
|
||||
for (file.getAtoms()) |atom_index| {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue