]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.link] cmd/link: remove runtime.gcbits special case
authorCherry Zhang <cherryyz@google.com>
Mon, 7 Oct 2019 16:44:49 +0000 (12:44 -0400)
committerCherry Zhang <cherryyz@google.com>
Tue, 8 Oct 2019 19:15:17 +0000 (19:15 +0000)
Follow-up of Than's comment on CL 196032. For runtime.gcbits
symbols, the compiler already sets the "local" attribute
(cmd/compile/internal/gc/reflect.go:dgcptrmask). No need of the
special handling in the linker.

Change-Id: I7c53a818ed0375083f04655f3565c1c9c45f2401
Reviewed-on: https://go-review.googlesource.com/c/go/+/199642
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
src/cmd/link/internal/objfile/objfile2.go

index 5a92fef4ec18195b2e5407cf431458cb313405f6..1908d21c931e1bc0e9070cf895ece6a238364b54 100644 (file)
@@ -223,9 +223,6 @@ func preprocess(arch *sys.Arch, s *sym.Symbol) {
                }
                s.Attr.Set(sym.AttrReachable, false)
        }
-       if strings.HasPrefix(s.Name, "runtime.gcbits.") {
-               s.Attr |= sym.AttrLocal
-       }
 }
 
 func LoadFull(l *Loader, r *goobj2.Reader, lib *sym.Library, syms *sym.Symbols, localSymVersion int, libByPkg map[string]*sym.Library) {