start: remove riscv condition

This commit is contained in:
David Rubin 2024-07-31 11:46:01 -07:00
parent 9c7aade488
commit 2b8a71489a
No known key found for this signature in database
GPG Key ID: A4390FEB5F00C0A5

View File

@ -465,21 +465,18 @@ fn posixCallMainAndExit(argc_argv_ptr: [*]usize) callconv(.C) noreturn {
// to ask for more stack space. // to ask for more stack space.
expandStackSize(phdrs); expandStackSize(phdrs);
// Disabled with the riscv backend because it cannot handle this code yet. const opt_init_array_start = @extern([*]*const fn () callconv(.C) void, .{
if (builtin.zig_backend != .stage2_riscv64) { .name = "__init_array_start",
const opt_init_array_start = @extern([*]*const fn () callconv(.C) void, .{ .linkage = .weak,
.name = "__init_array_start", });
.linkage = .weak, const opt_init_array_end = @extern([*]*const fn () callconv(.C) void, .{
}); .name = "__init_array_end",
const opt_init_array_end = @extern([*]*const fn () callconv(.C) void, .{ .linkage = .weak,
.name = "__init_array_end", });
.linkage = .weak, if (opt_init_array_start) |init_array_start| {
}); const init_array_end = opt_init_array_end.?;
if (opt_init_array_start) |init_array_start| { const slice = init_array_start[0 .. init_array_end - init_array_start];
const init_array_end = opt_init_array_end.?; for (slice) |func| func();
const slice = init_array_start[0 .. init_array_end - init_array_start];
for (slice) |func| func();
}
} }
} }