This commit is contained in:
2025-12-01 16:56:19 +01:00
parent ba6ab39f91
commit c545a8f2bb
2 changed files with 3 additions and 1 deletions

View File

@@ -32,6 +32,8 @@ pub fn compileTestApplications(
.pic = pie, .pic = pie,
}), }),
.linkage = if (link_libc) .dynamic else .static, .linkage = if (link_libc) .dynamic else .static,
.use_llvm = true,
.use_lld = true,
}); });
test_executable.pie = pie; test_executable.pie = pie;
b.installArtifact(test_executable); 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 src_ptr = @as([*]u8, @ptrCast(&std.os.argv[arg_index]));
const len = @intFromPtr(end_of_auxv) - @intFromPtr(src_ptr); const len = @intFromPtr(end_of_auxv) - @intFromPtr(src_ptr);
assert(@intFromPtr(dest_ptr) < @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 // `std.os.argv.ptr` points to the argv pointers. The word just before it is argc and also the
// start of the stack. // start of the stack.