cmd/internal/obj: remove Linklookup

It was simply a wrapper around Link.Lookup.
Unwrap everything.

CL prepared using eg with template:

package p

import "cmd/internal/obj"

func before(ctxt *obj.Link, name string, version int) *obj.LSym {
	return obj.Linklookup(ctxt, name, version)
}

func after(ctxt *obj.Link, name string, version int) *obj.LSym {
	return ctxt.Lookup(name, version)
}

Then one comment in cmd/asm/internal/asm/parse.go
was manually updated (and gofmt'ed!),
and func Linklookup deleted.

Passes toolstash-check (as a sanity measure).

Change-Id: Icc4d56b0b2b5c8888d3184c1898c48359ea1e638
Reviewed-on: https://go-review.googlesource.com/39715
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Josh Bleecher Snyder 2017-04-06 09:54:14 -07:00
parent 2c1888bf48
commit c311488283
18 changed files with 75 additions and 79 deletions

View file

@ -242,7 +242,7 @@ func Linksym(s *Sym) *obj.LSym {
name = s.Pkg.Prefix + "." + s.Name
}
ls := obj.Linklookup(Ctxt, name, 0)
ls := Ctxt.Lookup(name, 0)
s.Lsym = ls
return ls
}
@ -302,7 +302,7 @@ func stringsym(s string) (data *obj.LSym) {
const prefix = "go.string."
symdataname := prefix + symname
symdata := obj.Linklookup(Ctxt, symdataname, 0)
symdata := Ctxt.Lookup(symdataname, 0)
if !symdata.SeenGlobl() {
// string data