From: Cherry Zhang Date: Mon, 7 Oct 2019 16:44:49 +0000 (-0400) Subject: [dev.link] cmd/link: remove runtime.gcbits special case X-Git-Tag: go1.14beta1~292^2^2~75 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=fcfbe25dca8525257a2c265e6bd825b5c4062c6c;p=gostls13.git [dev.link] cmd/link: remove runtime.gcbits special case 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 TryBot-Result: Gobot Gobot Reviewed-by: Than McIntosh --- diff --git a/src/cmd/link/internal/objfile/objfile2.go b/src/cmd/link/internal/objfile/objfile2.go index 5a92fef4ec..1908d21c93 100644 --- a/src/cmd/link/internal/objfile/objfile2.go +++ b/src/cmd/link/internal/objfile/objfile2.go @@ -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) {