From 75e2c2fabf2aeb95cfa2822e4e9cdff8978b7b38 Mon Sep 17 00:00:00 2001 From: Space Meyer Date: Wed, 12 Apr 2023 12:03:17 +0200 Subject: executor: mark amd64 kvm_gen.cc stack nonexecutable Without this change `go generate ./executor` on gcc 12.2.0 gives: /usr/bin/ld: warning: /tmp/ccmfWMO4.o: missing .note.GNU-stack section implies executable stack /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker This does not change the generated code in kvm_amd64.S.h --- executor/gen_linux_amd64.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/executor/gen_linux_amd64.go b/executor/gen_linux_amd64.go index dd68a198b..c552779b8 100644 --- a/executor/gen_linux_amd64.go +++ b/executor/gen_linux_amd64.go @@ -2,6 +2,6 @@ // Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. // nolint: lll -//go:generate bash -c "gcc -DGOARCH_$GOARCH=1 kvm_gen.cc kvm_amd64.S -o kvm_gen && ./kvm_gen > kvm_amd64.S.h && rm ./kvm_gen" +//go:generate bash -c "gcc -Wa,--noexecstack -DGOARCH_$GOARCH=1 kvm_gen.cc kvm_amd64.S -o kvm_gen && ./kvm_gen > kvm_amd64.S.h && rm ./kvm_gen" package executor -- cgit mrf-deployment