summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authordchagin <dchagin@FreeBSD.org>2016-05-23 05:31:53 +0000
committerdchagin <dchagin@FreeBSD.org>2016-05-23 05:31:53 +0000
commitbb2ef25b411476485d46375b034eaacc5b95a975 (patch)
tree7fa7cf555bcf918a4ba29ae71b802cb903e72f99 /sys/amd64
parentd72a98c7beb6e3bb9aaa607cf0ce35af4a16a7d6 (diff)
downloadFreeBSD-src-bb2ef25b411476485d46375b034eaacc5b95a975.zip
FreeBSD-src-bb2ef25b411476485d46375b034eaacc5b95a975.tar.gz
MFC r299249:
Add a forgotten in r283424 .eh_frame section with CFI & FDE records to allow stack unwinding through signal handler.
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/linux/linux_locore.s32
1 files changed, 32 insertions, 0 deletions
diff --git a/sys/amd64/linux/linux_locore.s b/sys/amd64/linux/linux_locore.s
index 5dcc09a..1bcf05b 100644
--- a/sys/amd64/linux/linux_locore.s
+++ b/sys/amd64/linux/linux_locore.s
@@ -29,6 +29,7 @@ NON_GPROF_ENTRY(linux_rt_sigcode)
movq $LINUX_SYS_linux_rt_sigreturn,%rax /* linux_rt_sigreturn() */
syscall /* enter kernel with args */
hlt
+.endrtsigcode:
0: jmp 0b
NON_GPROF_ENTRY(__vdso_clock_gettime)
@@ -74,3 +75,34 @@ NON_GPROF_ENTRY(__vdso_getcpu)
.balign 4
.previous
#endif
+
+ .section .eh_frame,"a",@progbits
+.LSTARTFRAMEDLSI0:
+ .long .LENDCIEDLSI0-.LSTARTCIEDLSI0
+.LSTARTCIEDLSI0:
+ .long 0 /* CIE ID */
+ .byte 1 /* Version number */
+ .string "zR" /* NULL-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
+.LENDCIEDLSI0:
+ .long .LENDFDEDLSI0-.LSTARTFDEDLSI0 /* Length FDE */
+.LSTARTFDEDLSI0:
+ .long .LSTARTFDEDLSI0-.LSTARTFRAMEDLSI0 /* CIE pointer */
+ .long .startrtsigcode-. /* PC-relative start address */
+ .long .endrtsigcode-.startrtsigcode
+ .uleb128 0
+ .align 4
+.LENDFDEDLSI0:
+ .previous
OpenPOWER on IntegriCloud