Hi,
  The Linux kernel already supports non-executable stack since around
February 2010.  This patch has GCC emit the notes that are associated
with non-executable stack.

OK?  Bootstrapped and tested on mips64-linux-gnu with kernel already
supporting the non-executable stack with no regressions.

Thanks,
Andrew Pinski

ChangeLog:

* config/mips/linux-common.h (TARGET_ASM_FILE_END): Define.
Index: config/mips/linux-common.h
===================================================================
--- config/mips/linux-common.h  (revision 189877)
+++ config/mips/linux-common.h  (working copy)
@@ -56,3 +56,7 @@ along with GCC; see the file COPYING3.  
                       GNU_USER_TARGET_ENDFILE_SPEC,                    \
                       GNU_USER_TARGET_MATHFILE_SPEC " "                \
                       ANDROID_ENDFILE_SPEC)
+
+/* For MIPS, the default is to assume *no* executable stack, so output
+    an executable-stack-note only when needed.  */
+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack

Reply via email to