aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/compiler-gcc.h
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-07-05 00:41:31 -0400
committerKees Cook <keescook@chromium.org>2017-07-05 00:41:31 -0400
commitd1185a8c5dd21182012e6dd531b00fd72f4d30cb (patch)
tree1c394d6e27bad00e0f3aba4e59ca19823d0486d5 /include/linux/compiler-gcc.h
parent6f7da290413ba713f0cdd9ff1a2a9bb129ef4f6c (diff)
parent03232e0ddebdc2c9d088e6748075704885f039a5 (diff)
Merge branch 'merge/randstruct' into for-next/gcc-plugins
Diffstat (limited to 'include/linux/compiler-gcc.h')
-rw-r--r--include/linux/compiler-gcc.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
index 0efef9cf014f..7deaae3dc87d 100644
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -223,6 +223,11 @@
223/* Mark a function definition as prohibited from being cloned. */ 223/* Mark a function definition as prohibited from being cloned. */
224#define __noclone __attribute__((__noclone__, __optimize__("no-tracer"))) 224#define __noclone __attribute__((__noclone__, __optimize__("no-tracer")))
225 225
226#ifdef RANDSTRUCT_PLUGIN
227#define __randomize_layout __attribute__((randomize_layout))
228#define __no_randomize_layout __attribute__((no_randomize_layout))
229#endif
230
226#endif /* GCC_VERSION >= 40500 */ 231#endif /* GCC_VERSION >= 40500 */
227 232
228#if GCC_VERSION >= 40600 233#if GCC_VERSION >= 40600
@@ -294,6 +299,14 @@
294#define __no_sanitize_address __attribute__((no_sanitize_address)) 299#define __no_sanitize_address __attribute__((no_sanitize_address))
295#endif 300#endif
296 301
302#if GCC_VERSION >= 50100
303/*
304 * Mark structures as requiring designated initializers.
305 * https://gcc.gnu.org/onlinedocs/gcc/Designated-Inits.html
306 */
307#define __designated_init __attribute__((designated_init))
308#endif
309
297#endif /* gcc version >= 40000 specific checks */ 310#endif /* gcc version >= 40000 specific checks */
298 311
299#if !defined(__noclone) 312#if !defined(__noclone)