a1e287c6be7022e52354266c91429d07788302a5
[openwrt/openwrt.git] / target / linux / generic / patches-4.4 / 095-ARC-unwind-ensure-that-.debug_frame-is-generated-vs..patch
1 From 23cd0de28cc7978130b770dd59b18ac143253351 Mon Sep 17 00:00:00 2001
2 From: Vineet Gupta <vgupta@synopsys.com>
3 Date: Tue, 28 Jun 2016 09:42:25 +0530
4 Subject: [PATCH] ARC: unwind: ensure that .debug_frame is generated (vs.
5 .eh_frame)
6
7 With recent binutils update to support dwarf CFI pseudo-ops in gas, we
8 now get .eh_frame vs. .debug_frame. Although the call frame info is
9 exactly the same in both, the CIE differs, which the current kernel
10 unwinder can't cope with.
11
12 This broke both the kernel unwinder as well as loadable modules (latter
13 because of a new unhandled relo R_ARC_32_PCREL from .rela.eh_frame in
14 the module loader)
15
16 The ideal solution would be to switch unwinder to .eh_frame.
17 For now however we can make do by just ensureing .debug_frame is
18 generated by removing -fasynchronous-unwind-tables
19
20 .eh_frame generated with -gdwarf-2 -fasynchronous-unwind-tables
21 .debug_frame generated with -gdwarf-2
22
23 Fixes STAR 9001058196
24
25 Cc: stable@vger.kernel.org
26 Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
27 ---
28 arch/arc/Makefile | 2 --
29 1 file changed, 2 deletions(-)
30
31 diff --git a/arch/arc/Makefile b/arch/arc/Makefile
32 index aeb1902..209d845 100644
33 --- a/arch/arc/Makefile
34 +++ b/arch/arc/Makefile
35 @@ -48,8 +48,6 @@ endif
36
37 endif
38
39 -cflags-$(CONFIG_ARC_DW2_UNWIND) += -fasynchronous-unwind-tables
40 -
41 # By default gcc 4.8 generates dwarf4 which kernel unwinder can't grok
42 ifeq ($(atleast_gcc48),y)
43 cflags-$(CONFIG_ARC_DW2_UNWIND) += -gdwarf-2
44 --
45 2.5.5
46