authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2022-08-03 21:26:52+02:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2022-08-03 21:26:52+02:00
log007eb3bd714caee550722cae0e4e98a205ead341
tree1e842d026f9fdc02acaa0d99aeddb0a1a9743303
parent2c8fc3b5979d6ca8befbf5de48a661a6fadbe819

macho: fix some TODOs


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

src/link/MachO.zig+6-3
......@@ -64,7 +64,10 @@ const SystemLib = struct {
6464const Section = struct {
6565 header: macho.section_64,
6666 segment_index: u8,
67 last_atom: ?*Atom = null, // TODO temporary hack; we really should shrink section to 0
67
68 // TODO is null here necessary, or can we do away with tracking via section
69 // size in incremental context?
70 last_atom: ?*Atom = null,
6871
6972 /// A list of atoms that have surplus capacity. This list can have false
7073 /// positives, as functions grow and shrink over time, only sometimes being added
......@@ -4434,8 +4437,8 @@ fn initSection(
44344437 }
44354438 header.addr = seg.vmaddr + off - seg.fileoff;
44364439
4437 // TODO this will break if we are inserting section that is not the last section
4438 // in a segment.
4440 // TODO Will this break if we are inserting section that is not the last section
4441 // in a segment?
44394442 const max_size = self.allocatedSize(segment_id, off);
44404443
44414444 if (size > max_size) {