| ... | @@ -1161,7 +1161,9 @@ pub fn populateMissingMetadata(self: *MachO) !void { | ... | @@ -1161,7 +1161,9 @@ pub fn populateMissingMetadata(self: *MachO) !void { |
| 1161 | text_segment.cmdsize += @sizeOf(macho.section_64); | 1161 | text_segment.cmdsize += @sizeOf(macho.section_64); |
| 1162 | text_segment.nsects += 1; | 1162 | text_segment.nsects += 1; |
| 1163 | | 1163 | |
| 1164 | const file_size = mem.alignForwardGeneric(u64, self.base.options.program_code_size_hint, 0x1000); | 1164 | // const program_code_size_hint = self.base.options.program_code_size_hint; |
| | 1165 | const program_code_size_hint = 128; |
| | 1166 | const file_size = mem.alignForwardGeneric(u64, program_code_size_hint, 0x1000); |
| 1165 | const off = @intCast(u32, self.findFreeSpace(file_size, 0x1000)); // TODO maybe findFreeSpace should return u32 directly? | 1167 | const off = @intCast(u32, self.findFreeSpace(file_size, 0x1000)); // TODO maybe findFreeSpace should return u32 directly? |
| 1166 | const flags = macho.S_REGULAR | macho.S_ATTR_PURE_INSTRUCTIONS | macho.S_ATTR_SOME_INSTRUCTIONS; | 1168 | const flags = macho.S_REGULAR | macho.S_ATTR_PURE_INSTRUCTIONS | macho.S_ATTR_SOME_INSTRUCTIONS; |
| 1167 | | 1169 | |