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

Joerg Sonnenberger joerg at britannica.bec.de
Fri May 16 13:45:33 PDT 2014


On Fri, May 16, 2014 at 10:33:40AM -0700, Reid Kleckner wrote:
> 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.

No.

Joerg



More information about the cfe-dev mailing list