diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index a8ff0ca0c3213dcd818899ee876029ea2775154e..3ebee1ce6f982a920b15871e187a3928e67bcba8 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h @@ -201,6 +201,10 @@ #define COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW 1 #endif +#if GCC_VERSION >= 90100 +#define __copy(symbol) __attribute__((__copy__(symbol))) +#endif + #if !defined(__noclone) #define __noclone /* not needed */ #endif diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h index c2ded31a4cec5ac7e6270ee05367e9a6b8656881..2b8ed70c4c7744af0a581a3ce3edba06a79586f4 100644 --- a/include/linux/compiler_types.h +++ b/include/linux/compiler_types.h @@ -180,6 +180,10 @@ struct ftrace_likely_data { #define __diag_GCC(version, severity, string) #endif +#ifndef __copy +# define __copy(symbol) +#endif + #define __diag_push() __diag(push) #define __diag_pop() __diag(pop)