1
0
mirror of https://github.com/golang/go synced 2024-11-07 12:36:27 -07:00

[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 <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
This commit is contained in:
Cherry Zhang 2019-10-07 12:44:49 -04:00
parent b0d930577e
commit fcfbe25dca

View File

@ -223,9 +223,6 @@ func preprocess(arch *sys.Arch, s *sym.Symbol) {
} }
s.Attr.Set(sym.AttrReachable, false) 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) { func LoadFull(l *Loader, r *goobj2.Reader, lib *sym.Library, syms *sym.Symbols, localSymVersion int, libByPkg map[string]*sym.Library) {