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>
switch tok.ScanToken {
case scanner.Ident:
if p.arch.Family == sys.ARM64 {
- p.errorf("rhs of shift must be integer: %s", str)
+ p.errorf("rhs of shift must be integer: %s", str)
} else {
r2, ok := p.registerReference(str)
if !ok {
p.errorf("unexpected %s in register shift", tok.String())
}
if p.arch.Family == sys.ARM64 {
- return int64(int64(r1 & 31)<<16 | int64(op)<<22 | int64(uint16(count)))
+ return int64(int64(r1&31)<<16 | int64(op)<<22 | int64(uint16(count)))
} else {
return int64((r1 & 15) | op<<5 | count)
}
a.Type = obj.TYPE_INDIR
}
// Weirdness with statics: Might now have "<>".
- isStatic := 0 // TODO: Really a boolean, but Linklookup wants a "version" integer.
+ isStatic := 0 // TODO: Really a boolean, but ctxt.Lookup wants a "version" integer.
if p.peek() == '<' {
isStatic = 1
p.next()
if p.peek() == '+' || p.peek() == '-' {
a.Offset = int64(p.expr())
}
- a.Sym = obj.Linklookup(p.ctxt, name, isStatic)
+ a.Sym = p.ctxt.Lookup(name, isStatic)
if p.peek() == scanner.EOF {
if prefix == 0 && p.isJump {
// Symbols without prefix or suffix are jump labels.
name = s.Pkg.Prefix + "." + s.Name
}
- ls := obj.Linklookup(Ctxt, name, 0)
+ ls := Ctxt.Lookup(name, 0)
s.Lsym = ls
return ls
}
const prefix = "go.string."
symdataname := prefix + symname
- symdata := obj.Linklookup(Ctxt, symdataname, 0)
+ symdata := Ctxt.Lookup(symdataname, 0)
if !symdata.SeenGlobl() {
// string data
gotype := Linksym(ngotype(n))
fnsym.Autom = append(fnsym.Autom, &obj.Auto{
- Asym: obj.Linklookup(Ctxt, n.Sym.Name, 0),
+ Asym: Ctxt.Lookup(n.Sym.Name, 0),
Aoffset: int32(n.Xoffset),
Name: name,
Gotype: gotype,
Name: n.Sym.Name,
Abbrev: abbrev,
Offset: int32(offs),
- Type: obj.Linklookup(Ctxt, typename, 0),
+ Type: Ctxt.Lookup(typename, 0),
})
}
str = p.Path
}
- s := obj.Linklookup(Ctxt, "type..importpath."+p.Prefix+".", 0)
+ s := Ctxt.Lookup("type..importpath."+p.Prefix+".", 0)
ot := dnameData(s, 0, str, "", nil, false)
ggloblLSym(s, int32(ot), obj.DUPOK|obj.RODATA)
p.Pathsym = s
// type..importpath.""., which the linker will rewrite using the correct import path.
// Every package that imports this one directly defines the symbol.
// See also https://groups.google.com/forum/#!topic/golang-dev/myb9s53HxGQ.
- ns := obj.Linklookup(Ctxt, `type..importpath."".`, 0)
+ ns := Ctxt.Lookup(`type..importpath."".`, 0)
return dsymptrLSym(s, ot, ns, 0)
}
// type..importpath.""., which the linker will rewrite using the correct import path.
// Every package that imports this one directly defines the symbol.
// See also https://groups.google.com/forum/#!topic/golang-dev/myb9s53HxGQ.
- ns := obj.Linklookup(Ctxt, `type..importpath."".`, 0)
+ ns := Ctxt.Lookup(`type..importpath."".`, 0)
return dsymptrOffLSym(s, ot, ns, 0)
}
sname = fmt.Sprintf(`%s"".%d`, sname, dnameCount)
dnameCount++
}
- s := obj.Linklookup(Ctxt, sname, 0)
+ s := Ctxt.Lookup(sname, 0)
if len(s.P) > 0 {
return s
}
// process ptabs
if localpkg.Name == "main" && len(ptabs) > 0 {
ot := 0
- s := obj.Linklookup(Ctxt, "go.plugin.tabs", 0)
+ s := Ctxt.Lookup("go.plugin.tabs", 0)
for _, p := range ptabs {
// Dump ptab symbol into go.pluginsym package.
//
ggloblLSym(s, int32(ot), int16(obj.RODATA))
ot = 0
- s = obj.Linklookup(Ctxt, "go.plugin.exports", 0)
+ s = Ctxt.Lookup("go.plugin.exports", 0)
for _, p := range ptabs {
ot = dsymptrLSym(s, ot, Linksym(p.s), 0)
}
func (DummyFrontend) AllocFrame(f *Func) {
}
func (d DummyFrontend) Syslook(s string) *obj.LSym {
- return obj.Linklookup(d.ctxt, s, 0)
+ return d.ctxt.Lookup(s, 0)
}
func (DummyFrontend) UseWriteBarrier() bool {
return true // only writebarrier_test cares
p := s.Prog(x86.ALEAL)
p.From.Type = obj.TYPE_MEM
p.From.Name = obj.NAME_EXTERN
- p.From.Sym = obj.Linklookup(gc.Ctxt, literal, 0)
+ p.From.Sym = gc.Ctxt.Lookup(literal, 0)
p.From.Sym.Set(obj.AttrLocal, true)
p.To.Type = obj.TYPE_REG
p.To.Reg = v.Reg()
// align the last instruction (the actual BL) to the last instruction in a bundle
if p.As == ABL {
if deferreturn == nil {
- deferreturn = obj.Linklookup(ctxt, "runtime.deferreturn", 0)
+ deferreturn = ctxt.Lookup("runtime.deferreturn", 0)
}
if p.To.Sym == deferreturn {
p.Pc = ((int64(origPC) + 15) &^ 15) + 16 - int64(size)
if obj.GOARM < 7 {
// Replace it with BL runtime.read_tls_fallback(SB) for ARM CPUs that lack the tls extension.
if progedit_tlsfallback == nil {
- progedit_tlsfallback = obj.Linklookup(ctxt, "runtime.read_tls_fallback", 0)
+ progedit_tlsfallback = ctxt.Lookup("runtime.read_tls_fallback", 0)
}
// MOVW LR, R11
f32 := float32(p.From.Val.(float64))
i32 := math.Float32bits(f32)
literal := fmt.Sprintf("$f32.%08x", i32)
- s := obj.Linklookup(ctxt, literal, 0)
+ s := ctxt.Lookup(literal, 0)
p.From.Type = obj.TYPE_MEM
p.From.Sym = s
p.From.Name = obj.NAME_EXTERN
if p.From.Type == obj.TYPE_FCONST && chipfloat5(ctxt, p.From.Val.(float64)) < 0 && (chipzero5(ctxt, p.From.Val.(float64)) < 0 || p.Scond&C_SCOND != C_SCOND_NONE) {
i64 := math.Float64bits(p.From.Val.(float64))
literal := fmt.Sprintf("$f64.%016x", i64)
- s := obj.Linklookup(ctxt, literal, 0)
+ s := ctxt.Lookup(literal, 0)
p.From.Type = obj.TYPE_MEM
p.From.Sym = s
p.From.Name = obj.NAME_EXTERN
// CALL (R9)
var sym *obj.LSym
if p.As == obj.ADUFFZERO {
- sym = obj.Linklookup(ctxt, "runtime.duffzero", 0)
+ sym = ctxt.Lookup("runtime.duffzero", 0)
} else {
- sym = obj.Linklookup(ctxt, "runtime.duffcopy", 0)
+ sym = ctxt.Lookup("runtime.duffcopy", 0)
}
offset := p.To.Offset
p.As = AMOVW
return
}
- symsfloat := obj.Linklookup(ctxt, "_sfloat", 0)
+ symsfloat := ctxt.Lookup("_sfloat", 0)
wasfloat := 0
for p := cursym.Text; p != nil; p = p.Link {
case ctxt.Cursym.Text.From3.Offset&obj.NEEDCTXT == 0:
morestack = "runtime.morestack_noctxt"
}
- call.To.Sym = obj.Linklookup(ctxt, morestack, 0)
+ call.To.Sym = ctxt.Lookup(morestack, 0)
// B start
b := obj.Appendp(call, newprog)
if ctxt.Sym_div != nil {
return
}
- ctxt.Sym_div = obj.Linklookup(ctxt, "_div", 0)
- ctxt.Sym_divu = obj.Linklookup(ctxt, "_divu", 0)
- ctxt.Sym_mod = obj.Linklookup(ctxt, "_mod", 0)
- ctxt.Sym_modu = obj.Linklookup(ctxt, "_modu", 0)
+ ctxt.Sym_div = ctxt.Lookup("_div", 0)
+ ctxt.Sym_divu = ctxt.Lookup("_divu", 0)
+ ctxt.Sym_mod = ctxt.Lookup("_mod", 0)
+ ctxt.Sym_modu = ctxt.Lookup("_modu", 0)
}
var unaryDst = map[obj.As]bool{
case ctxt.Cursym.Text.From3.Offset&obj.NEEDCTXT == 0:
morestack = "runtime.morestack_noctxt"
}
- call.To.Sym = obj.Linklookup(ctxt, morestack, 0)
+ call.To.Sym = ctxt.Lookup(morestack, 0)
// B start
jmp := obj.Appendp(call, newprog)
break
}
literal := fmt.Sprintf("$f32.%08x", i32)
- s := obj.Linklookup(ctxt, literal, 0)
+ s := ctxt.Lookup(literal, 0)
s.Size = 4
p.From.Type = obj.TYPE_MEM
p.From.Sym = s
break
}
literal := fmt.Sprintf("$f64.%016x", i64)
- s := obj.Linklookup(ctxt, literal, 0)
+ s := ctxt.Lookup(literal, 0)
s.Size = 8
p.From.Type = obj.TYPE_MEM
p.From.Sym = s
// CALL REGTMP
var sym *obj.LSym
if p.As == obj.ADUFFZERO {
- sym = obj.Linklookup(ctxt, "runtime.duffzero", 0)
+ sym = ctxt.Lookup("runtime.duffzero", 0)
} else {
- sym = obj.Linklookup(ctxt, "runtime.duffcopy", 0)
+ sym = ctxt.Lookup("runtime.duffcopy", 0)
}
offset := p.To.Offset
p.As = AMOVD
break
}
literal := fmt.Sprintf("$f32.%08x", i32)
- s := obj.Linklookup(ctxt, literal, 0)
+ s := ctxt.Lookup(literal, 0)
s.Size = 4
p.From.Type = obj.TYPE_MEM
p.From.Sym = s
break
}
literal := fmt.Sprintf("$f64.%016x", i64)
- s := obj.Linklookup(ctxt, literal, 0)
+ s := ctxt.Lookup(literal, 0)
s.Size = 8
p.From.Type = obj.TYPE_MEM
p.From.Sym = s
case AMOVV:
if p.From.Type == obj.TYPE_CONST && p.From.Name == obj.NAME_NONE && p.From.Reg == 0 && int64(int32(p.From.Offset)) != p.From.Offset {
literal := fmt.Sprintf("$i64.%016x", uint64(p.From.Offset))
- s := obj.Linklookup(ctxt, literal, 0)
+ s := ctxt.Lookup(literal, 0)
s.Size = 8
p.From.Type = obj.TYPE_MEM
p.From.Sym = s
p.As = AJAL
p.To.Type = obj.TYPE_BRANCH
if ctxt.Cursym.CFunc() {
- p.To.Sym = obj.Linklookup(ctxt, "runtime.morestackc", 0)
+ p.To.Sym = ctxt.Lookup("runtime.morestackc", 0)
} else if ctxt.Cursym.Text.From3.Offset&obj.NEEDCTXT == 0 {
- p.To.Sym = obj.Linklookup(ctxt, "runtime.morestack_noctxt", 0)
+ p.To.Sym = ctxt.Lookup("runtime.morestack_noctxt", 0)
} else {
- p.To.Sym = obj.Linklookup(ctxt, "runtime.morestack", 0)
+ p.To.Sym = ctxt.Lookup("runtime.morestack", 0)
}
p.Mark |= BRANCH
w.writeRef(d, false)
}
for _, f := range pc.File {
- fsym := Linklookup(w.ctxt, f, 0)
+ fsym := w.ctxt.Lookup(f, 0)
w.writeRef(fsym, true)
}
for _, call := range pc.InlTree.nodes {
w.writeRef(call.Func, false)
f, _ := linkgetlineFromPos(w.ctxt, call.Pos)
- fsym := Linklookup(w.ctxt, f, 0)
+ fsym := w.ctxt.Lookup(f, 0)
w.writeRef(fsym, true)
}
}
}
w.writeInt(int64(len(pc.File)))
for _, f := range pc.File {
- fsym := Linklookup(ctxt, f, 0)
+ fsym := ctxt.Lookup(f, 0)
w.writeRefIndex(fsym)
}
w.writeInt(int64(len(pc.InlTree.nodes)))
for _, call := range pc.InlTree.nodes {
w.writeInt(int64(call.Parent))
f, l := linkgetlineFromPos(w.ctxt, call.Pos)
- fsym := Linklookup(ctxt, f, 0)
+ fsym := ctxt.Lookup(f, 0)
w.writeRefIndex(fsym)
w.writeInt(int64(l))
w.writeRefIndex(call.Func)
// makeFuncDebugEntry makes a DWARF Debugging Information Entry
// for TEXT symbol s.
func makeFuncDebugEntry(ctxt *Link, curfn interface{}, s *LSym) {
- dsym := Linklookup(ctxt, dwarf.InfoPrefix+s.Name, int(s.Version))
+ dsym := ctxt.Lookup(dwarf.InfoPrefix+s.Name, int(s.Version))
if dsym.Size != 0 {
return
}
if p.From.Type != TYPE_CONST || p.From.Offset != FUNCDATA_ArgsPointerMaps {
ctxt.Diag("FUNCDATA use of go_args_stackmap(SB) without FUNCDATA_ArgsPointerMaps")
}
- p.To.Sym = Linklookup(ctxt, fmt.Sprintf("%s.args_stackmap", curtext.Name), int(curtext.Version))
+ p.To.Sym = ctxt.Lookup(fmt.Sprintf("%s.args_stackmap", curtext.Name), int(curtext.Version))
}
}
p.From.Offset = FUNCDATA_ArgsPointerMaps
p.To.Type = TYPE_MEM
p.To.Name = NAME_EXTERN
- p.To.Sym = Linklookup(ctxt, fmt.Sprintf("%s.args_stackmap", s.Name), int(s.Version))
+ p.To.Sym = ctxt.Lookup(fmt.Sprintf("%s.args_stackmap", s.Name), int(s.Version))
}
}
// that knows the name of the tls variable. Possibly
// we could add some assembly syntax so that the name
// of the variable does not have to be assumed.
- rel.Sym = obj.Linklookup(ctxt, "runtime.tls_g", 0)
+ rel.Sym = ctxt.Lookup("runtime.tls_g", 0)
rel.Type = obj.R_POWER_TLS
}
o1 = AOP_RRR(opstorex(ctxt, p.As), uint32(p.From.Reg), uint32(p.To.Index), uint32(r))
rel := obj.Addrel(ctxt.Cursym)
rel.Off = int32(ctxt.Pc)
rel.Siz = 4
- rel.Sym = obj.Linklookup(ctxt, "runtime.tls_g", 0)
+ rel.Sym = ctxt.Lookup("runtime.tls_g", 0)
rel.Type = obj.R_POWER_TLS
}
o1 = AOP_RRR(oploadx(ctxt, p.As), uint32(p.To.Reg), uint32(p.From.Index), uint32(r))
f32 := float32(p.From.Val.(float64))
i32 := math.Float32bits(f32)
literal := fmt.Sprintf("$f32.%08x", i32)
- s := obj.Linklookup(ctxt, literal, 0)
+ s := ctxt.Lookup(literal, 0)
s.Size = 4
p.From.Type = obj.TYPE_MEM
p.From.Sym = s
if p.From.Type == obj.TYPE_FCONST {
i64 := math.Float64bits(p.From.Val.(float64))
literal := fmt.Sprintf("$f64.%016x", i64)
- s := obj.Linklookup(ctxt, literal, 0)
+ s := ctxt.Lookup(literal, 0)
s.Size = 8
p.From.Type = obj.TYPE_MEM
p.From.Sym = s
case AMOVD:
if p.From.Type == obj.TYPE_CONST && p.From.Name == obj.NAME_NONE && p.From.Reg == 0 && int64(int32(p.From.Offset)) != p.From.Offset {
literal := fmt.Sprintf("$i64.%016x", uint64(p.From.Offset))
- s := obj.Linklookup(ctxt, literal, 0)
+ s := ctxt.Lookup(literal, 0)
s.Size = 8
p.From.Type = obj.TYPE_MEM
p.From.Sym = s
// BL (CTR)
var sym *obj.LSym
if p.As == obj.ADUFFZERO {
- sym = obj.Linklookup(ctxt, "runtime.duffzero", 0)
+ sym = ctxt.Lookup("runtime.duffzero", 0)
} else {
- sym = obj.Linklookup(ctxt, "runtime.duffcopy", 0)
+ sym = ctxt.Lookup("runtime.duffcopy", 0)
}
offset := p.To.Offset
p.As = AMOVD
rel := obj.Addrel(ctxt.Cursym)
rel.Off = 0
rel.Siz = 8
- rel.Sym = obj.Linklookup(ctxt, ".TOC.", 0)
+ rel.Sym = ctxt.Lookup(".TOC.", 0)
rel.Type = obj.R_ADDRPOWER_PCREL
}
var morestacksym *obj.LSym
if ctxt.Cursym.CFunc() {
- morestacksym = obj.Linklookup(ctxt, "runtime.morestackc", 0)
+ morestacksym = ctxt.Lookup("runtime.morestackc", 0)
} else if ctxt.Cursym.Text.From3.Offset&obj.NEEDCTXT == 0 {
- morestacksym = obj.Linklookup(ctxt, "runtime.morestack_noctxt", 0)
+ morestacksym = ctxt.Lookup("runtime.morestack_noctxt", 0)
} else {
- morestacksym = obj.Linklookup(ctxt, "runtime.morestack", 0)
+ morestacksym = ctxt.Lookup("runtime.morestack", 0)
}
if ctxt.Flag_shared {
break
}
literal := fmt.Sprintf("$f32.%08x", i32)
- s := obj.Linklookup(ctxt, literal, 0)
+ s := ctxt.Lookup(literal, 0)
s.Size = 4
p.From.Type = obj.TYPE_MEM
p.From.Sym = s
break
}
literal := fmt.Sprintf("$f64.%016x", i64)
- s := obj.Linklookup(ctxt, literal, 0)
+ s := ctxt.Lookup(literal, 0)
s.Size = 8
p.From.Type = obj.TYPE_MEM
p.From.Sym = s
int64(uint32(val)) != val &&
int64(uint64(val)&(0xffffffff<<32)) != val {
literal := fmt.Sprintf("$i64.%016x", uint64(p.From.Offset))
- s := obj.Linklookup(ctxt, literal, 0)
+ s := ctxt.Lookup(literal, 0)
s.Size = 8
p.From.Type = obj.TYPE_MEM
p.From.Sym = s
p.As = ABL
p.To.Type = obj.TYPE_BRANCH
if ctxt.Cursym.CFunc() {
- p.To.Sym = obj.Linklookup(ctxt, "runtime.morestackc", 0)
+ p.To.Sym = ctxt.Lookup("runtime.morestackc", 0)
} else if ctxt.Cursym.Text.From3.Offset&obj.NEEDCTXT == 0 {
- p.To.Sym = obj.Linklookup(ctxt, "runtime.morestack_noctxt", 0)
+ p.To.Sym = ctxt.Lookup("runtime.morestack_noctxt", 0)
} else {
- p.To.Sym = obj.Linklookup(ctxt, "runtime.morestack", 0)
+ p.To.Sym = ctxt.Lookup("runtime.morestack", 0)
}
// BR start
return s
}
-func Linklookup(ctxt *Link, name string, v int) *LSym {
- return ctxt.Lookup(name, v)
-}
-
func Linksymfmt(s *LSym) string {
if s == nil {
return "<nil>"
errors := ctxt.Errors
var deferreturn *obj.LSym
if ctxt.Headtype == obj.Hnacl {
- deferreturn = obj.Linklookup(ctxt, "runtime.deferreturn", 0)
+ deferreturn = ctxt.Lookup("runtime.deferreturn", 0)
}
for {
loop := int32(0)
r.Off = int32(p.Pc + int64(asmbuf.Len()))
r.Type = obj.R_CALL
r.Siz = 4
- r.Sym = obj.Linklookup(ctxt, "__x86.get_pc_thunk."+strings.ToLower(rconv(int(dst))), 0)
+ r.Sym = ctxt.Lookup("__x86.get_pc_thunk."+strings.ToLower(rconv(int(dst))), 0)
asmbuf.PutInt32(0)
asmbuf.Put2(0x8B, byte(2<<6|reg[dst]|(reg[dst]<<3)))
}
case obj.Hplan9:
if ctxt.Plan9privates == nil {
- ctxt.Plan9privates = obj.Linklookup(ctxt, "_privates", 0)
+ ctxt.Plan9privates = ctxt.Lookup("_privates", 0)
}
pp.From = obj.Addr{}
pp.From.Type = obj.TYPE_MEM
case obj.Hplan9:
if ctxt.Plan9privates == nil {
- ctxt.Plan9privates = obj.Linklookup(ctxt, "_privates", 0)
+ ctxt.Plan9privates = ctxt.Lookup("_privates", 0)
}
pp.From = obj.Addr{}
pp.From.Type = obj.TYPE_MEM
f32 := float32(p.From.Val.(float64))
i32 := math.Float32bits(f32)
literal := fmt.Sprintf("$f32.%08x", i32)
- s := obj.Linklookup(ctxt, literal, 0)
+ s := ctxt.Lookup(literal, 0)
p.From.Type = obj.TYPE_MEM
p.From.Name = obj.NAME_EXTERN
p.From.Sym = s
if p.From.Type == obj.TYPE_FCONST {
i64 := math.Float64bits(p.From.Val.(float64))
literal := fmt.Sprintf("$f64.%016x", i64)
- s := obj.Linklookup(ctxt, literal, 0)
+ s := ctxt.Lookup(literal, 0)
p.From.Type = obj.TYPE_MEM
p.From.Name = obj.NAME_EXTERN
p.From.Sym = s
// CALL $reg
var sym *obj.LSym
if p.As == obj.ADUFFZERO {
- sym = obj.Linklookup(ctxt, "runtime.duffzero", 0)
+ sym = ctxt.Lookup("runtime.duffzero", 0)
} else {
- sym = obj.Linklookup(ctxt, "runtime.duffcopy", 0)
+ sym = ctxt.Lookup("runtime.duffcopy", 0)
}
offset := p.To.Offset
p.As = mov
p1.As = ALEAL
p1.From.Type = obj.TYPE_MEM
p1.From.Name = obj.NAME_STATIC
- p1.From.Sym = obj.Linklookup(ctxt, "_GLOBAL_OFFSET_TABLE_", 0)
+ p1.From.Sym = ctxt.Lookup("_GLOBAL_OFFSET_TABLE_", 0)
p1.To.Type = obj.TYPE_REG
p1.To.Reg = REG_BX
r := obj.Appendp(q, newprog)
r.RegTo2 = 1
q.As = obj.ACALL
- q.To.Sym = obj.Linklookup(ctxt, "__x86.get_pc_thunk."+strings.ToLower(rconv(int(dst))), 0)
+ q.To.Sym = ctxt.Lookup("__x86.get_pc_thunk."+strings.ToLower(rconv(int(dst))), 0)
q.To.Type = obj.TYPE_MEM
q.To.Name = obj.NAME_EXTERN
q.To.Sym.Set(obj.AttrLocal, true)
func preprocess(ctxt *obj.Link, cursym *obj.LSym, newprog obj.ProgAlloc) {
if ctxt.Headtype == obj.Hplan9 && ctxt.Plan9privates == nil {
- ctxt.Plan9privates = obj.Linklookup(ctxt, "_privates", 0)
+ ctxt.Plan9privates = ctxt.Lookup("_privates", 0)
}
if cursym.Text == nil || cursym.Text.Link == nil {
case cursym.Text.From3Offset()&obj.NEEDCTXT == 0:
morestack = "runtime.morestack_noctxt"
}
- call.To.Sym = obj.Linklookup(ctxt, morestack, 0)
+ call.To.Sym = ctxt.Lookup(morestack, 0)
// When compiling 386 code for dynamic linking, the call needs to be adjusted
// to follow PIC rules. This in turn can insert more instructions, so we need
// to keep track of the start of the call (where the jump will be to) and the