mirror of
https://github.com/ziglang/zig.git
synced 2025-02-05 12:20:35 +00:00
zld: cleanup redundant changes
This commit is contained in:
parent
db30033de2
commit
a5bbc66f10
@ -903,10 +903,10 @@ fn linkWithLLD(self: *MachO, comp: *Compilation) !void {
|
||||
self.base.allocator.free(result.stderr);
|
||||
}
|
||||
if (result.stdout.len != 0) {
|
||||
log.debug("unexpected LD stdout: {s}", .{result.stdout});
|
||||
log.warn("unexpected LD stdout: {s}", .{result.stdout});
|
||||
}
|
||||
if (result.stderr.len != 0) {
|
||||
log.debug("unexpected LD stderr: {s}", .{result.stderr});
|
||||
log.warn("unexpected LD stderr: {s}", .{result.stderr});
|
||||
}
|
||||
if (result.term != .Exited or result.term.Exited != 0) {
|
||||
// TODO parse this output and surface with the Compilation API rather than
|
||||
@ -971,7 +971,7 @@ fn linkWithLLD(self: *MachO, comp: *Compilation) !void {
|
||||
}
|
||||
|
||||
if (stderr.len != 0) {
|
||||
log.debug("unexpected LLD stderr:\n{s}", .{stderr});
|
||||
log.warn("unexpected LLD stderr:\n{s}", .{stderr});
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -981,11 +981,11 @@ fn linkWithLLD(self: *MachO, comp: *Compilation) !void {
|
||||
// Update the file with the digest. If it fails we can continue; it only
|
||||
// means that the next invocation will have an unnecessary cache miss.
|
||||
Cache.writeSmallFile(directory.handle, id_symlink_basename, &digest) catch |err| {
|
||||
log.debug("failed to save linking hash digest file: {s}", .{@errorName(err)});
|
||||
log.warn("failed to save linking hash digest file: {s}", .{@errorName(err)});
|
||||
};
|
||||
// Again failure here only means an unnecessary cache miss.
|
||||
man.writeManifest() catch |err| {
|
||||
log.debug("failed to write cache manifest when linking: {s}", .{@errorName(err)});
|
||||
log.warn("failed to write cache manifest when linking: {s}", .{@errorName(err)});
|
||||
};
|
||||
// We hang on to this lock so that the output file path can be used without
|
||||
// other processes clobbering it.
|
||||
|
@ -31,7 +31,7 @@ pub const Signed = struct {
|
||||
|
||||
pub fn resolve(signed: Signed, args: Relocation.ResolveArgs) !void {
|
||||
const target_addr = target_addr: {
|
||||
if (signed.base.target == .section) {
|
||||
if (signed.base.target == .section) {
|
||||
const source_target = @intCast(i64, signed.base.offset) + signed.addend + 4 + signed.correction;
|
||||
const source_disp = source_target - @intCast(i64, args.source_sect_addr.?);
|
||||
break :target_addr @intCast(i64, args.target_addr) + source_disp;
|
||||
@ -50,7 +50,6 @@ pub const Signed = struct {
|
||||
|
||||
pub const GotLoad = struct {
|
||||
base: Relocation,
|
||||
op: *u8,
|
||||
|
||||
pub const base_type: Relocation.Type = .got_load;
|
||||
|
||||
@ -224,7 +223,6 @@ pub const Parser = struct {
|
||||
.offset = offset,
|
||||
.target = target,
|
||||
},
|
||||
.op = &parser.code[offset - 2],
|
||||
};
|
||||
|
||||
log.debug(" | emitting {}", .{got_load});
|
||||
|
Loading…
Reference in New Issue
Block a user