On Thu, 06 Apr 2023 15:08:39 -0700, Sean Christopherson wrote: > Explicitly tell the linker KUT doesn't need an executable stack to > suppress gcc-12 warnings about the default behavior of having an > executable stack being deprecated. The entire thing is irrelevant for KUT > (and other freestanding environments) as KUT creates its own stacks, i.e. > there's no loader/libc that consumes the magic ".note.GNU-stack" section. > > ld -nostdlib -m elf_x86_64 -T /home/seanjc/go/src/kernel.org/kvm-unit-tests/x86/flat.lds > -o x86/vmx.elf x86/vmx.o x86/cstart64.o x86/access.o x86/vmx_tests.o lib/libcflat.a > ld: warning: setjmp64.o: missing .note.GNU-stack section implies executable stack > ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker > > [...] Applied to kvm-x86 next, thanks! [1/1] x86: Link with "-z noexecstack" to suppress irrelevant linker warnings https://github.com/kvm-x86/kvm-unit-tests/commit/5f15933dccae -- https://github.com/kvm-x86/kvm-unit-tests/tree/next