diff options
| author | Matthew Dempsky <mdempsky@google.com> | 2017-04-18 12:53:25 -0700 |
|---|---|---|
| committer | Matthew Dempsky <mdempsky@google.com> | 2017-04-19 00:00:09 +0000 |
| commit | 1e3570ac86f6aeb7f8ce70b5ad236a5dd92ec804 (patch) | |
| tree | 6bb1e704f068dee9f7e95eb0d1b5ed1829441c8b /src/cmd/internal/objabi/funcdata.go | |
| parent | f71f32e5e155ae5b7f60005c939746637086f30e (diff) | |
| download | go-1e3570ac86f6aeb7f8ce70b5ad236a5dd92ec804.tar.xz | |
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 <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Diffstat (limited to 'src/cmd/internal/objabi/funcdata.go')
| -rw-r--r-- | src/cmd/internal/objabi/funcdata.go | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/cmd/internal/objabi/funcdata.go b/src/cmd/internal/objabi/funcdata.go new file mode 100644 index 0000000000..80874edeb0 --- /dev/null +++ b/src/cmd/internal/objabi/funcdata.go @@ -0,0 +1,25 @@ +// Copyright 2013 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 + +// This file defines the IDs for PCDATA and FUNCDATA instructions +// in Go binaries. +// +// These must agree with ../../../runtime/funcdata.h and +// ../../../runtime/symtab.go. + +const ( + PCDATA_StackMapIndex = 0 + PCDATA_InlTreeIndex = 1 + FUNCDATA_ArgsPointerMaps = 0 + FUNCDATA_LocalsPointerMaps = 1 + FUNCDATA_InlTree = 2 + + // ArgsSizeUnknown is set in Func.argsize to mark all functions + // whose argument size is unknown (C vararg functions, and + // assembly code without an explicit specification). + // This value is generated by the compiler, assembler, or linker. + ArgsSizeUnknown = -0x80000000 +) |
