| ... | @@ -272,6 +272,12 @@ fn _start() callconv(.Naked) noreturn { | ... | @@ -272,6 +272,12 @@ fn _start() callconv(.Naked) noreturn { |
| 272 | : [tos] "={rax}" (-> *std.os.plan9.Tos), | 272 | : [tos] "={rax}" (-> *std.os.plan9.Tos), |
| 273 | ); | 273 | ); |
| 274 | } | 274 | } |
| | 275 | |
| | 276 | // Note that we maintain a very low level of trust with regards to ABI guarantees at this point. |
| | 277 | // We will redundantly align the stack, clear the link register, etc. While e.g. the Linux |
| | 278 | // kernel is usually good about upholding the ABI guarantees, the same cannot be said of dynamic |
| | 279 | // linkers; musl's ldso, for example, opts to not align the stack when invoking the dynamic |
| | 280 | // linker explicitly. |
| 275 | asm volatile (switch (native_arch) { | 281 | asm volatile (switch (native_arch) { |
| 276 | .x86_64 => | 282 | .x86_64 => |
| 277 | \\ xorl %%ebp, %%ebp | 283 | \\ xorl %%ebp, %%ebp |