aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/dwarf2.h
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2010-05-13 21:43:03 -0700
committerH. Peter Anvin <hpa@zytor.com>2010-05-13 22:15:18 -0700
commit9e565292270a2d55524be38835104c564ac8f795 (patch)
treea4a2c6e5b2013e142b866b1f4dcca44a8f7384a4 /arch/x86/include/asm/dwarf2.h
parent5967ed87ade85a421ef814296c3c7f182b08c225 (diff)
x86: Use .cfi_sections for assembly code
The newer assemblers support the .cfi_sections directive so we can put the CFI from .S files into the .debug_frame section that is preserved in unstripped vmlinux and in separate debuginfo, rather than the .eh_frame section that is now discarded by vmlinux.lds.S. Signed-off-by: Roland McGrath <roland@redhat.com> LKML-Reference: <20100514044303.A6FE7400BE@magilla.sf.frob.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/include/asm/dwarf2.h')
-rw-r--r--arch/x86/include/asm/dwarf2.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/x86/include/asm/dwarf2.h b/arch/x86/include/asm/dwarf2.h
index ae6253ab902..733f7e91e7a 100644
--- a/arch/x86/include/asm/dwarf2.h
+++ b/arch/x86/include/asm/dwarf2.h
@@ -34,6 +34,18 @@
#define CFI_SIGNAL_FRAME
#endif
+#if defined(CONFIG_AS_CFI_SECTIONS) && defined(__ASSEMBLY__)
+ /*
+ * Emit CFI data in .debug_frame sections, not .eh_frame sections.
+ * The latter we currently just discard since we don't do DWARF
+ * unwinding at runtime. So only the offline DWARF information is
+ * useful to anyone. Note we should not use this directive if this
+ * file is used in the vDSO assembly, or if vmlinux.lds.S gets
+ * changed so it doesn't discard .eh_frame.
+ */
+ .cfi_sections .debug_frame
+#endif
+
#else
/*