aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal/objabi/stack.go
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2023-04-20 16:10:15 +0000
committerAustin Clements <austin@google.com>2023-04-20 16:19:49 +0000
commit466e6dae9570ac88ef15c5f1bda9a59d7253cfee (patch)
tree916fcafde3a860e6c399a6342d4ac2c426113ef2 /src/cmd/internal/objabi/stack.go
parentd11ff3f08155b7614485d9b555e97f7a9555ede5 (diff)
downloadgo-466e6dae9570ac88ef15c5f1bda9a59d7253cfee.tar.xz
Revert "internal/abi, runtime, cmd: merge StackSmall, StackBig consts into internal/abi"
This reverts commit CL 486379. Submitted out of order and breaks bootstrap. Change-Id: Ie20a61cc56efc79a365841293ca4e7352b02d86b Reviewed-on: https://go-review.googlesource.com/c/go/+/486917 TryBot-Bypass: Austin Clements <austin@google.com> Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'src/cmd/internal/objabi/stack.go')
-rw-r--r--src/cmd/internal/objabi/stack.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/cmd/internal/objabi/stack.go b/src/cmd/internal/objabi/stack.go
index 5a2f641a75..88b4990d5e 100644
--- a/src/cmd/internal/objabi/stack.go
+++ b/src/cmd/internal/objabi/stack.go
@@ -4,22 +4,21 @@
package objabi
-import (
- "internal/abi"
- "internal/buildcfg"
-)
+import "internal/buildcfg"
// For the linkers. Must match Go definitions.
const (
STACKSYSTEM = 0
StackSystem = STACKSYSTEM
+ StackBig = 4096
+ StackSmall = 128
)
func StackLimit(race bool) int {
// This arithmetic must match that in runtime/stack.go:{_StackGuard,_StackLimit}.
stackGuard := 928*stackGuardMultiplier(race) + StackSystem
- stackLimit := stackGuard - StackSystem - abi.StackSmall
+ stackLimit := stackGuard - StackSystem - StackSmall
return stackLimit
}