sh: vsyscall: Fix up .eh_frame generation.

Some improper formatting caused the .eh_frame generation to fail,
resulting in gcc/g++ testsuite failures with regards to unwinding through
the vDSO. Now that someone is actually working on this on the gcc side
it's time to fix up the kernel side, too.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
Paul Mundt 2012-03-30 19:42:26 +09:00
parent f52b69f86e
commit cd34e202fa
2 changed files with 45 additions and 13 deletions

View File

@ -34,6 +34,41 @@ __kernel_rt_sigreturn:
1: .short __NR_rt_sigreturn 1: .short __NR_rt_sigreturn
.LEND_rt_sigreturn: .LEND_rt_sigreturn:
.size __kernel_rt_sigreturn,.-.LSTART_rt_sigreturn .size __kernel_rt_sigreturn,.-.LSTART_rt_sigreturn
.previous
.section .eh_frame,"a",@progbits .section .eh_frame,"a",@progbits
.LCIE1:
.ualong .LCIE1_end - .LCIE1_start
.LCIE1_start:
.ualong 0 /* CIE ID */
.byte 0x1 /* Version number */
.string "zRS" /* NUL-terminated augmentation string */
.uleb128 0x1 /* Code alignment factor */
.sleb128 -4 /* Data alignment factor */
.byte 0x11 /* Return address register column */
.uleb128 0x1 /* Augmentation length and data */
.byte 0x1b /* DW_EH_PE_pcrel | DW_EH_PE_sdata4. */
.byte 0xc, 0xf, 0x0 /* DW_CFA_def_cfa: r15 ofs 0 */
.align 2
.LCIE1_end:
.ualong .LFDE0_end-.LFDE0_start /* Length FDE0 */
.LFDE0_start:
.ualong .LFDE0_start-.LCIE1 /* CIE pointer */
.ualong .LSTART_sigreturn-. /* PC-relative start address */
.ualong .LEND_sigreturn-.LSTART_sigreturn
.uleb128 0 /* Augmentation */
.align 2
.LFDE0_end:
.ualong .LFDE1_end-.LFDE1_start /* Length FDE1 */
.LFDE1_start:
.ualong .LFDE1_start-.LCIE1 /* CIE pointer */
.ualong .LSTART_rt_sigreturn-. /* PC-relative start address */
.ualong .LEND_rt_sigreturn-.LSTART_rt_sigreturn
.uleb128 0 /* Augmentation */
.align 2
.LFDE1_end:
.previous .previous

View File

@ -3,37 +3,34 @@
.type __kernel_vsyscall,@function .type __kernel_vsyscall,@function
__kernel_vsyscall: __kernel_vsyscall:
.LSTART_vsyscall: .LSTART_vsyscall:
/* XXX: We'll have to do something here once we opt to use the vDSO trapa #0x10
* page for something other than the signal trampoline.. as well as nop
* fill out .eh_frame -- PFM. */
.LEND_vsyscall: .LEND_vsyscall:
.size __kernel_vsyscall,.-.LSTART_vsyscall .size __kernel_vsyscall,.-.LSTART_vsyscall
.previous
.section .eh_frame,"a",@progbits .section .eh_frame,"a",@progbits
.previous
.LCIE: .LCIE:
.ualong .LCIE_end - .LCIE_start .ualong .LCIE_end - .LCIE_start
.LCIE_start: .LCIE_start:
.ualong 0 /* CIE ID */ .ualong 0 /* CIE ID */
.byte 0x1 /* Version number */ .byte 0x1 /* Version number */
.string "zRS" /* NUL-terminated augmentation string */ .string "zR" /* NUL-terminated augmentation string */
.uleb128 0x1 /* Code alignment factor */ .uleb128 0x1 /* Code alignment factor */
.sleb128 -4 /* Data alignment factor */ .sleb128 -4 /* Data alignment factor */
.byte 0x11 /* Return address register column */ .byte 0x11 /* Return address register column */
/* Augmentation length and data (none) */ .uleb128 0x1 /* Augmentation length and data */
.byte 0xc /* DW_CFA_def_cfa */ .byte 0x1b /* DW_EH_PE_pcrel | DW_EH_PE_sdata4. */
.uleb128 0xf /* r15 */ .byte 0xc,0xf,0x0 /* DW_CFA_def_cfa: r15 ofs 0 */
.uleb128 0x0 /* offset 0 */
.align 2 .align 2
.LCIE_end: .LCIE_end:
.ualong .LFDE_end-.LFDE_start /* Length FDE */ .ualong .LFDE_end-.LFDE_start /* Length FDE */
.LFDE_start: .LFDE_start:
.ualong .LCIE /* CIE pointer */ .ualong .LFDE_start-.LCIE /* CIE pointer */
.ualong .LSTART_vsyscall-. /* start address */ .ualong .LSTART_vsyscall-. /* PC-relative start address */
.ualong .LEND_vsyscall-.LSTART_vsyscall .ualong .LEND_vsyscall-.LSTART_vsyscall
.uleb128 0 .uleb128 0 /* Augmentation */
.align 2 .align 2
.LFDE_end: .LFDE_end:
.previous .previous