diff options
-rw-r--r-- | include/linux/compiler-version.h | 9 | ||||
-rw-r--r-- | include/linux/vermagic.h | 1 |
2 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/compiler-version.h b/include/linux/compiler-version.h index 5dba398a9412..4b9d39b37650 100644 --- a/include/linux/compiler-version.h +++ b/include/linux/compiler-version.h @@ -23,3 +23,12 @@ #ifdef GCC_PLUGINS #include <generated/gcc-plugins.h> #endif + +/* + * If the randstruct seed itself changes (whether for GCC plugins or + * Clang), the entire tree needs to be rebuilt since the randomization of + * structures may change between compilation units if not. + */ +#ifdef RANDSTRUCT +#include <generated/randstruct_hash.h> +#endif diff --git a/include/linux/vermagic.h b/include/linux/vermagic.h index 939ceabcaf06..335c360d4f9b 100644 --- a/include/linux/vermagic.h +++ b/include/linux/vermagic.h @@ -33,7 +33,6 @@ #define MODULE_VERMAGIC_MODVERSIONS "" #endif #ifdef RANDSTRUCT -#include <generated/randstruct_hash.h> #define MODULE_RANDSTRUCT "RANDSTRUCT_" RANDSTRUCT_HASHED_SEED #else #define MODULE_RANDSTRUCT |