From 88b68e6815077a71b10e7cbd801f1962fbce1405 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 15 Apr 2026 11:37:06 +0200 Subject: [PATCH] compiler-rt: export __stack_chk_guard as __guard_local on OpenBSD closes https://codeberg.org/ziglang/zig/issues/31867 --- lib/compiler_rt/ssp.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/compiler_rt/ssp.zig b/lib/compiler_rt/ssp.zig index 403652ea1b..64706f46e6 100644 --- a/lib/compiler_rt/ssp.zig +++ b/lib/compiler_rt/ssp.zig @@ -24,7 +24,7 @@ extern fn memmove(dest: ?[*]u8, src: ?[*]const u8, n: usize) callconv(.c) ?[*]u8 comptime { @export(&__stack_chk_fail, .{ .name = if (builtin.os.tag == .openbsd) "__stack_smash_handler" else "__stack_chk_fail", .linkage = compiler_rt.linkage, .visibility = compiler_rt.visibility }); symbol(&__chk_fail, "__chk_fail"); - symbol(&__stack_chk_guard, "__stack_chk_guard"); + symbol(&__stack_chk_guard, if (builtin.os.tag == .openbsd) "__guard_local" else "__stack_chk_guard"); symbol(&__strcpy_chk, "__strcpy_chk"); symbol(&__strncpy_chk, "__strncpy_chk"); symbol(&__strcat_chk, "__strcat_chk");