mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
macho: do not randomly append non-incr atoms in ZigObject
This commit is contained in:
parent
f9fbd6302f
commit
521933e1c0
@ -497,6 +497,7 @@ pub fn writeAtomsRelocatable(self: *ZigObject, macho_file: *MachO) !void {
|
||||
const sect = atom.getInputSection(macho_file);
|
||||
if (sect.isZerofill()) continue;
|
||||
if (macho_file.isZigSection(atom.out_n_sect)) continue;
|
||||
if (atom.getRelocs(macho_file).len == 0) continue;
|
||||
const off = atom.value;
|
||||
const buffer = macho_file.sections.items(.out)[atom.out_n_sect].items;
|
||||
try self.getAtomData(macho_file, atom.*, buffer[off..][0..atom.size]);
|
||||
@ -1175,11 +1176,6 @@ fn createTlvDescriptor(
|
||||
.symbolnum = @intCast(init_sym_index),
|
||||
},
|
||||
});
|
||||
|
||||
try macho_file.sections.items(.atoms)[sect_index].append(gpa, .{
|
||||
.index = atom.atom_index,
|
||||
.file = self.index,
|
||||
});
|
||||
}
|
||||
|
||||
fn getDeclOutputSection(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user