// nothing to do, the relocation will be laid out in reloc
return true
}
- if ld.Headtype == objabi.Hwindows {
- // nothing to do, the relocation will be laid out in pereloc1
- return true
- } else {
- // for both ELF and Mach-O
- addpltsym(ctxt, targ)
- r.Sym = ctxt.Syms.Lookup(".plt", 0)
- r.Add = int64(targ.Plt)
- return true
- }
+ // for both ELF and Mach-O
+ addpltsym(ctxt, targ)
+ r.Sym = ctxt.Syms.Lookup(".plt", 0)
+ r.Add = int64(targ.Plt)
+ return true
case objabi.R_ADDR:
if s.Type == ld.STEXT && ld.Iself {
r.Type = 256 // ignore during relocsym
return true
}
-
- if ld.Headtype == objabi.Hwindows {
- // nothing to do, the relocation will be laid out in pereloc1
- return true
- }
}
return false
}
func dynrelocsym(ctxt *Link, s *Symbol) {
- if Headtype == objabi.Hwindows && Linkmode != LinkExternal {
- windynrelocsym(ctxt, s)
+ if Headtype == objabi.Hwindows {
+ if Linkmode == LinkInternal {
+ windynrelocsym(ctxt, s)
+ }
return
}
r.Type = 256 // ignore during relocsym
return true
}
-
- if ld.Headtype == objabi.Hwindows && s.Size == int64(ld.SysArch.PtrSize) {
- // nothing to do, the relocation will be laid out in pereloc1
- return true
- }
}
return false