]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.link] cmd/compile: make GC map symbols content-addressable
authorCherry Zhang <cherryyz@google.com>
Sun, 12 Jul 2020 21:15:35 +0000 (17:15 -0400)
committerCherry Zhang <cherryyz@google.com>
Thu, 16 Jul 2020 18:44:15 +0000 (18:44 +0000)
Change-Id: I20e5b580b3e0505473816fe7f277a74e13d33e64
Reviewed-on: https://go-review.googlesource.com/c/go/+/242080
Reviewed-by: Jeremy Faller <jeremy@golang.org>
src/cmd/compile/internal/gc/plive.go
src/cmd/compile/internal/gc/reflect.go

index 7e1c0c1a9590fd4efc4be7f1580df754d6041899..b366c8a4a0a26b25c10e6627757e119ca920eaa0 100644 (file)
@@ -1563,6 +1563,7 @@ func (lv *Liveness) emit() (argsSym, liveSym, regsSym *obj.LSym) {
        makeSym := func(tmpSym *obj.LSym) *obj.LSym {
                return Ctxt.LookupInit(fmt.Sprintf("gclocals·%x", md5.Sum(tmpSym.P)), func(lsym *obj.LSym) {
                        lsym.P = tmpSym.P
+                       lsym.Set(obj.AttrContentAddressable, true)
                })
        }
        if !go115ReduceLiveness {
index f614b60685e4b1f6038478b38f2d78093c04b558..05e64a5a9a1b6d57938afecfee5d55df65bd48b2 100644 (file)
@@ -1715,6 +1715,7 @@ func dgcptrmask(t *types.Type) *obj.LSym {
                        duint8(lsym, i, x)
                }
                ggloblsym(lsym, int32(len(ptrmask)), obj.DUPOK|obj.RODATA|obj.LOCAL)
+               lsym.Set(obj.AttrContentAddressable, true)
        }
        return lsym
 }