]> Cypherpunks repositories - gostls13.git/commit
cmd/link: enable ASLR on windows binaries built with -buildmode=c-shared
authorQuim <quimmuntal@gmail.com>
Wed, 16 Sep 2020 23:59:14 +0000 (01:59 +0200)
committerCherry Zhang <cherryyz@google.com>
Thu, 1 Oct 2020 14:26:35 +0000 (14:26 +0000)
commit56dac60074698d23dc6acc047e61d2ad59c9610d
tree1d9f9cf77dfaf3302f44f39ea673c78601953f04
parent734790716469c7dd887a1f31b8700d42e9cb3e29
cmd/link: enable ASLR on windows binaries built with -buildmode=c-shared

Windows binaries built with -buildmode=c-shared set will have
IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE flag set, and
IMAGE_DLLCHARACTERISTICS_HIGH_ENTROPY_VA flag set for windows/amd64.

ASLR can be disabled on windows by using the new linker -aslr flag.

RELNOTE=yes

Fixes #41421

Change-Id: I62bd88c6d7e0f87173b093a0ad8e1a4d269ec790
Reviewed-on: https://go-review.googlesource.com/c/go/+/255259
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Trust: Alex Brainman <alex.brainman@gmail.com>
Trust: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
src/cmd/link/internal/ld/ld_test.go
src/cmd/link/internal/ld/lib.go
src/cmd/link/internal/ld/main.go