authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2020-11-28 15:01:05+01:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2020-12-01 10:49:31+01:00
log0ef3071db6827427e834475d8d111370cc25a924
tree2939e68bdb30e92ef369ba94f064144c47b74d66
parentc25b3593e726108cb7f208ef538df6979aeb41e1

lld: copy+rename to please the kernel


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

src/link/MachO.zig+3-1
......@@ -852,9 +852,10 @@ fn linkWithLLD(self: *MachO, comp: *Compilation) !void {
852852 // Generate adhoc code signature
853853 var signature = CodeSignature.init(self.base.allocator);
854854 defer signature.deinit();
855 const emit = self.base.options.emit.?;
855856 try signature.calcAdhocSignatureFile(
856857 out_file,
857 self.base.options.emit.?.sub_path,
858 emit.sub_path,
858859 text_cmd,
859860 code_sig,
860861 self.base.options.output_mode,
......@@ -863,6 +864,7 @@ fn linkWithLLD(self: *MachO, comp: *Compilation) !void {
863864 defer self.base.allocator.free(buffer);
864865 signature.write(buffer);
865866 try out_file.pwriteAll(buffer, code_sig.dataoff);
867 try emit.directory.handle.copyFile(emit.sub_path, emit.directory.handle, emit.sub_path, .{});
866868 }
867869 }
868870