]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.regabi] cmd/compile: add Linksym helpers
authorMatthew Dempsky <mdempsky@google.com>
Tue, 29 Dec 2020 03:14:39 +0000 (19:14 -0800)
committerMatthew Dempsky <mdempsky@google.com>
Tue, 29 Dec 2020 07:54:40 +0000 (07:54 +0000)
commit25c613c02dabb45f3a3dc038a8f01c664d98731a
tree9a40e67713e82378a5cecad7e01e287e4c362b57
parent289da2b33ed6292c853017a15d3108d22ea7491a
[dev.regabi] cmd/compile: add Linksym helpers

Syms are meant to be just interned (pkg, name) tuples, and are a
purely abstract, Go-language concept. As such, associating them with
linker symbols (a low-level, implementation-oriented detail) is
inappropriate.

There's still work to be done before linker symbols can be directly
attached to their appropriate, higher-level objects instead. But in
the mean-time, we can at least add helper functions and discourage
folks from using Sym.Linksym directly. The next CL will mechanically
rewrite code to use these helpers where possible.

Passes toolstash -cmp.

Change-Id: I413bd1c80bce056304f9a7343526bd153f2b9c7d
Reviewed-on: https://go-review.googlesource.com/c/go/+/280639
Trust: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
src/cmd/compile/internal/gc/obj.go
src/cmd/compile/internal/ir/func.go
src/cmd/compile/internal/ir/name.go
src/cmd/compile/internal/reflectdata/reflect.go
src/cmd/compile/internal/ssagen/pgen.go
src/cmd/compile/internal/ssagen/ssa.go
src/cmd/compile/internal/staticdata/data.go
src/cmd/compile/internal/types/sym.go
src/cmd/compile/internal/walk/expr.go