Skip to content

Commit

Permalink
macho: fix __objc_stubs alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
kubkon committed Dec 18, 2023
1 parent c9ae550 commit ffc7e32
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/MachO.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1692,7 +1692,11 @@ fn calcSectionSizes(self: *MachO) !void {
if (self.objc_stubs_sect_index) |idx| {
const header = &self.sections.items(.header)[idx];
header.size = self.objc_stubs.size(self);
header.@"align" = 1;
header.@"align" = switch (cpu_arch) {
.x86_64 => 0,
.aarch64 => 2,
else => 0,
};
}
}

Expand Down

0 comments on commit ffc7e32

Please sign in to comment.