cmd/link: move build/link mode globals into ctxt

Replace Buildmode with BuildMode and Linkmode with LinkMode.

For #22095

Change-Id: I51a6f5719d107727bca29ec8e68e3e9d87e31e33
Reviewed-on: https://go-review.googlesource.com/68334
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:
David Crawshaw 2017-10-05 10:20:17 -04:00
parent 9f9bb97420
commit 2e8545531e
22 changed files with 287 additions and 292 deletions

View file

@ -94,7 +94,7 @@ func applyrel(arch *sys.Arch, r *sym.Reloc, s *sym.Symbol, val *int64, t int64)
}
func archreloc(ctxt *ld.Link, r *sym.Reloc, s *sym.Symbol, val *int64) bool {
if ld.Linkmode == ld.LinkExternal {
if ctxt.LinkMode == ld.LinkExternal {
switch r.Type {
default:
return false
@ -229,7 +229,7 @@ func asmb(ctxt *ld.Link) {
ctxt.Logf("%5.2f dwarf\n", ld.Cputime())
}
if ld.Linkmode == ld.LinkExternal {
if ctxt.LinkMode == ld.LinkExternal {
ld.Elfemitreloc(ctxt)
}
}