]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/link: clean up windows PE generation
authorRuss Cox <rsc@golang.org>
Wed, 27 Jan 2021 16:50:58 +0000 (11:50 -0500)
committerRuss Cox <rsc@golang.org>
Fri, 19 Feb 2021 00:04:42 +0000 (00:04 +0000)
commit1c659f25257f29003b7012d90072b63f88d12f8b
treef0dd01415c6f589370379ca482895d771574d6a9
parentb6379f190b3820c2765c7589c1fd6292e5581407
cmd/link: clean up windows PE generation

A bunch of places are a bit too picky about the architecture.
Simplify them.

Also use a large PEBASE for 64-bit systems.
This more closely matches what is usually used on Windows x86-64
and is required for Windows arm64.
Unfortunately, we still need a special case for x86-64 because
of some cgo relocations. This may be fixable separately.

This CL is part of a stack adding windows/arm64
support (#36439), intended to land in the Go 1.17 cycle.
This CL is, however, not windows/arm64-specific.
It is cleanup meant to make the port (and future ports) easier.

Change-Id: I65212d28ad4d8c40e2b70dc29f7fce072babecb5
Reviewed-on: https://go-review.googlesource.com/c/go/+/288816
Trust: Russ Cox <rsc@golang.org>
Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/link/internal/ld/pe.go