| ... | ... | @@ -1739,7 +1739,10 @@ fn detectAllocCollision(self: *MachO, segment: *const SegmentCommand, start: u64 |
| 1739 | 1739 | } |
| 1740 | 1740 | |
| 1741 | 1741 | fn findFreeSpace(self: *MachO, segment: *const SegmentCommand, object_size: u64, min_alignment: u16) u64 { |
| 1742 | | var start: u64 = if (parseAndCmpName(&segment.inner.segname, "__TEXT")) self.header_pad else 0; |
| 1742 | var start: u64 = if (parseAndCmpName(&segment.inner.segname, "__TEXT")) |
| 1743 | self.header_pad |
| 1744 | else |
| 1745 | segment.inner.fileoff; |
| 1743 | 1746 | while (self.detectAllocCollision(segment, start, object_size)) |item_end| { |
| 1744 | 1747 | start = mem.alignForwardGeneric(u64, item_end, min_alignment); |
| 1745 | 1748 | } |