aboutsummaryrefslogtreecommitdiff
path: root/src/pkg
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-04-16 17:11:44 -0400
committerRuss Cox <rsc@golang.org>2014-04-16 17:11:44 -0400
commitcc08d9232c4875a11b9e2a8097e069467d79f31f (patch)
tree03a531b03b0221d27193628b1990e2b7baa6f087 /src/pkg
parent0de521d111b88b2bc6466a4e1f29a8a284c0b3ee (diff)
downloadgo-cc08d9232c4875a11b9e2a8097e069467d79f31f.tar.xz
liblink: add leaf bit to object file format
Without the leaf bit, the linker cannot record the correct frame size in the symbol table, and then stack traces get mangled. (Only for ARM.) Fixes #7338. Fixes #7347. LGTM=iant R=iant CC=golang-codereviews https://golang.org/cl/88550043
Diffstat (limited to 'src/pkg')
-rw-r--r--src/pkg/debug/goobj/read.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/pkg/debug/goobj/read.go b/src/pkg/debug/goobj/read.go
index 8882eae534..c2e6fa0927 100644
--- a/src/pkg/debug/goobj/read.go
+++ b/src/pkg/debug/goobj/read.go
@@ -190,6 +190,7 @@ type Var struct {
type Func struct {
Args int // size in bytes of of argument frame: inputs and outputs
Frame int // size in bytes of local variable frame
+ Leaf bool // function omits save of link register (ARM)
Var []Var // detail about local variables
PCSP Data // PC → SP offset map
PCFile Data // PC → file number map (index into File)
@@ -621,6 +622,7 @@ func (r *objReader) parseObject(prefix []byte) error {
s.Func = f
f.Args = r.readInt()
f.Frame = r.readInt()
+ f.Leaf = r.readInt() != 0
f.Var = make([]Var, r.readInt())
for i := range f.Var {
v := &f.Var[i]