cmd/internal/goobj, cmd/link: remove funcdataoff

FUNCDATA is always a symbol reference with 0 offset. Assert the
offset is 0 and remove funcdataoff.

Change-Id: I326815365c9db5aeef6b869df5d78a9957bc16a6
Reviewed-on: https://go-review.googlesource.com/c/go/+/352894
Trust: Cherry Mui <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
This commit is contained in:
Cherry Mui 2021-09-28 17:07:01 -04:00
parent 587b3c1192
commit e180e2c27c
6 changed files with 62 additions and 102 deletions

View file

@ -671,10 +671,6 @@ func genFuncInfoSyms(ctxt *Link) {
FuncFlag: fn.FuncFlag,
}
pc := &fn.Pcln
o.Funcdataoff = make([]uint32, len(pc.Funcdataoff))
for i, x := range pc.Funcdataoff {
o.Funcdataoff[i] = uint32(x)
}
i := 0
o.File = make([]goobj.CUFileIndex, len(pc.UsedFiles))
for f := range pc.UsedFiles {