1
0
mirror of https://github.com/golang/go synced 2024-11-14 21:20:27 -07:00
go/misc/cgo/testcshared
Quim Muntal e463c28cc1 cmd/link: avoid exporting all symbols on windows buildmode=pie
Marking one functions with __declspec(dllexport) forces mingw to
create .reloc section without having to export all symbols.

See https://insights.sei.cmu.edu/cert/2018/08/when-aslr-is-not-really-aslr---the-case-of-incorrect-assumptions-and-bad-defaults.html for more info.

This change cuts 73kb of a "hello world" pie binary.

Updates #6853
Fixes #40795

Change-Id: I3cc57c3b64f61187550bc8751dfa085f106c8475
Reviewed-on: https://go-review.googlesource.com/c/go/+/264459
Trust: Alex Brainman <alex.brainman@gmail.com>
Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Reviewed-by: Austin Clements <austin@google.com>
2020-11-02 00:46:44 +00:00
..
testdata misc/cgo/testcshared: fix tests in module mode 2019-02-22 21:57:35 +00:00
cshared_test.go cmd/link: avoid exporting all symbols on windows buildmode=pie 2020-11-02 00:46:44 +00:00
overlaydir_test.go misc: remove use of relative directories in overlayDir functions 2019-11-25 16:26:15 +00:00