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 {...@@ -903,10 +903,10 @@ fn linkWithLLD(self: *MachO, comp: *Compilation) !void {
903 self.base.allocator.free(result.stderr);903 self.base.allocator.free(result.stderr);
904 }904 }
905 if (result.stdout.len != 0) {905 if (result.stdout.len != 0) {
906 log.debug("unexpected LD stdout: {s}", .{result.stdout});906 log.warn("unexpected LD stdout: {s}", .{result.stdout});
907 }907 }
908 if (result.stderr.len != 0) {908 if (result.stderr.len != 0) {
909 log.debug("unexpected LD stderr: {s}", .{result.stderr});909 log.warn("unexpected LD stderr: {s}", .{result.stderr});
910 }910 }
911 if (result.term != .Exited or result.term.Exited != 0) {911 if (result.term != .Exited or result.term.Exited != 0) {
912 // TODO parse this output and surface with the Compilation API rather than912 // TODO parse this output and surface with the Compilation API rather than
...@@ -971,7 +971,7 @@ fn linkWithLLD(self: *MachO, comp: *Compilation) !void {...@@ -971,7 +971,7 @@ fn linkWithLLD(self: *MachO, comp: *Compilation) !void {
971 }971 }
972972
973 if (stderr.len != 0) {973 if (stderr.len != 0) {
974 log.debug("unexpected LLD stderr:\n{s}", .{stderr});974 log.warn("unexpected LLD stderr:\n{s}", .{stderr});
975 }975 }
976 }976 }
977 }977 }
...@@ -981,11 +981,11 @@ fn linkWithLLD(self: *MachO, comp: *Compilation) !void {...@@ -981,11 +981,11 @@ fn linkWithLLD(self: *MachO, comp: *Compilation) !void {
981 // Update the file with the digest. If it fails we can continue; it only981 // Update the file with the digest. If it fails we can continue; it only
982 // means that the next invocation will have an unnecessary cache miss.982 // means that the next invocation will have an unnecessary cache miss.
983 Cache.writeSmallFile(directory.handle, id_symlink_basename, &digest) catch |err| {983 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)});
985 };985 };
986 // Again failure here only means an unnecessary cache miss.986 // Again failure here only means an unnecessary cache miss.
987 man.writeManifest() catch |err| {987 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)});
989 };989 };
990 // We hang on to this lock so that the output file path can be used without990 // We hang on to this lock so that the output file path can be used without
991 // other processes clobbering it.991 // other processes clobbering it.
src/link/MachO/reloc/x86_64.zig+1-3
...@@ -31,7 +31,7 @@ pub const Signed = struct {...@@ -31,7 +31,7 @@ pub const Signed = struct {
3131
32 pub fn resolve(signed: Signed, args: Relocation.ResolveArgs) !void {32 pub fn resolve(signed: Signed, args: Relocation.ResolveArgs) !void {
33 const target_addr = target_addr: {33 const target_addr = target_addr: {
34 if (signed.base.target == .section) {34 if (signed.base.target == .section) {
35 const source_target = @intCast(i64, signed.base.offset) + signed.addend + 4 + signed.correction;35 const source_target = @intCast(i64, signed.base.offset) + signed.addend + 4 + signed.correction;
36 const source_disp = source_target - @intCast(i64, args.source_sect_addr.?);36 const source_disp = source_target - @intCast(i64, args.source_sect_addr.?);
37 break :target_addr @intCast(i64, args.target_addr) + source_disp;37 break :target_addr @intCast(i64, args.target_addr) + source_disp;
...@@ -50,7 +50,6 @@ pub const Signed = struct {...@@ -50,7 +50,6 @@ pub const Signed = struct {
5050
51pub const GotLoad = struct {51pub const GotLoad = struct {
52 base: Relocation,52 base: Relocation,
53 op: *u8,
5453
55 pub const base_type: Relocation.Type = .got_load;54 pub const base_type: Relocation.Type = .got_load;
5655
...@@ -224,7 +223,6 @@ pub const Parser = struct {...@@ -224,7 +223,6 @@ pub const Parser = struct {
224 .offset = offset,223 .offset = offset,
225 .target = target,224 .target = target,
226 },225 },
227 .op = &parser.code[offset - 2],
228 };226 };
229227
230 log.debug(" | emitting {}", .{got_load});228 log.debug(" | emitting {}", .{got_load});