mirror of
https://github.com/golang/go
synced 2024-11-19 16:44:43 -07:00
cmd/link: use the correct module data on ppc64le
Fixes #22250 Change-Id: I0e39d10ff6f0785cd22b0105de2d839e569db4b7 Reviewed-on: https://go-review.googlesource.com/70810 Run-TryBot: David Crawshaw <crawshaw@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
e09dbaa1de
commit
c996d07fee
@ -163,8 +163,10 @@ func genaddmoduledata(ctxt *ld.Link) {
|
||||
rel = initfunc.AddRel()
|
||||
rel.Off = int32(initfunc.Size)
|
||||
rel.Siz = 8
|
||||
if !ctxt.CanUsePlugins() {
|
||||
rel.Sym = ctxt.Syms.Lookup("local.moduledata", 0)
|
||||
if s := ctxt.Syms.ROLookup("local.moduledata", 0); s != nil {
|
||||
rel.Sym = s
|
||||
} else if s := ctxt.Syms.ROLookup("local.pluginmoduledata", 0); s != nil {
|
||||
rel.Sym = s
|
||||
} else {
|
||||
rel.Sym = ctxt.Syms.Lookup("runtime.firstmoduledata", 0)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user