diff options
| author | qmuntal <quimmuntal@gmail.com> | 2026-04-08 11:30:10 +0200 |
|---|---|---|
| committer | Quim Muntal <quimmuntal@gmail.com> | 2026-04-09 05:10:16 -0700 |
| commit | b3c54d2e597ee67939f9abc2ec8aaca841fb1138 (patch) | |
| tree | ab04ef0fad1806b4720dafadb08a37375c216457 /test/codegen/switch.go | |
| parent | ff530b51286495e9b6189bfefe1aff8129365943 (diff) | |
| download | go-b3c54d2e597ee67939f9abc2ec8aaca841fb1138.tar.xz | |
cmd/link: fallback to older minimum Windows target version on older C GNU toolchains
Setting Windows 10 as the minimum target version requires setting
the IMAGE_GUARD_SECURITY_COOKIE_UNUSED flag in the PE load config
directory, else the executable will fail to run.
When using an external linker that flag is set by defining a
_load_config_used symbol with the proper value. However, older versions
of the GNU toolchain do not associate the _load_config_used symbol with
the PE load config directory.
To work around this issue, we can fallback to the previous minimum
Windows target version if the external linker doesn't special-case the
_load_config_used symbol.
Change-Id: I36ac7a2968c3576ac788bf192e7614bbae35ad1f
Reviewed-on: https://go-review.googlesource.com/c/go/+/763960
Reviewed-by: Damien Neil <dneil@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'test/codegen/switch.go')
0 files changed, 0 insertions, 0 deletions
