Compare commits

...

1 Commits

Author SHA1 Message Date
c545a8f2bb minor 2025-12-01 16:56:19 +01:00
2 changed files with 3 additions and 1 deletions

View File

@@ -32,6 +32,8 @@ pub fn compileTestApplications(
.pic = pie,
}),
.linkage = if (link_libc) .dynamic else .static,
.use_llvm = true,
.use_lld = true,
});
test_executable.pie = pie;
b.installArtifact(test_executable);

View File

@@ -96,7 +96,7 @@ pub fn main() !void {
const src_ptr = @as([*]u8, @ptrCast(&std.os.argv[arg_index]));
const len = @intFromPtr(end_of_auxv) - @intFromPtr(src_ptr);
assert(@intFromPtr(dest_ptr) < @intFromPtr(src_ptr));
std.mem.copyForwards(u8, dest_ptr[0..len], src_ptr[0..len]);
@memmove(dest_ptr[0..len], src_ptr[0..len]);
// `std.os.argv.ptr` points to the argv pointers. The word just before it is argc and also the
// start of the stack.