Skip to content

Commit e845750

Browse files
zhouguangyuan0718gopherbot
authored andcommitted
cmd/compile: fix the missing size for FuncInfoSym
Change-Id: I46543e188bf25384e529a9d5a3095033ac618bbd Reviewed-on: https://go-review.googlesource.com/c/go/+/402057 Run-TryBot: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com>
1 parent a5d61be commit e845750

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/cmd/internal/obj/objfile.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,11 +726,13 @@ func genFuncInfoSyms(ctxt *Link) {
726726
}
727727

728728
o.Write(&b)
729+
p := b.Bytes()
729730
isym := &LSym{
730731
Type: objabi.SDATA, // for now, I don't think it matters
731732
PkgIdx: goobj.PkgIdxSelf,
732733
SymIdx: symidx,
733-
P: append([]byte(nil), b.Bytes()...),
734+
P: append([]byte(nil), p...),
735+
Size: int64(len(p)),
734736
}
735737
isym.Set(AttrIndexed, true)
736738
symidx++

0 commit comments

Comments
 (0)