aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/compiler-gcc.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/compiler-gcc.h')
-rw-r--r--include/linux/compiler-gcc.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
index 73dcf804bc94..0da5b187f124 100644
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -58,8 +58,12 @@
58 * naked functions because then mcount is called without stack and frame pointer 58 * naked functions because then mcount is called without stack and frame pointer
59 * being set up and there is no chance to restore the lr register to the value 59 * being set up and there is no chance to restore the lr register to the value
60 * before mcount was called. 60 * before mcount was called.
61 *
62 * The asm() bodies of naked functions often depend on standard calling conventions,
63 * therefore they must be noinline and noclone. GCC 4.[56] currently fail to enforce
64 * this, so we must do so ourselves. See GCC PR44290.
61 */ 65 */
62#define __naked __attribute__((naked)) notrace 66#define __naked __attribute__((naked)) noinline __noclone notrace
63 67
64#define __noreturn __attribute__((noreturn)) 68#define __noreturn __attribute__((noreturn))
65 69
@@ -85,3 +89,7 @@
85#define _gcc_header(x) __gcc_header(linux/compiler-gcc##x.h) 89#define _gcc_header(x) __gcc_header(linux/compiler-gcc##x.h)
86#define gcc_header(x) _gcc_header(x) 90#define gcc_header(x) _gcc_header(x)
87#include gcc_header(__GNUC__) 91#include gcc_header(__GNUC__)
92
93#if !defined(__noclone)
94#define __noclone /* not needed */
95#endif