From 1e3570ac86f6aeb7f8ce70b5ad236a5dd92ec804 Mon Sep 17 00:00:00 2001 From: Matthew Dempsky Date: Tue, 18 Apr 2017 12:53:25 -0700 Subject: cmd/internal/objabi: extract shared functionality from obj Now only cmd/asm and cmd/compile depend on cmd/internal/obj. Changing the assembler backends no longer requires reinstalling cmd/link or cmd/addr2line. There's also now one canonical definition of the object file format in cmd/internal/objabi/doc.go, with a warning to update all three implementations. objabi is still something of a grab bag of unrelated code (e.g., flag and environment variable handling probably belong in a separate "tool" package), but this is still progress. Fixes #15165. Fixes #20026. Change-Id: Ic4b92fac7d0d35438e0d20c9579aad4085c5534c Reviewed-on: https://go-review.googlesource.com/40972 Run-TryBot: Matthew Dempsky TryBot-Result: Gobot Gobot Reviewed-by: Josh Bleecher Snyder --- src/cmd/internal/objabi/stack.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/cmd/internal/objabi/stack.go (limited to 'src/cmd/internal/objabi/stack.go') diff --git a/src/cmd/internal/objabi/stack.go b/src/cmd/internal/objabi/stack.go new file mode 100644 index 0000000000..11433932e2 --- /dev/null +++ b/src/cmd/internal/objabi/stack.go @@ -0,0 +1,20 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package objabi + +// For the linkers. Must match Go definitions. + +const ( + STACKSYSTEM = 0 + StackSystem = STACKSYSTEM + StackBig = 4096 + StackGuard = 880*stackGuardMultiplier + StackSystem + StackSmall = 128 + StackLimit = StackGuard - StackSystem - StackSmall +) + +const ( + StackPreempt = -1314 // 0xfff...fade +) -- cgit v1.3-5-g9baa