diff options
author | Matthew Dempsky <mdempsky@google.com> | 2020-12-28 21:01:34 -0800 |
---|---|---|
committer | Matthew Dempsky <mdempsky@google.com> | 2020-12-29 07:55:00 +0000 |
commit | a5ec920160da51166ee22ac0e5335f51a5d36d8e (patch) | |
tree | 8a3bf83d733873d3f4f9ccbc8f65fb18eef377fd /src/cmd/compile/internal/pkginit | |
parent | ec59b197d5d92ad758c3214d906f9c750cd5b84e (diff) | |
download | go-a5ec920160da51166ee22ac0e5335f51a5d36d8e.tar.gz go-a5ec920160da51166ee22ac0e5335f51a5d36d8e.zip |
[dev.regabi] cmd/compile: more Linksym cleanup
This largely gets rid of the remaining direct Linksym calls, hopefully
enough to discourage people from following bad existing practice until
Sym.Linksym can be removed entirely.
Passes toolstash -cmp.
Change-Id: I5d8f8f703ace7256538fc79648891ede0d879dc2
Reviewed-on: https://go-review.googlesource.com/c/go/+/280641
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>
Diffstat (limited to 'src/cmd/compile/internal/pkginit')
-rw-r--r-- | src/cmd/compile/internal/pkginit/init.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/compile/internal/pkginit/init.go b/src/cmd/compile/internal/pkginit/init.go index 8e3592700c..f1ffbb5933 100644 --- a/src/cmd/compile/internal/pkginit/init.go +++ b/src/cmd/compile/internal/pkginit/init.go @@ -56,7 +56,7 @@ func Task() *ir.Name { typecheck.Stmts(nf) ir.CurFunc = nil typecheck.Target.Decls = append(typecheck.Target.Decls, fn) - fns = append(fns, initializers.Linksym()) + fns = append(fns, fn.Linksym()) } if typecheck.InitTodoFunc.Dcl != nil { // We only generate temps using initTodo if there @@ -87,7 +87,7 @@ func Task() *ir.Name { task.SetType(types.Types[types.TUINT8]) // fake type task.Class_ = ir.PEXTERN sym.Def = task - lsym := sym.Linksym() + lsym := task.Linksym() ot := 0 ot = objw.Uintptr(lsym, ot, 0) // state: not initialized yet ot = objw.Uintptr(lsym, ot, uint64(len(deps))) |