]> Cypherpunks.ru repositories - gostls13.git/commit
build: run cgo tests with -pie if the external linker supports it.
authorRahul Chaudhry <rahulchaudhry@chromium.org>
Fri, 27 Feb 2015 18:46:42 +0000 (10:46 -0800)
committerIan Lance Taylor <iant@golang.org>
Mon, 2 Mar 2015 20:06:00 +0000 (20:06 +0000)
commit612dd6c26274d7183b21d38120bc98c45dcf2736
treea1338a0edb263161a04228e63e4e7d47e7a7315b
parentd460b6e5c6c998ebc862e541a1779b8d6595d127
build: run cgo tests with -pie if the external linker supports it.

PIE binaries can be built by the Go compiler in external link mode with
extldflags="-pie". These binaries support ASLR (address space layout
randomization) when executed on systems with appropriate kernel/dynamic
linker support.

This CL enables some cgo tests to run with -pie as a sanity check (in
addition to the other linker flag combinations they already test).

I have tested this functionality more thoroughly by building the full
compiler testsuite (test/...) and standard library tests with -pie
and executing them remotely on ChromeOS devices for all three linux
architectures (linux_amd64, linux_386, and linux_arm).

Change-Id: I3f644a72e94c3341f3360dfee58db5ec3a591e26
Reviewed-on: https://go-review.googlesource.com/6280
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/run.bash