aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/compiler-gcc.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2017-08-10 13:14:15 +0200
committerIngo Molnar <mingo@kernel.org>2017-08-10 13:14:15 +0200
commit1d0f49e14007a5426eb7e9e5808168cdb77b3e7f (patch)
tree1d7eb036e06938dedb7488910e4d34dc4c73fa68 /include/linux/compiler-gcc.h
parentx86/asm/32: Remove a bunch of '& 0xffff' from pt_regs segment reads (diff)
parentx86/asm/64: Clear AC on NMI entries (diff)
downloadlinux-dev-1d0f49e14007a5426eb7e9e5808168cdb77b3e7f.tar.xz
linux-dev-1d0f49e14007a5426eb7e9e5808168cdb77b3e7f.zip
Merge branch 'x86/urgent' into x86/asm, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'include/linux/compiler-gcc.h')
-rw-r--r--include/linux/compiler-gcc.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
index dd4b4c59c2f0..310f51d42550 100644
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -224,6 +224,7 @@
#endif /* GCC_VERSION >= 40500 */
#if GCC_VERSION >= 40600
+
/*
* When used with Link Time Optimization, gcc can optimize away C functions or
* variables which are referenced only from assembly code. __visible tells the
@@ -231,7 +232,17 @@
* this.
*/
#define __visible __attribute__((externally_visible))
-#endif
+
+/*
+ * RANDSTRUCT_PLUGIN wants to use an anonymous struct, but it is only
+ * possible since GCC 4.6. To provide as much build testing coverage
+ * as possible, this is used for all GCC 4.6+ builds, and not just on
+ * RANDSTRUCT_PLUGIN builds.
+ */
+#define randomized_struct_fields_start struct {
+#define randomized_struct_fields_end } __randomize_layout;
+
+#endif /* GCC_VERSION >= 40600 */
#if GCC_VERSION >= 40900 && !defined(__CHECKER__)