|
@@ -181,8 +181,15 @@ REQUEST_EXPANDED ( CONFIG_SYMBOL );
|
181
|
181
|
|
182
|
182
|
#ifndef ASSEMBLY
|
183
|
183
|
|
184
|
|
-/** Declare a function as weak (use *before* the definition) */
|
185
|
|
-#define __weak __attribute__ (( weak ))
|
|
184
|
+/** Declare a function as weak (use *before* the definition)
|
|
185
|
+ *
|
|
186
|
+ * Due to a bug in at least GCC 4.4.4 and earlier, weak symbols may be
|
|
187
|
+ * inlined if they have hidden visibility (see above for why hidden
|
|
188
|
+ * visibility is used). This results in the non-weak symbol never
|
|
189
|
+ * being used, so explicitly mark the function as noinline to prevent
|
|
190
|
+ * inlining.
|
|
191
|
+ */
|
|
192
|
+#define __weak __attribute__ (( weak, noinline ))
|
186
|
193
|
|
187
|
194
|
#endif
|
188
|
195
|
|