mirror of
https://github.com/golang/go
synced 2024-11-20 10:44:41 -07:00
cmd/link: extract windows-specific code from dynrelocsym
No functional changes. Change-Id: Ib31bb3f01b515aac6428ec61e0ef02b269623890 Reviewed-on: https://go-review.googlesource.com/62470 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
9dba7335c0
commit
f58c48f834
@ -759,8 +759,7 @@ func (ctxt *Link) reloc() {
|
||||
}
|
||||
}
|
||||
|
||||
func dynrelocsym(ctxt *Link, s *Symbol) {
|
||||
if Headtype == objabi.Hwindows && Linkmode != LinkExternal {
|
||||
func windynrelocsym(ctxt *Link, s *Symbol) {
|
||||
rel := ctxt.Syms.Lookup(".rel", 0)
|
||||
if s == rel {
|
||||
return
|
||||
@ -801,7 +800,11 @@ func dynrelocsym(ctxt *Link, s *Symbol) {
|
||||
r.Add = int64(targ.Plt)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func dynrelocsym(ctxt *Link, s *Symbol) {
|
||||
if Headtype == objabi.Hwindows && Linkmode != LinkExternal {
|
||||
windynrelocsym(ctxt, s)
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user