Merge tag 'perf-tools-fixes-for-v5.10-2020-11-17' of git://git.kernel.org/pub/scm...
[sfrench/cifs-2.6.git] / tools / perf / util / include / linux / linkage.h
index b8a5159361b4123651509d9510e851a51f6c1a42..5acf053fca7d418399bc35567d19c22e88652cb5 100644 (file)
@@ -25,6 +25,7 @@
 
 /* SYM_L_* -- linkage of symbols */
 #define SYM_L_GLOBAL(name)                     .globl name
+#define SYM_L_WEAK(name)                       .weak name
 #define SYM_L_LOCAL(name)                      /* nothing */
 
 #define ALIGN __ALIGN
        SYM_END(name, SYM_T_FUNC)
 #endif
 
+/* SYM_FUNC_START_WEAK -- use for weak functions */
+#ifndef SYM_FUNC_START_WEAK
+#define SYM_FUNC_START_WEAK(name)                      \
+       SYM_START(name, SYM_L_WEAK, SYM_A_ALIGN)
+#endif
+
 /*
  * SYM_FUNC_END -- the end of SYM_FUNC_START_LOCAL, SYM_FUNC_START,
  * SYM_FUNC_START_WEAK, ...