mirror of
https://github.com/golang/go
synced 2024-11-22 20:50:05 -07:00
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>
This commit is contained in:
parent
897baae953
commit
1df309eb02
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user