aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/asm_arm.s
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/runtime/asm_arm.s')
-rw-r--r--src/pkg/runtime/asm_arm.s4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pkg/runtime/asm_arm.s b/src/pkg/runtime/asm_arm.s
index fed9b30215..d4bcbd5a91 100644
--- a/src/pkg/runtime/asm_arm.s
+++ b/src/pkg/runtime/asm_arm.s
@@ -28,6 +28,7 @@ TEXT _rt0_arm(SB),7,$-4
// create istack out of the OS stack
MOVW $(-8192+104)(R13), R0
MOVW R0, g_stackguard(g) // (w 104b guard)
+ MOVW R0, g_stackguard0(g)
MOVW R13, g_stackbase(g)
BL runtime·emptyfunc(SB) // fault if stack check is wrong
@@ -36,6 +37,9 @@ TEXT _rt0_arm(SB),7,$-4
CMP $0, R2
MOVW.NE g, R0 // first argument of _cgo_init is g
BL.NE (R2) // will clobber R0-R3
+ // update stackguard after _cgo_init
+ MOVW g_stackguard0(g), R0
+ MOVW R0, g_stackguard(g)
BL runtime·checkgoarm(SB)
BL runtime·check(SB)