Commit da2e9e1f authored by Jakub Jelinek's avatar Jakub Jelinek Committed by Linus Torvalds

[PATCH] Mark unwind info for signal trampolines in vDSOs

Mark unwind info for signal trampolines using the new S augmentation flag
introduced in: http://gcc.gnu.org/PR26208.

GCC 4.2 (or patched earlier GCC) will be able to special case unwinding
through frames right above signal trampolines.  As the augmentations start
with z flag and S is at the very end of the augmentation string, older GCCs
will just skip the S flag as unknown (that's why an augmentation flag was
chosen over say a new CFA opcode).
Signed-off-by: default avatarJakub Jelinek <jakub@redhat.com>
Cc: Andi Kleen <ak@muc.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 97db7fbf
...@@ -44,7 +44,7 @@ __kernel_rt_sigreturn: ...@@ -44,7 +44,7 @@ __kernel_rt_sigreturn:
.LSTARTCIEDLSI1: .LSTARTCIEDLSI1:
.long 0 /* CIE ID */ .long 0 /* CIE ID */
.byte 1 /* Version number */ .byte 1 /* Version number */
.string "zR" /* NUL-terminated augmentation string */ .string "zRS" /* NUL-terminated augmentation string */
.uleb128 1 /* Code alignment factor */ .uleb128 1 /* Code alignment factor */
.sleb128 -4 /* Data alignment factor */ .sleb128 -4 /* Data alignment factor */
.byte 8 /* Return address register column */ .byte 8 /* Return address register column */
......
...@@ -261,7 +261,7 @@ V_FUNCTION_END(__kernel_sigtramp_rt32) ...@@ -261,7 +261,7 @@ V_FUNCTION_END(__kernel_sigtramp_rt32)
.Lcie_start: .Lcie_start:
.long 0 /* CIE ID */ .long 0 /* CIE ID */
.byte 1 /* Version number */ .byte 1 /* Version number */
.string "zR" /* NUL-terminated augmentation string */ .string "zRS" /* NUL-terminated augmentation string */
.uleb128 4 /* Code alignment factor */ .uleb128 4 /* Code alignment factor */
.sleb128 -4 /* Data alignment factor */ .sleb128 -4 /* Data alignment factor */
.byte 67 /* Return address register column, ap */ .byte 67 /* Return address register column, ap */
......
...@@ -263,7 +263,7 @@ V_FUNCTION_END(__kernel_sigtramp_rt64) ...@@ -263,7 +263,7 @@ V_FUNCTION_END(__kernel_sigtramp_rt64)
.Lcie_start: .Lcie_start:
.long 0 /* CIE ID */ .long 0 /* CIE ID */
.byte 1 /* Version number */ .byte 1 /* Version number */
.string "zR" /* NUL-terminated augmentation string */ .string "zRS" /* NUL-terminated augmentation string */
.uleb128 4 /* Code alignment factor */ .uleb128 4 /* Code alignment factor */
.sleb128 -8 /* Data alignment factor */ .sleb128 -8 /* Data alignment factor */
.byte 67 /* Return address register column, ap */ .byte 67 /* Return address register column, ap */
......
...@@ -32,9 +32,28 @@ __kernel_rt_sigreturn: ...@@ -32,9 +32,28 @@ __kernel_rt_sigreturn:
.size __kernel_rt_sigreturn,.-.LSTART_rt_sigreturn .size __kernel_rt_sigreturn,.-.LSTART_rt_sigreturn
.section .eh_frame,"a",@progbits .section .eh_frame,"a",@progbits
.LSTARTFRAMES:
.long .LENDCIES-.LSTARTCIES
.LSTARTCIES:
.long 0 /* CIE ID */
.byte 1 /* Version number */
.string "zRS" /* NUL-terminated augmentation string */
.uleb128 1 /* Code alignment factor */
.sleb128 -4 /* Data alignment factor */
.byte 8 /* Return address register column */
.uleb128 1 /* Augmentation value length */
.byte 0x1b /* DW_EH_PE_pcrel|DW_EH_PE_sdata4. */
.byte 0x0c /* DW_CFA_def_cfa */
.uleb128 4
.uleb128 4
.byte 0x88 /* DW_CFA_offset, column 0x8 */
.uleb128 1
.align 4
.LENDCIES:
.long .LENDFDE2-.LSTARTFDE2 /* Length FDE */ .long .LENDFDE2-.LSTARTFDE2 /* Length FDE */
.LSTARTFDE2: .LSTARTFDE2:
.long .LSTARTFDE2-.LSTARTFRAME /* CIE pointer */ .long .LSTARTFDE2-.LSTARTFRAMES /* CIE pointer */
/* HACK: The dwarf2 unwind routines will subtract 1 from the /* HACK: The dwarf2 unwind routines will subtract 1 from the
return address to get an address in the middle of the return address to get an address in the middle of the
presumed call instruction. Since we didn't get here via presumed call instruction. Since we didn't get here via
...@@ -97,7 +116,7 @@ __kernel_rt_sigreturn: ...@@ -97,7 +116,7 @@ __kernel_rt_sigreturn:
.long .LENDFDE3-.LSTARTFDE3 /* Length FDE */ .long .LENDFDE3-.LSTARTFDE3 /* Length FDE */
.LSTARTFDE3: .LSTARTFDE3:
.long .LSTARTFDE3-.LSTARTFRAME /* CIE pointer */ .long .LSTARTFDE3-.LSTARTFRAMES /* CIE pointer */
/* HACK: See above wrt unwind library assumptions. */ /* HACK: See above wrt unwind library assumptions. */
.long .LSTART_rt_sigreturn-1-. /* PC-relative start address */ .long .LSTART_rt_sigreturn-1-. /* PC-relative start address */
.long .LEND_rt_sigreturn-.LSTART_rt_sigreturn+1 .long .LEND_rt_sigreturn-.LSTART_rt_sigreturn+1
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment