zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit b3f3db46bec83bd467f4e0759ab58965aa3a8459 (tree)
parent 25ea8f7dbb279d62d352db0cae43e620d9e2b5e9
Author: Andrew Kelley <superjoe30@gmail.com>
Date:   Mon,  2 Oct 2017 00:22:24 -0400

compiler-rt: strong linkage for __chkstk

otherwise we get undefined symbol errors

Diffstat:
Mstd/special/compiler_rt/index.zig | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/std/special/compiler_rt/index.zig b/std/special/compiler_rt/index.zig @@ -27,6 +27,7 @@ const win64 = builtin.os == builtin.Os.windows and builtin.arch == builtin.Arch. const win32_nocrt = win32 and !builtin.link_libc; const win64_nocrt = win64 and !builtin.link_libc; const linkage = if (builtin.is_test) builtin.GlobalLinkage.Internal else builtin.GlobalLinkage.LinkOnce; +const strong_linkage = if (builtin.is_test) builtin.GlobalLinkage.Internal else builtin.GlobalLinkage.Strong; const __udivmoddi4 = @import("udivmoddi4.zig").__udivmoddi4; @@ -125,7 +126,7 @@ export nakedcc fn _chkstk() align(4) { @setDebugSafety(this, false); if (win32_nocrt) { - @setGlobalLinkage(_chkstk, linkage); + @setGlobalLinkage(_chkstk, strong_linkage); asm volatile ( \\ push %%ecx \\ cmp $0x1000,%%eax @@ -158,7 +159,7 @@ export nakedcc fn __chkstk() align(4) { @setDebugSafety(this, false); if (win64_nocrt) { - @setGlobalLinkage(__chkstk, linkage); + @setGlobalLinkage(__chkstk, strong_linkage); asm volatile ( \\ push %%rcx \\ cmp $0x1000,%%rax