Building llvm-libc unit tests with ld.bfd, I observe the warning:
/usr/bin/ld: warning: libc/test/src/__support/CMakeFiles/libc.test.src.__support.freelist_heap_test.__unit__.__build__.dir/fake_heap.s.o: missing .note.GNU-stack section implies executable stack
There's a command line flag for the compiler for this; but also I think you can use assembler directives in the assembler sources, too.