]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: fix the missing size for FuncInfoSym
authorzhouguangyuan <zhouguangyuan.xian@gmail.com>
Mon, 25 Apr 2022 08:36:01 +0000 (16:36 +0800)
committerGopher Robot <gobot@golang.org>
Mon, 25 Apr 2022 23:45:52 +0000 (23:45 +0000)
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>

src/cmd/internal/obj/objfile.go

index c980a7cf2c57ab801f0d77cdd37fbe5e78e66909..2f7ce061d433c7ec128767acc7ade0aace6e9d7a 100644 (file)
@@ -726,11 +726,13 @@ func genFuncInfoSyms(ctxt *Link) {
                }
 
                o.Write(&b)
+               p := b.Bytes()
                isym := &LSym{
                        Type:   objabi.SDATA, // for now, I don't think it matters
                        PkgIdx: goobj.PkgIdxSelf,
                        SymIdx: symidx,
-                       P:      append([]byte(nil), b.Bytes()...),
+                       P:      append([]byte(nil), p...),
+                       Size:   int64(len(p)),
                }
                isym.Set(AttrIndexed, true)
                symidx++