diff options
Diffstat (limited to 'include/linux/compiler-gcc.h')
-rw-r--r-- | include/linux/compiler-gcc.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index cd4bbe8242bd..bdb80c4aef6e 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h | |||
@@ -235,6 +235,7 @@ | |||
235 | #endif /* GCC_VERSION >= 40500 */ | 235 | #endif /* GCC_VERSION >= 40500 */ |
236 | 236 | ||
237 | #if GCC_VERSION >= 40600 | 237 | #if GCC_VERSION >= 40600 |
238 | |||
238 | /* | 239 | /* |
239 | * When used with Link Time Optimization, gcc can optimize away C functions or | 240 | * When used with Link Time Optimization, gcc can optimize away C functions or |
240 | * variables which are referenced only from assembly code. __visible tells the | 241 | * variables which are referenced only from assembly code. __visible tells the |
@@ -242,7 +243,17 @@ | |||
242 | * this. | 243 | * this. |
243 | */ | 244 | */ |
244 | #define __visible __attribute__((externally_visible)) | 245 | #define __visible __attribute__((externally_visible)) |
245 | #endif | 246 | |
247 | /* | ||
248 | * RANDSTRUCT_PLUGIN wants to use an anonymous struct, but it is only | ||
249 | * possible since GCC 4.6. To provide as much build testing coverage | ||
250 | * as possible, this is used for all GCC 4.6+ builds, and not just on | ||
251 | * RANDSTRUCT_PLUGIN builds. | ||
252 | */ | ||
253 | #define randomized_struct_fields_start struct { | ||
254 | #define randomized_struct_fields_end } __randomize_layout; | ||
255 | |||
256 | #endif /* GCC_VERSION >= 40600 */ | ||
246 | 257 | ||
247 | 258 | ||
248 | #if GCC_VERSION >= 40900 && !defined(__CHECKER__) | 259 | #if GCC_VERSION >= 40900 && !defined(__CHECKER__) |