Skip to content

Commit cafb0dd

Browse files
mflemingpmundt
authored andcommitted
sh: Add CFI annotations for exception return.
Annotate various assembly code paths with CFI assembler directives so that DWARF unwind info is available for the unwinder. Signed-off-by: Matt Fleming <matt@console-pimps.org> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
1 parent 0b93048 commit cafb0dd

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎arch/sh/kernel/entry-common.S‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
* syscall #
4444
*
4545
*/
46+
#include <asm/dwarf.h>
4647

4748
#if defined(CONFIG_PREEMPT)
4849
# define preempt_stop() cli ; TRACE_IRQS_OFF
@@ -66,6 +67,11 @@ ENTRY(exception_error)
6667

6768
.align 2
6869
ret_from_exception:
70+
CFI_STARTPROC simple
71+
CFI_DEF_CFA r14, 0
72+
CFI_REL_OFFSET 17, 64
73+
CFI_REL_OFFSET 15, 0
74+
CFI_REL_OFFSET 14, 56
6975
preempt_stop()
7076
ENTRY(ret_from_irq)
7177
!
@@ -240,6 +246,7 @@ debug_trap:
240246
nop
241247
bra __restore_all
242248
nop
249+
CFI_ENDPROC
243250

244251
.align 2
245252
1: .long debug_trap_table

0 commit comments

Comments
 (0)