aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/reflectdata/reflect.go
diff options
context:
space:
mode:
authorCherry Zhang <cherryyz@google.com>2021-04-23 22:30:38 -0400
committerCherry Zhang <cherryyz@google.com>2021-04-29 23:31:23 +0000
commit1df309eb023973f52b4955ea5b001c0d44961743 (patch)
treeecc7b93f7b8c3bcaaaf903fa579328f92e3664ad /src/cmd/compile/internal/reflectdata/reflect.go
parent897baae953ca812005703d367234b3b867f2a4b0 (diff)
downloadgo-1df309eb023973f52b4955ea5b001c0d44961743.tar.gz
go-1df309eb023973f52b4955ea5b001c0d44961743.zip
cmd/compile: skip types.Sym for GC mask symbols
For GC mask symbols, we don't need to create types.Sym, just the LSym. Change-Id: I285b518cfd60bfaa3202a02b3005a7122daeb338 Reviewed-on: https://go-review.googlesource.com/c/go/+/313512 Trust: Cherry Zhang <cherryyz@google.com> Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com>
Diffstat (limited to 'src/cmd/compile/internal/reflectdata/reflect.go')
-rw-r--r--src/cmd/compile/internal/reflectdata/reflect.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/cmd/compile/internal/reflectdata/reflect.go b/src/cmd/compile/internal/reflectdata/reflect.go
index 26b08ee08a..836174d0ce 100644
--- a/src/cmd/compile/internal/reflectdata/reflect.go
+++ b/src/cmd/compile/internal/reflectdata/reflect.go
@@ -1509,12 +1509,10 @@ func dgcsym(t *types.Type) (lsym *obj.LSym, useGCProg bool, ptrdata int64) {
func dgcptrmask(t *types.Type) *obj.LSym {
ptrmask := make([]byte, (types.PtrDataSize(t)/int64(types.PtrSize)+7)/8)
fillptrmask(t, ptrmask)
- p := fmt.Sprintf("gcbits.%x", ptrmask)
+ p := fmt.Sprintf("runtime.gcbits.%x", ptrmask)
- sym := ir.Pkgs.Runtime.Lookup(p)
- lsym := sym.Linksym()
- if !sym.Uniq() {
- sym.SetUniq(true)
+ lsym := base.Ctxt.Lookup(p)
+ if !lsym.OnList() {
for i, x := range ptrmask {
objw.Uint8(lsym, i, x)
}