I’m trying to find Clang's option equivalent to GNU binutil’s “-z execstack or
-z noexecstack” which is to toggle NX bit of output binary. For instance,
something similar to the following.
$ gcc -z execstack -o main main.c
$ execstack -q main
X main
I’m not necessarily a fan of bug per bug compatibility with GCC here, but recognizing these cases and emitting a “did you mean X?” warning might be helpful. I’ve also been bitten by this recently. Philip