| ... | ... | @@ -64,7 +64,10 @@ const SystemLib = struct { |
| 64 | 64 | const Section = struct { |
| 65 | 65 | header: macho.section_64, |
| 66 | 66 | 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, |
| 68 | 71 | |
| 69 | 72 | /// A list of atoms that have surplus capacity. This list can have false |
| 70 | 73 | /// positives, as functions grow and shrink over time, only sometimes being added |
| ... | ... | @@ -4434,8 +4437,8 @@ fn initSection( |
| 4434 | 4437 | } |
| 4435 | 4438 | header.addr = seg.vmaddr + off - seg.fileoff; |
| 4436 | 4439 | |
| 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? |
| 4439 | 4442 | const max_size = self.allocatedSize(segment_id, off); |
| 4440 | 4443 | |
| 4441 | 4444 | if (size > max_size) { |