minor
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
@@ -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.
|
||||||
|
|||||||
Reference in New Issue
Block a user