authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2022-12-04 12:29:44+01:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2022-12-04 16:58:45+01:00
log73d76b26a22fca71636bd2c995de4919a1b6d343
tree5cb7a356f71b46b32a2cbe8ecda47522f1b9a3a5
parent278426b851dc5e9eefc6b5be2dda3500f9d6d1d2

dsym: rename updateLinkeditSegment to finalizeDwarfSegment

This is the checkpoint where we finalize the VM of the primary binary.

1 files changed, 4 insertions(+), 4 deletions(-)

src/link/MachO/DebugSymbols.zig+4-4
...@@ -27,8 +27,8 @@ file: fs.File,...@@ -27,8 +27,8 @@ file: fs.File,
27segments: std.ArrayListUnmanaged(macho.segment_command_64) = .{},27segments: std.ArrayListUnmanaged(macho.segment_command_64) = .{},
28sections: std.ArrayListUnmanaged(macho.section_64) = .{},28sections: std.ArrayListUnmanaged(macho.section_64) = .{},
2929
30linkedit_segment_cmd_index: ?u8 = null,
31dwarf_segment_cmd_index: ?u8 = null,30dwarf_segment_cmd_index: ?u8 = null,
31linkedit_segment_cmd_index: ?u8 = null,
3232
33debug_info_section_index: ?u8 = null,33debug_info_section_index: ?u8 = null,
34debug_abbrev_section_index: ?u8 = null,34debug_abbrev_section_index: ?u8 = null,
...@@ -277,7 +277,7 @@ pub fn flushModule(self: *DebugSymbols, allocator: Allocator, options: link.Opti...@@ -277,7 +277,7 @@ pub fn flushModule(self: *DebugSymbols, allocator: Allocator, options: link.Opti
277 const lc_writer = lc_buffer.writer();277 const lc_writer = lc_buffer.writer();
278 var ncmds: u32 = 0;278 var ncmds: u32 = 0;
279279
280 self.updateLinkeditSegment();280 self.finalizeDwarfSegment();
281 try self.writeLinkeditSegmentData(&ncmds, lc_writer);281 try self.writeLinkeditSegmentData(&ncmds, lc_writer);
282282
283 {283 {
...@@ -321,9 +321,9 @@ pub fn swapRemoveRelocs(self: *DebugSymbols, target: u32) void {...@@ -321,9 +321,9 @@ pub fn swapRemoveRelocs(self: *DebugSymbols, target: u32) void {
321 }321 }
322}322}
323323
324fn updateLinkeditSegment(self: *DebugSymbols) void {324fn finalizeDwarfSegment(self: *DebugSymbols) void {
325 const base_vmaddr = blk: {325 const base_vmaddr = blk: {
326 const last_seg = self.base.segments.items[self.base.segments.items.len - 1];326 const last_seg = self.base.getLinkeditSegmentPtr();
327 break :blk last_seg.vmaddr + last_seg.vmsize;327 break :blk last_seg.vmaddr + last_seg.vmsize;
328 };328 };
329 const dwarf_segment = &self.segments.items[self.dwarf_segment_cmd_index.?];329 const dwarf_segment = &self.segments.items[self.dwarf_segment_cmd_index.?];