From 61b9339d3a1fd7a4c4d91fce92ac55e41f80a08a Mon Sep 17 00:00:00 2001 From: Egbert Eich Date: Fri, 28 Mar 2025 08:59:26 +0100 Subject: [PATCH] getarch/cpuid.S: Fix warning about executable stack When using the GNU toolchain a warning is printed about an executible stack: /usr/lib64/gcc/.../x86_64-suse-linux/bin/ld: warning: /tmp/ccyG3xBB.o: missing .note.GNU-stack section implies executable stack [ 15s] /usr/lib64/gcc/.../x86_64-suse-linux/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker to prevent this warning, add: ``` .section .note.GNU-stack,"",@progbits ``` Signed-off-by: Egbert Eich --- cpuid.S | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cpuid.S b/cpuid.S index 851fe34d2..295917bdb 100644 --- a/cpuid.S +++ b/cpuid.S @@ -65,3 +65,6 @@ _cpuid: .subsections_via_symbols #endif +#if defined(__ELF__) && defined(__linux__) + .section .note.GNU-stack,"",@progbits +#endif