diff options
Diffstat (limited to 'include/linux/compiler-gcc.h')
-rw-r--r-- | include/linux/compiler-gcc.h | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index 1ca6a51cfaa9..cfac027e1625 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h | |||
@@ -108,9 +108,6 @@ | |||
108 | __builtin_unreachable(); \ | 108 | __builtin_unreachable(); \ |
109 | } while (0) | 109 | } while (0) |
110 | 110 | ||
111 | /* Mark a function definition as prohibited from being cloned. */ | ||
112 | #define __noclone __attribute__((__noclone__, __optimize__("no-tracer"))) | ||
113 | |||
114 | #if defined(RANDSTRUCT_PLUGIN) && !defined(__CHECKER__) | 111 | #if defined(RANDSTRUCT_PLUGIN) && !defined(__CHECKER__) |
115 | #define __randomize_layout __attribute__((randomize_layout)) | 112 | #define __randomize_layout __attribute__((randomize_layout)) |
116 | #define __no_randomize_layout __attribute__((no_randomize_layout)) | 113 | #define __no_randomize_layout __attribute__((no_randomize_layout)) |
@@ -120,32 +117,6 @@ | |||
120 | #endif | 117 | #endif |
121 | 118 | ||
122 | /* | 119 | /* |
123 | * When used with Link Time Optimization, gcc can optimize away C functions or | ||
124 | * variables which are referenced only from assembly code. __visible tells the | ||
125 | * optimizer that something else uses this function or variable, thus preventing | ||
126 | * this. | ||
127 | */ | ||
128 | #define __visible __attribute__((__externally_visible__)) | ||
129 | |||
130 | /* gcc version specific checks */ | ||
131 | |||
132 | #if GCC_VERSION >= 40900 | ||
133 | /* | ||
134 | * __assume_aligned(n, k): Tell the optimizer that the returned | ||
135 | * pointer can be assumed to be k modulo n. The second argument is | ||
136 | * optional (default 0), so we use a variadic macro to make the | ||
137 | * shorthand. | ||
138 | * | ||
139 | * Beware: Do not apply this to functions which may return | ||
140 | * ERR_PTRs. Also, it is probably unwise to apply it to functions | ||
141 | * returning extra information in the low bits (but in that case the | ||
142 | * compiler should see some alignment anyway, when the return value is | ||
143 | * massaged by 'flags = ptr & 3; ptr &= ~3;'). | ||
144 | */ | ||
145 | #define __assume_aligned(a, ...) __attribute__((__assume_aligned__(a, ## __VA_ARGS__))) | ||
146 | #endif | ||
147 | |||
148 | /* | ||
149 | * GCC 'asm goto' miscompiles certain code sequences: | 120 | * GCC 'asm goto' miscompiles certain code sequences: |
150 | * | 121 | * |
151 | * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 | 122 | * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 |
@@ -176,32 +147,10 @@ | |||
176 | #define KASAN_ABI_VERSION 3 | 147 | #define KASAN_ABI_VERSION 3 |
177 | #endif | 148 | #endif |
178 | 149 | ||
179 | #if GCC_VERSION >= 40902 | ||
180 | /* | ||
181 | * Tell the compiler that address safety instrumentation (KASAN) | ||
182 | * should not be applied to that function. | ||
183 | * Conflicts with inlining: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67368 | ||
184 | */ | ||
185 | #define __no_sanitize_address __attribute__((__no_sanitize_address__)) | ||
186 | #endif | ||
187 | |||
188 | #if GCC_VERSION >= 50100 | 150 | #if GCC_VERSION >= 50100 |
189 | /* | ||
190 | * Mark structures as requiring designated initializers. | ||
191 | * https://gcc.gnu.org/onlinedocs/gcc/Designated-Inits.html | ||
192 | */ | ||
193 | #define __designated_init __attribute__((__designated_init__)) | ||
194 | #define COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW 1 | 151 | #define COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW 1 |
195 | #endif | 152 | #endif |
196 | 153 | ||
197 | #if !defined(__noclone) | ||
198 | #define __noclone /* not needed */ | ||
199 | #endif | ||
200 | |||
201 | #if !defined(__no_sanitize_address) | ||
202 | #define __no_sanitize_address | ||
203 | #endif | ||
204 | |||
205 | /* | 154 | /* |
206 | * Turn individual warnings and errors on and off locally, depending | 155 | * Turn individual warnings and errors on and off locally, depending |
207 | * on version. | 156 | * on version. |