authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-06-16 00:55:01+02:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-06-16 23:11:08-04:00
logc533233f4211f353ca532da48132ee4069ba2841
tree0e4f51f94fd97b8b5dfdcc1dfe04a0c59648df97
parent96501d338550f47671692c669cb76eb99513a8da

Revert "start: workaround for LLVM 17 regression"

This reverts commit d7daf7c203f583ed440efc68df6ee690ee8f8f32. This is no longer needed with the LLVM 18 upgrade, and it was breaking PIE. Closes #20306.

1 files changed, 1 insertions(+), 10 deletions(-)

lib/std/start.zig+1-10
......@@ -255,14 +255,6 @@ fn _start() callconv(.Naked) noreturn {
255255 : [tos] "={rax}" (-> *std.os.plan9.Tos),
256256 );
257257 }
258 switch (native_arch) {
259 // https://github.com/ziglang/zig/issues/16799
260 .riscv64 => @export(argc_argv_ptr, .{
261 .name = "__zig_argc_argv_ptr",
262 .visibility = .hidden,
263 }),
264 else => {},
265 }
266258 asm volatile (switch (native_arch) {
267259 .x86_64 =>
268260 \\ xorl %%ebp, %%ebp
......@@ -293,8 +285,7 @@ fn _start() callconv(.Naked) noreturn {
293285 .riscv64 =>
294286 \\ li s0, 0
295287 \\ li ra, 0
296 \\ lui a0, %hi(__zig_argc_argv_ptr)
297 \\ sd sp, %lo(__zig_argc_argv_ptr)(a0)
288 \\ sd sp, %[argc_argv_ptr]
298289 \\ andi sp, sp, -16
299290 \\ tail %[posixCallMainAndExit]@plt
300291 ,