Skip to content

Commit

Permalink
sh: Add CFI annotations for exception return.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Matt Fleming authored and Paul Mundt committed Aug 13, 2009
1 parent 0b93048 commit cafb0dd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions arch/sh/kernel/entry-common.S
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
* syscall #
*
*/
#include <asm/dwarf.h>

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

.align 2
ret_from_exception:
CFI_STARTPROC simple
CFI_DEF_CFA r14, 0
CFI_REL_OFFSET 17, 64
CFI_REL_OFFSET 15, 0
CFI_REL_OFFSET 14, 56
preempt_stop()
ENTRY(ret_from_irq)
!
Expand Down Expand Up @@ -240,6 +246,7 @@ debug_trap:
nop
bra __restore_all
nop
CFI_ENDPROC

.align 2
1: .long debug_trap_table
Expand Down

0 comments on commit cafb0dd

Please sign in to comment.