[PREVIEW 10/10] linkage: add .cfi_{start/end}proc to ENTRY/ENDPROC
From: Jiri Slaby
Date: Fri Feb 17 2017 - 05:49:06 EST
This is just a preview, not to merged now, only later with DWARF
unwinder series. This is what the series will serve for (aside from
cleanup and unification).
I am aware of CFI_STARTPROC and CFI_ENDPROC left defined in other archs
in spite of cfi annotations removal ages ago. For simplicity. I am using
DW_ prefix here.
Signed-off-by: Jiri Slaby <jslaby@xxxxxxx>
---
include/linux/linkage.h | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/include/linux/linkage.h b/include/linux/linkage.h
index fe5bbdac719b..af14364a63ef 100644
--- a/include/linux/linkage.h
+++ b/include/linux/linkage.h
@@ -72,6 +72,14 @@
#define __ALIGN_STR ".align 4,0x90"
#endif
+#ifdef CONFIG_X86 /* to be replaced by CONFIG_DWARF_UNWIND after 01 tests */
+#define DW_CFI_STARTPROC .cfi_startproc
+#define DW_CFI_ENDPROC .cfi_endproc
+#else
+#define DW_CFI_STARTPROC
+#define DW_CFI_ENDPROC
+#endif
+
#ifdef __ASSEMBLY__
#ifndef LINKER_SCRIPT
@@ -92,7 +100,8 @@
#ifndef ENTRY_LOCAL
#define ENTRY_LOCAL(name) \
- ENTRY_LOCAL_ALIAS(name)
+ ENTRY_LOCAL_ALIAS(name) ASM_NL \
+ DW_CFI_STARTPROC
#endif
#ifndef ENTRY
@@ -126,6 +135,7 @@
*/
#ifndef ENDPROC
#define ENDPROC(name) \
+ DW_CFI_ENDPROC ASM_NL \
END_ALIAS(name)
#endif
--
2.11.1