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,
2727segments: std.ArrayListUnmanaged(macho.segment_command_64) = .{},
2828sections: std.ArrayListUnmanaged(macho.section_64) = .{},
2929
30linkedit_segment_cmd_index: ?u8 = null,
3130dwarf_segment_cmd_index: ?u8 = null,
31linkedit_segment_cmd_index: ?u8 = null,
3232
3333debug_info_section_index: ?u8 = null,
3434debug_abbrev_section_index: ?u8 = null,
......@@ -277,7 +277,7 @@ pub fn flushModule(self: *DebugSymbols, allocator: Allocator, options: link.Opti
277277 const lc_writer = lc_buffer.writer();
278278 var ncmds: u32 = 0;
279279
280 self.updateLinkeditSegment();
280 self.finalizeDwarfSegment();
281281 try self.writeLinkeditSegmentData(&ncmds, lc_writer);
282282
283283 {
......@@ -321,9 +321,9 @@ pub fn swapRemoveRelocs(self: *DebugSymbols, target: u32) void {
321321 }
322322}
323323
324fn updateLinkeditSegment(self: *DebugSymbols) void {
324fn finalizeDwarfSegment(self: *DebugSymbols) void {
325325 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();
327327 break :blk last_seg.vmaddr + last_seg.vmsize;
328328 };
329329 const dwarf_segment = &self.segments.items[self.dwarf_segment_cmd_index.?];