]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
sh: Set the cfa_offset to 0 if we see a DW_CFA_def_cfa_register op
authorMatt Fleming <matt@console-pimps.org>
Fri, 14 Aug 2009 23:04:00 +0000 (00:04 +0100)
committerPaul Mundt <lethal@linux-sh.org>
Fri, 14 Aug 2009 23:07:43 +0000 (08:07 +0900)
The way that the CFA is calculated can change as we progress through a
function. If we see a DW_CFA_def_cfa_register op we need to reset the
frame's cfa_offset value which may have been previously setup.

Signed-off-by: Matt Fleming <matt@console-pimps.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/kernel/dwarf.c

index db021361b161b16beb4b0f721f2ae20313c19957..c6c5764a8ab107a4ffb97fa386b39013d55aa230 100644 (file)
@@ -449,6 +449,7 @@ static int dwarf_cfa_execute_insns(unsigned char *insn_start,
                        count = dwarf_read_uleb128(current_insn,
                                                   &frame->cfa_register);
                        current_insn += count;
+                       frame->cfa_offset = 0;
                        frame->flags |= DWARF_FRAME_CFA_REG_OFFSET;
                        break;
                case DW_CFA_def_cfa_offset: