rpms/kernel/devel linux-2.6-x86-cfi_sections.patch, NONE, 1.1 kernel.spec, 1.1989, 1.1990

roland roland at fedoraproject.org
Fri May 14 04:50:52 UTC 2010


Author: roland

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv10730

Modified Files:
	kernel.spec 
Added Files:
	linux-2.6-x86-cfi_sections.patch 
Log Message:
x86: put assembly CFI in .debug_frame

linux-2.6-x86-cfi_sections.patch:
 Makefile             |    5 +++--
 include/asm/dwarf2.h |   13 ++++++++++++-
 2 files changed, 15 insertions(+), 3 deletions(-)

--- NEW FILE linux-2.6-x86-cfi_sections.patch ---
>From c434187fa89efac8af533eec7a8b0c887b3437b7 Mon Sep 17 00:00:00 2001
From: Roland McGrath <roland at redhat.com>
Date: Thu, 13 May 2010 20:41:46 -0700
Subject: [PATCH] x86: Use .cfi_sections

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 at redhat.com>
---
 arch/x86/Makefile             |    5 +++--
 arch/x86/include/asm/dwarf2.h |   12 ++++++++++++
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index 0a43dc5..8aa1b59 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -95,8 +95,9 @@ sp-$(CONFIG_X86_64) := rsp
 cfi := $(call as-instr,.cfi_startproc\n.cfi_rel_offset $(sp-y)$(comma)0\n.cfi_endproc,-DCONFIG_AS_CFI=1)
 # is .cfi_signal_frame supported too?
 cfi-sigframe := $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1)
-KBUILD_AFLAGS += $(cfi) $(cfi-sigframe)
-KBUILD_CFLAGS += $(cfi) $(cfi-sigframe)
+cfi-sections := $(call as-instr,.cfi_sections .debug_frame,-DCONFIG_AS_CFI_SECTIONS=1)
+KBUILD_AFLAGS += $(cfi) $(cfi-sigframe) $(cfi-sections)
+KBUILD_CFLAGS += $(cfi) $(cfi-sigframe) $(cfi-sections)
 
 LDFLAGS := -m elf_$(UTS_MACHINE)
 
diff --git a/arch/x86/include/asm/dwarf2.h b/arch/x86/include/asm/dwarf2.h
index ae6253a..733f7e9 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
 
 /*
-- 
1.7.0.1



Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.1989
retrieving revision 1.1990
diff -u -p -r1.1989 -r1.1990
--- kernel.spec	13 May 2010 16:58:54 -0000	1.1989
+++ kernel.spec	14 May 2010 04:50:51 -0000	1.1990
@@ -648,6 +648,8 @@ Patch21: linux-2.6-tracehook.patch
 Patch22: linux-2.6-utrace.patch
 Patch23: linux-2.6-utrace-ptrace.patch
 
+Patch50: linux-2.6-x86-cfi_sections.patch
+
 Patch144: linux-2.6-vio-modalias.patch
 
 Patch150: linux-2.6.29-sparc-IOC_TYPECHECK.patch
@@ -1179,6 +1181,7 @@ ApplyPatch linux-2.6-utrace-ptrace.patch
 
 # Architecture patches
 # x86(-64)
+ApplyPatch linux-2.6-x86-cfi_sections.patch
 
 #
 # Intel IOMMU
@@ -2011,10 +2014,10 @@ fi
 # plz don't put in a version string unless you're going to tag
 # and build.
 
-#  ___________________________________________________________ 
+#  ___________________________________________________________
 # / This branch is for Fedora 14. You probably want to commit \
 # \ to the F-13 branch instead, or in addition to this one.   /
-#  ----------------------------------------------------------- 
+#  -----------------------------------------------------------
 #         \   ^__^
 #          \  (@@)\_______
 #             (__)\       )\/\
@@ -2022,6 +2025,9 @@ fi
 #                 ||     ||
 
 %changelog
+* Fri May 14 2010 Roland McGrath <roland at redhat.com> 2.6.34-0.54.rc7.git4
+- x86: put assembly CFI in .debug_frame
+
 * Thu May 13 2010 Dave Jones <davej at redhat.com>
 - 2.6.34-rc7-git4
 



More information about the scm-commits mailing list