zig/test/link/bss/main.zig
Andrew Kelley e122cd6312 new linker test harness
It's simpler and it takes advantage of
`std.Build.addAnonymousDependency`, which has a number of benefits,
including concurrenc and preventing extra zig-cache and zig-out
directories being created.

4 tests are ported over as an example.
2023-03-15 10:48:14 -07:00

14 lines
312 B
Zig

const std = @import("std");
// Stress test zerofill layout
var buffer: [0x1000000]u64 = [1]u64{0} ** 0x1000000;
pub fn main() anyerror!void {
buffer[0x10] = 1;
try std.io.getStdOut().writer().print("{d}, {d}, {d}\n", .{
buffer[0],
buffer[0x10],
buffer[0x1000000 - 1],
});
}