summary refs log tree commit diff
path: root/arch/arc/kernel/unwind.c
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2013-06-24 21:22:06 +0530
committerVineet Gupta <vgupta@synopsys.com>2016-09-30 14:48:20 -0700
commit6716dbbdefa9867ba98dea91d89b14168043a48c (patch)
treed134bd3853996ec3ebae718a786ec9bfe365c8b1 /arch/arc/kernel/unwind.c
parentd040876b4aad0c157c5c95779128b71a121ff27d (diff)
downloadlinux-6716dbbdefa9867ba98dea91d89b14168043a48c.tar.gz
ARC: dw2 unwind: switch to .eh_frame based unwinding
So finally after almost 8 years of dealing with .debug_frame, we are
finally switching to .eh_frame. The reason being stripped kernel
binaries had non-functional unwinder as .debug_frame was gone.
Also, in general .eh_frame seems more common way of doing unwinding.

This also folds a revert of f52e126cc747 ("ARC: unwind: ensure that
.debug_frame is generated (vs. .eh_frame)") to ensure that we start
getting .eh_frame

Reported-by: Daniel Mentz <danielmentz@google.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/kernel/unwind.c')
-rw-r--r--arch/arc/kernel/unwind.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/arc/kernel/unwind.c b/arch/arc/kernel/unwind.c
index 4e5dbe7617a1..61fd1ce63c56 100644
--- a/arch/arc/kernel/unwind.c
+++ b/arch/arc/kernel/unwind.c
@@ -111,7 +111,7 @@ UNW_REGISTER_INFO};
 #define DW_EH_PE_indirect 0x80
 #define DW_EH_PE_omit     0xff
 
-#define CIE_ID	0xffffffffUL
+#define CIE_ID	0
 
 typedef unsigned long uleb128_t;
 typedef signed long sleb128_t;
@@ -510,8 +510,7 @@ static const u32 *__cie_for_fde(const u32 *fde)
 {
 	const u32 *cie;
 
-	/* cie = fde + 1 - fde[1] / sizeof(*fde); */
-	cie = (u32 *) fde[1];
+	cie = fde + 1 - fde[1] / sizeof(*fde);
 
 	return cie;
 }