aboutsummaryrefslogtreecommitdiff
path: root/src/link.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2025-12-08 14:17:52 -0800
committerAndrew Kelley <andrew@ziglang.org>2025-12-23 22:15:08 -0800
commit9f4d40b1f9bffc4137055b8a07f042ecfa398124 (patch)
treebe2a20f7e4f0d09a955c654e6627d147836954da /src/link.zig
parent264d714321d3e5f1f189af393e1fb24d101a7e91 (diff)
downloadzig-9f4d40b1f9bffc4137055b8a07f042ecfa398124.tar.gz
zig-9f4d40b1f9bffc4137055b8a07f042ecfa398124.zip
update all stat() to stat(io)
Diffstat (limited to 'src/link.zig')
-rw-r--r--src/link.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/link.zig b/src/link.zig
index 073ec632c6..06d18ec2d5 100644
--- a/src/link.zig
+++ b/src/link.zig
@@ -1112,10 +1112,10 @@ pub const File = struct {
fn loadGnuLdScript(base: *File, path: Path, parent_query: UnresolvedInput.Query, file: Io.File) anyerror!void {
const comp = base.comp;
+ const io = comp.io;
const diags = &comp.link_diags;
const gpa = comp.gpa;
- const io = comp.io;
- const stat = try file.stat();
+ const stat = try file.stat(io);
const size = std.math.cast(u32, stat.size) orelse return error.FileTooBig;
const buf = try gpa.alloc(u8, size);
defer gpa.free(buf);
@@ -2180,7 +2180,7 @@ fn resolvePathInputLib(
// Appears to be an ELF or archive file.
return finishResolveLibInput(resolved_inputs, test_path, file, link_mode, pq.query);
}
- const stat = file.stat() catch |err|
+ const stat = file.stat(io) catch |err|
fatal("failed to stat {f}: {s}", .{ test_path, @errorName(err) });
const size = std.math.cast(u32, stat.size) orelse
fatal("{f}: linker script too big", .{test_path});