Add .note.GNU-stack section only for Linux since it may not be supported
on non-Linux OSes. __ELF__ isn't checked since these tests can only run
on Linux/x86 ELF systems.
PR target/105472
* gcc.target/i386/iamcu/asm-support.S: Add .note.GNU-stack section
only for Linux.
* gcc.target/x86_64/abi/asm-support.S: Likewise.
* gcc.target/x86_64/abi/avx/asm-support.S: Likewise.
* gcc.target/x86_64/abi/avx512f/asm-support.S: Likewise.
* gcc.target/x86_64/abi/avx512fp16/asm-support.S: Likewise.
* gcc.target/x86_64/abi/avx512fp16/m256h/asm-support.S: Likewise.
* gcc.target/x86_64/abi/avx512fp16/m512h/asm-support.S: Likewise.
* gcc.target/x86_64/abi/ms-sysv/do-test.S: Likewise.
.align 4
.LCiamcu_noprintf1:
.long 1132527616
+#ifdef __linux__
.section .note.GNU-stack,"",@progbits
+#endif
.comm xmm_regs,256,32
.comm x87_regs,128,32
.comm volatile_var,8,8
+#ifdef __linux__
.section .note.GNU-stack,"",@progbits
+#endif
.comm ymm_regs,512,32
.comm x87_regs,128,32
.comm volatile_var,8,8
+#ifdef __linux__
.section .note.GNU-stack,"",@progbits
+#endif
.comm zmm_regs,2048,64
.comm x87_regs,128,32
.comm volatile_var,8,8
+#ifdef __linux__
.section .note.GNU-stack,"",@progbits
+#endif
.comm xmm_regs,256,32
.comm x87_regs,128,32
.comm volatile_var,8,8
+#ifdef __linux__
.section .note.GNU-stack,"",@progbits
+#endif
.comm ymm_regs,512,32
.comm x87_regs,128,32
.comm volatile_var,8,8
+#ifdef __linux__
.section .note.GNU-stack,"",@progbits
+#endif
.comm zmm_regs,2048,64
.comm x87_regs,128,32
.comm volatile_var,8,8
+#ifdef __linux__
.section .note.GNU-stack,"",@progbits
+#endif
#ifdef __ELF__
# define FN_TYPE(fn) .type fn,@function
# define FN_SIZE(fn) .size fn,.-fn
+# ifdef __linux__
.section .note.GNU-stack,"",@progbits
+# endif
#else
# define FN_TYPE(fn)
# define FN_SIZE(fn)