aboutsummaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorMark Johnston <markjdb@gmail.com>2021-09-26 15:53:26 -0400
committerGitHub <noreply@github.com>2021-09-26 21:53:26 +0200
commit78494d166f1bbede620120c506ccd9f7878b05f9 (patch)
tree709c44dcd3e87abb23471e1fc0f4039da8c8826a /sys
parent8cac236e8c3741446e540b2fe0702086a4ae4c17 (diff)
sys/targets: do not build syz-executor as a PIE on FreeBSD (#2776)
clang does not handle -static-pie, so syz-executor does not get built. Moreover, clang's FreeBSD driver does not properly support the creation of static PIEs; for instance, it always links libc.a, which is not compiled as PIC, instead of libc_pic.a. Until this is addressed somehow, we have to keep ASLR disabled.
Diffstat (limited to 'sys')
-rw-r--r--sys/targets/targets.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/targets/targets.go b/sys/targets/targets.go
index 6296c3827..2f696b4b3 100644
--- a/sys/targets/targets.go
+++ b/sys/targets/targets.go
@@ -464,7 +464,8 @@ var oses = map[string]osCommon{
ExecutorUsesForkServer: true,
KernelObject: "kernel.full",
CPP: "g++",
- cflags: []string{"-static-pie", "-lc++"},
+ // FreeBSD is missing toolchain support for static PIEs.
+ cflags: []string{"-static", "-lc++"},
},
Darwin: {
SyscallNumbers: true,