Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/gnu/dist/gcc4/gcc

On Sat, 7 May 2011, Christos Zoulas wrote:

> Add a no_stack_protector function attribute to localize the effect
> of disabling stack protection on a function-by-function level, as
> opposed to per source file.

how should we enable use of this, is the patch below ok or should it have
additional restrictions? (kernel scope only? __SSP__/__SSP_ALL__?)

also, anybody with FSF privileges prepared to push the gcc addition


Index: cdefs.h
RCS file: /cvsroot/src/sys/sys/cdefs.h,v
retrieving revision 1.84
diff -u -p -r1.84 cdefs.h
--- cdefs.h     19 Feb 2011 02:21:21 -0000      1.84
+++ cdefs.h     13 May 2011 07:56:42 -0000
@@ -266,6 +266,12 @@
 #define        __BEGIN_DECLS           __BEGIN_PUBLIC_DECLS
 #define        __END_DECLS             __END_PUBLIC_DECLS

+#if __GNUC_PREREQ__(4, 1)
+#define        __nossp         __attribute__((__no_stack_protector__))
+#define        __nossp         /* nothing */
  * Non-static C99 inline functions are optional bodies.  They don't
  * create global symbols if not used, but can be replaced if desirable.

Home | Main Index | Thread Index | Old Index