diff options
| author | Alex Rønne Petersen <alex@alexrp.com> | 2025-01-18 13:54:05 +0100 |
|---|---|---|
| committer | Alex Rønne Petersen <alex@alexrp.com> | 2025-01-19 02:15:30 +0100 |
| commit | 4de661ef18d4cdc7f859c8bc1990e8a0519163db (patch) | |
| tree | 87f69ac67d27c80f3edae8eb425f050b6ecceb62 /lib/std/start.zig | |
| parent | 566cc4f99d03075f396b3ca13ee140fdcd80d37a (diff) | |
| download | zig-4de661ef18d4cdc7f859c8bc1990e8a0519163db.tar.gz zig-4de661ef18d4cdc7f859c8bc1990e8a0519163db.zip | |
start: Don't emit CFI directives if unwind tables are disabled.
Diffstat (limited to 'lib/std/start.zig')
| -rw-r--r-- | lib/std/start.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/start.zig b/lib/std/start.zig index 9da0cb2ec6..8b0d6183cf 100644 --- a/lib/std/start.zig +++ b/lib/std/start.zig @@ -231,8 +231,8 @@ fn _start() callconv(.naked) noreturn { } // This is the first userspace frame. Prevent DWARF-based unwinders from unwinding further. We - // prevent FP-based unwinders from unwinding further by zeroing the register further below. - asm volatile (switch (native_arch) { + // prevent FP-based unwinders from unwinding further by zeroing the register below. + if (builtin.unwind_tables != .none or !builtin.strip_debug_info) asm volatile (switch (native_arch) { .arc => ".cfi_undefined blink", .arm, .armeb, .thumb, .thumbeb => "", // https://github.com/llvm/llvm-project/issues/115891 .aarch64, .aarch64_be => ".cfi_undefined lr", |
