aboutsummaryrefslogtreecommitdiff
path: root/src/link/MachO.zig
diff options
context:
space:
mode:
authorJakub Konka <kubkon@jakubkonka.com>2020-12-27 09:47:56 +0100
committerJakub Konka <kubkon@jakubkonka.com>2020-12-31 10:19:04 +0100
commitcf9434191004e57e1cd3a75dcd91d5ad7e378c63 (patch)
tree071e004dee01fff3ef720632657fad1ecafc22a9 /src/link/MachO.zig
parentbd99a87dc224b7d84e764fc2a8a8f4e3068078b3 (diff)
downloadzig-cf9434191004e57e1cd3a75dcd91d5ad7e378c63.tar.gz
zig-cf9434191004e57e1cd3a75dcd91d5ad7e378c63.zip
macho: write Mach-O dSym header
Diffstat (limited to 'src/link/MachO.zig')
-rw-r--r--src/link/MachO.zig6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/link/MachO.zig b/src/link/MachO.zig
index 5d5a5d76b2..c8449fbe1a 100644
--- a/src/link/MachO.zig
+++ b/src/link/MachO.zig
@@ -299,6 +299,7 @@ pub fn openPath(allocator: *Allocator, sub_path: []const u8, options: link.Optio
}
try self.populateMissingMetadata();
+ try self.d_sym.?.populateMissingMetadata(allocator);
return self;
}
@@ -352,6 +353,11 @@ pub fn flushModule(self: *MachO, comp: *Compilation) !void {
try self.writeStringTable();
try self.updateLinkeditSegmentSizes();
+ if (self.d_sym) |*ds| {
+ // Flush debug symbols bundle.
+ try ds.flush();
+ }
+
if (target.cpu.arch == .aarch64) {
// Preallocate space for the code signature.
// We need to do this at this stage so that we have the load commands with proper values