Skip to content

Commit

Permalink
macho: reduce padding between header and __text section
Browse files Browse the repository at this point in the history
  • Loading branch information
kubkon committed Nov 21, 2023
1 parent 42391b3 commit 1fadacd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/MachO.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1392,7 +1392,7 @@ fn allocateSections(self: *MachO) !void {
const page_size = self.getPageSize();
const slice = self.sections.slice();

var next_seg_id: u8 = 0;
var next_seg_id: u8 = if (self.pagezero_seg_index) |index| index + 1 else 0;
for (slice.items(.header), slice.items(.segment_id)) |*header, seg_id| {
if (seg_id != next_seg_id) {
vmaddr = mem.alignForward(u64, vmaddr, page_size);
Expand Down

0 comments on commit 1fadacd

Please sign in to comment.