aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/link/internal/ld/deadcode.go
diff options
context:
space:
mode:
authorDavid Crawshaw <crawshaw@golang.org>2017-10-07 13:49:44 -0400
committerDavid Crawshaw <crawshaw@golang.org>2017-10-21 00:51:14 +0000
commit38cfeb9cb5925466c93b191c03f647566bddced4 (patch)
tree8479a48e5d38854e42c23c670e98836d7a31196e /src/cmd/link/internal/ld/deadcode.go
parent6fd1f825c1310e2a586a9ae0fc128a0b3c115b12 (diff)
downloadgo-38cfeb9cb5925466c93b191c03f647566bddced4.tar.xz
cmd/link: move Headtype global to ctxt
For #22095 Change-Id: Idcfdfe8a94db8626392658bb93429454238f648a Reviewed-on: https://go-review.googlesource.com/70835 Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/cmd/link/internal/ld/deadcode.go')
-rw-r--r--src/cmd/link/internal/ld/deadcode.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/link/internal/ld/deadcode.go b/src/cmd/link/internal/ld/deadcode.go
index 99e7789ad5..c065146fcd 100644
--- a/src/cmd/link/internal/ld/deadcode.go
+++ b/src/cmd/link/internal/ld/deadcode.go
@@ -222,7 +222,7 @@ func (d *deadcodepass) init() {
} else {
// The external linker refers main symbol directly.
if d.ctxt.LinkMode == LinkExternal && (d.ctxt.BuildMode == BuildModeExe || d.ctxt.BuildMode == BuildModePIE) {
- if Headtype == objabi.Hwindows && d.ctxt.Arch.Family == sys.I386 {
+ if d.ctxt.HeadType == objabi.Hwindows && d.ctxt.Arch.Family == sys.I386 {
*flagEntrySymbol = "_main"
} else {
*flagEntrySymbol = "main"