authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2021-04-13 09:02:11+02:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2021-04-13 10:56:03+02:00
loga5bbc66f10339cb2e17ef996ef097b696980595a
tree5ab4ef1c31285129c460d928b1bb30a02a598f08
parentdb30033de209fb2132145ffc7aac7d4c79d6bbb9

zld: cleanup redundant changes


2 files changed, 6 insertions(+), 8 deletions(-)

src/link/MachO.zig+5-5
......@@ -903,10 +903,10 @@ fn linkWithLLD(self: *MachO, comp: *Compilation) !void {
903903 self.base.allocator.free(result.stderr);
904904 }
905905 if (result.stdout.len != 0) {
906 log.debug("unexpected LD stdout: {s}", .{result.stdout});
906 log.warn("unexpected LD stdout: {s}", .{result.stdout});
907907 }
908908 if (result.stderr.len != 0) {
909 log.debug("unexpected LD stderr: {s}", .{result.stderr});
909 log.warn("unexpected LD stderr: {s}", .{result.stderr});
910910 }
911911 if (result.term != .Exited or result.term.Exited != 0) {
912912 // TODO parse this output and surface with the Compilation API rather than
......@@ -971,7 +971,7 @@ fn linkWithLLD(self: *MachO, comp: *Compilation) !void {
971971 }
972972
973973 if (stderr.len != 0) {
974 log.debug("unexpected LLD stderr:\n{s}", .{stderr});
974 log.warn("unexpected LLD stderr:\n{s}", .{stderr});
975975 }
976976 }
977977 }
......@@ -981,11 +981,11 @@ fn linkWithLLD(self: *MachO, comp: *Compilation) !void {
981981 // Update the file with the digest. If it fails we can continue; it only
982982 // means that the next invocation will have an unnecessary cache miss.
983983 Cache.writeSmallFile(directory.handle, id_symlink_basename, &digest) catch |err| {
984 log.debug("failed to save linking hash digest file: {s}", .{@errorName(err)});
984 log.warn("failed to save linking hash digest file: {s}", .{@errorName(err)});
985985 };
986986 // Again failure here only means an unnecessary cache miss.
987987 man.writeManifest() catch |err| {
988 log.debug("failed to write cache manifest when linking: {s}", .{@errorName(err)});
988 log.warn("failed to write cache manifest when linking: {s}", .{@errorName(err)});
989989 };
990990 // We hang on to this lock so that the output file path can be used without
991991 // other processes clobbering it.
src/link/MachO/reloc/x86_64.zig+1-3
......@@ -31,7 +31,7 @@ pub const Signed = struct {
3131
3232 pub fn resolve(signed: Signed, args: Relocation.ResolveArgs) !void {
3333 const target_addr = target_addr: {
34 if (signed.base.target == .section) {
34 if (signed.base.target == .section) {
3535 const source_target = @intCast(i64, signed.base.offset) + signed.addend + 4 + signed.correction;
3636 const source_disp = source_target - @intCast(i64, args.source_sect_addr.?);
3737 break :target_addr @intCast(i64, args.target_addr) + source_disp;
......@@ -50,7 +50,6 @@ pub const Signed = struct {
5050
5151pub const GotLoad = struct {
5252 base: Relocation,
53 op: *u8,
5453
5554 pub const base_type: Relocation.Type = .got_load;
5655
......@@ -224,7 +223,6 @@ pub const Parser = struct {
224223 .offset = offset,
225224 .target = target,
226225 },
227 .op = &parser.code[offset - 2],
228226 };
229227
230228 log.debug(" | emitting {}", .{got_load});