aboutsummaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorAndrew Donnellan <ajd@linux.ibm.com>2019-10-10 10:56:46 +1100
committerDmitry Vyukov <dvyukov@google.com>2019-10-10 10:21:51 +0200
commitd52eff2843084b3aeada4e46029519cf17067385 (patch)
treeb9eadcbae09f382ced75c5b227fc33ad712ce4e1 /sys
parentc4b9981b5f5b70dc03eb3f76c618398510101a1d (diff)
sys/targets: Disable PIE/ASLR when building tests
Due to issues with ASLR + ASan on ppc64le (see #1446), add the -no-pie flag to the test target so tests will pass. Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
Diffstat (limited to 'sys')
-rw-r--r--sys/targets/targets.go18
1 files changed, 10 insertions, 8 deletions
diff --git a/sys/targets/targets.go b/sys/targets/targets.go
index 98cb00c07..f30a10c2c 100644
--- a/sys/targets/targets.go
+++ b/sys/targets/targets.go
@@ -69,10 +69,11 @@ func Get(OS, arch string) *Target {
var List = map[string]map[string]*Target{
"test": {
"64": {
- PtrSize: 8,
- PageSize: 4 << 10,
- CFlags: []string{"-m64"},
- CrossCFlags: []string{"-m64", "-fsanitize=address"},
+ PtrSize: 8,
+ PageSize: 4 << 10,
+ CFlags: []string{"-m64"},
+ // Compile with -no-pie due to issues with ASan + ASLR on ppc64le
+ CrossCFlags: []string{"-m64", "-fsanitize=address", "-no-pie"},
osCommon: osCommon{
SyscallNumbers: true,
SyscallPrefix: "SYS_",
@@ -81,10 +82,11 @@ var List = map[string]map[string]*Target{
},
},
"64_fork": {
- PtrSize: 8,
- PageSize: 8 << 10,
- CFlags: []string{"-m64"},
- CrossCFlags: []string{"-m64", "-fsanitize=address"},
+ PtrSize: 8,
+ PageSize: 8 << 10,
+ CFlags: []string{"-m64"},
+ // Compile with -no-pie due to issues with ASan + ASLR on ppc64le
+ CrossCFlags: []string{"-m64", "-fsanitize=address", "-no-pie"},
osCommon: osCommon{
SyscallNumbers: true,
SyscallPrefix: "SYS_",