| author | |
| committer | |
| log | 429e542f3f25813a57abceda6ace715398eb0dd5 |
| tree | d41dd2f711c5d9ee81ee08aab1f988cf1153517d |
| parent | 2901026425172be1f03c6eed544e8fabbdada4e0 |
2 files changed, 5 insertions(+), 0 deletions(-)
src/link/MachO.zig+3| ... | ... | @@ -2479,6 +2479,9 @@ fn initDyldInfoSections(self: *MachO) !void { |
| 2479 | 2479 | nbinds += ctx.bind_relocs; |
| 2480 | 2480 | nweak_binds += ctx.weak_bind_relocs; |
| 2481 | 2481 | } |
| 2482 | if (self.getInternalObject()) |int| { | |
| 2483 | nrebases += int.num_rebase_relocs; | |
| 2484 | } | |
| 2482 | 2485 | try self.rebase.entries.ensureUnusedCapacity(gpa, nrebases); |
| 2483 | 2486 | try self.bind.entries.ensureUnusedCapacity(gpa, nbinds); |
| 2484 | 2487 | try self.weak_bind.entries.ensureUnusedCapacity(gpa, nweak_binds); |
src/link/MachO/InternalObject.zig+2| ... | ... | @@ -8,6 +8,7 @@ strtab: std.ArrayListUnmanaged(u8) = .{}, |
| 8 | 8 | objc_methnames: std.ArrayListUnmanaged(u8) = .{}, |
| 9 | 9 | objc_selrefs: [@sizeOf(u64)]u8 = [_]u8{0} ** @sizeOf(u64), |
| 10 | 10 | |
| 11 | num_rebase_relocs: u32 = 0, | |
| 11 | 12 | output_symtab_ctx: MachO.SymtabCtx = .{}, |
| 12 | 13 | |
| 13 | 14 | pub fn deinit(self: *InternalObject, allocator: Allocator) void { |
| ... | ... | @@ -115,6 +116,7 @@ fn addObjcSelrefsSection( |
| 115 | 116 | }, |
| 116 | 117 | }); |
| 117 | 118 | atom.relocs = .{ .pos = 0, .len = 1 }; |
| 119 | self.num_rebase_relocs += 1; | |
| 118 | 120 | |
| 119 | 121 | return atom_index; |
| 120 | 122 | } |