[LLVMdev] [cfe-dev] Compiler flag to toggle NX (NonExec) bit
Philip Reames
listmail at philipreames.com
Fri May 16 11:50:46 PDT 2014
On 05/16/2014 10:33 AM, Reid Kleckner wrote:
> On Fri, May 16, 2014 at 5:21 AM, Joerg Sonnenberger
> <joerg at britannica.bec.de <mailto:joerg at britannica.bec.de>> wrote:
>
> On Thu, May 15, 2014 at 11:22:46PM -0400, Kangkook Jee wrote:
> > Hi all,
> >
> > 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.
>
> -Wl,-z,execstack as you should be using for GCC as well.
>
>
> Should Clang recognize -z as a linker flag? I've also tripped on this
> before.
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140516/6aabf94c/attachment.html>
More information about the llvm-dev
mailing list