[cfe-dev] Compiler flag to toggle NX (NonExec) bit

Reid Kleckner rnk at google.com
Fri May 16 10:33:40 PDT 2014


On Fri, May 16, 2014 at 5:21 AM, Joerg Sonnenberger <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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140516/5ef44227/attachment.html>


More information about the cfe-dev mailing list