Commit f58c48f8 authored by Hiroshi Ioka's avatar Hiroshi Ioka Committed by Ian Lance Taylor

cmd/link: extract windows-specific code from dynrelocsym

No functional changes.

Change-Id: Ib31bb3f01b515aac6428ec61e0ef02b269623890
Reviewed-on: https://go-review.googlesource.com/62470Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 9dba7335
...@@ -759,8 +759,7 @@ func (ctxt *Link) reloc() { ...@@ -759,8 +759,7 @@ func (ctxt *Link) reloc() {
} }
} }
func dynrelocsym(ctxt *Link, s *Symbol) { func windynrelocsym(ctxt *Link, s *Symbol) {
if Headtype == objabi.Hwindows && Linkmode != LinkExternal {
rel := ctxt.Syms.Lookup(".rel", 0) rel := ctxt.Syms.Lookup(".rel", 0)
if s == rel { if s == rel {
return return
...@@ -801,7 +800,11 @@ func dynrelocsym(ctxt *Link, s *Symbol) { ...@@ -801,7 +800,11 @@ func dynrelocsym(ctxt *Link, s *Symbol) {
r.Add = int64(targ.Plt) r.Add = int64(targ.Plt)
} }
} }
}
func dynrelocsym(ctxt *Link, s *Symbol) {
if Headtype == objabi.Hwindows && Linkmode != LinkExternal {
windynrelocsym(ctxt, s)
return return
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment