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 {...@@ -64,7 +64,10 @@ const SystemLib = struct {
64const Section = struct {64const Section = struct {
65 header: macho.section_64,65 header: macho.section_64,
66 segment_index: u8,66 segment_index: u8,
67 last_atom: ?*Atom = null, // TODO temporary hack; we really should shrink section to 067
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
69 /// A list of atoms that have surplus capacity. This list can have false72 /// A list of atoms that have surplus capacity. This list can have false
70 /// positives, as functions grow and shrink over time, only sometimes being added73 /// positives, as functions grow and shrink over time, only sometimes being added
...@@ -4434,8 +4437,8 @@ fn initSection(...@@ -4434,8 +4437,8 @@ fn initSection(
4434 }4437 }
4435 header.addr = seg.vmaddr + off - seg.fileoff;4438 header.addr = seg.vmaddr + off - seg.fileoff;
44364439
4437 // TODO this will break if we are inserting section that is not the last section4440 // TODO Will this break if we are inserting section that is not the last section
4438 // in a segment.4441 // in a segment?
4439 const max_size = self.allocatedSize(segment_id, off);4442 const max_size = self.allocatedSize(segment_id, off);
44404443
4441 if (size > max_size) {4444 if (size > max_size) {