aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJakub Konka <kubkon@jakubkonka.com>2022-12-04 12:29:44 +0100
committerJakub Konka <kubkon@jakubkonka.com>2022-12-04 16:58:45 +0100
commit73d76b26a22fca71636bd2c995de4919a1b6d343 (patch)
tree5cb7a356f71b46b32a2cbe8ecda47522f1b9a3a5 /src
parent278426b851dc5e9eefc6b5be2dda3500f9d6d1d2 (diff)
downloadzig-73d76b26a22fca71636bd2c995de4919a1b6d343.tar.gz
zig-73d76b26a22fca71636bd2c995de4919a1b6d343.zip
dsym: rename updateLinkeditSegment to finalizeDwarfSegment
This is the checkpoint where we finalize the VM of the primary binary.
Diffstat (limited to 'src')
-rw-r--r--src/link/MachO/DebugSymbols.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/link/MachO/DebugSymbols.zig b/src/link/MachO/DebugSymbols.zig
index ac92bad851..a2bb582aaa 100644
--- a/src/link/MachO/DebugSymbols.zig
+++ b/src/link/MachO/DebugSymbols.zig
@@ -27,8 +27,8 @@ file: fs.File,
segments: std.ArrayListUnmanaged(macho.segment_command_64) = .{},
sections: std.ArrayListUnmanaged(macho.section_64) = .{},
-linkedit_segment_cmd_index: ?u8 = null,
dwarf_segment_cmd_index: ?u8 = null,
+linkedit_segment_cmd_index: ?u8 = null,
debug_info_section_index: ?u8 = null,
debug_abbrev_section_index: ?u8 = null,
@@ -277,7 +277,7 @@ pub fn flushModule(self: *DebugSymbols, allocator: Allocator, options: link.Opti
const lc_writer = lc_buffer.writer();
var ncmds: u32 = 0;
- self.updateLinkeditSegment();
+ self.finalizeDwarfSegment();
try self.writeLinkeditSegmentData(&ncmds, lc_writer);
{
@@ -321,9 +321,9 @@ pub fn swapRemoveRelocs(self: *DebugSymbols, target: u32) void {
}
}
-fn updateLinkeditSegment(self: *DebugSymbols) void {
+fn finalizeDwarfSegment(self: *DebugSymbols) void {
const base_vmaddr = blk: {
- const last_seg = self.base.segments.items[self.base.segments.items.len - 1];
+ const last_seg = self.base.getLinkeditSegmentPtr();
break :blk last_seg.vmaddr + last_seg.vmsize;
};
const dwarf_segment = &self.segments.items[self.dwarf_segment_cmd_index.?];