121 lines · plain
1# REQUIRES: asserts2# UNSUPPORTED: system-windows3# RUN: llvm-mc -triple=x86_64-unknown-linux -position-independent \4# RUN: -filetype=obj -o %t %s5# RUN: llvm-jitlink -num-threads=0 -debug-only=jitlink -noexec \6# RUN: -abs bar=0x01 -abs _ZTIi=0x02 %t 2>&1 \7# RUN: | FileCheck %s8#9# FIXME: This test should run on windows. Investigate spurious10# 'note: command had no output on stdout or stderr' errors, then re-enable.11#12# Check that a basic .eh-frame section is recognized and parsed. We13# Expect to see two FDEs with corresponding keep-alive edges.14#15# CHECK: Adding keep-alive edge from target at {{.*}} to FDE at16# CHECK: Adding keep-alive edge from target at {{.*}} to FDE at17 18 .text19 .file "exceptions.cpp"20 .globl foo21 .p2align 4, 0x9022 .type foo,@function23foo:24 .cfi_startproc25 26 pushq %rax27 .cfi_def_cfa_offset 1628 movl $4, %edi29 callq __cxa_allocate_exception@PLT30 movl $1, (%rax)31 movq _ZTIi@GOTPCREL(%rip), %rsi32 movq %rax, %rdi33 xorl %edx, %edx34 callq __cxa_throw@PLT35.Lfunc_end0:36 .size foo, .Lfunc_end0-foo37 .cfi_endproc38 39 .globl main40 .p2align 4, 0x9041 .type main,@function42main:43.Lfunc_begin0:44 .cfi_startproc45 .cfi_personality 155, DW.ref.__gxx_personality_v046 .cfi_lsda 27, .Lexception047 48 pushq %rbx49 .cfi_def_cfa_offset 1650 .cfi_offset %rbx, -1651 xorl %ebx, %ebx52.Ltmp0:53 callq bar@PLT54.Ltmp1:55 56 movl %ebx, %eax57 popq %rbx58 .cfi_def_cfa_offset 859 retq60.LBB1_1:61 .cfi_def_cfa_offset 1662.Ltmp2:63 movq %rax, %rdi64 callq __cxa_begin_catch@PLT65 callq __cxa_end_catch@PLT66 movl $1, %ebx67 movl %ebx, %eax68 popq %rbx69 .cfi_def_cfa_offset 870 retq71.Lfunc_end1:72 .size main, .Lfunc_end1-main73 .cfi_endproc74 .section .gcc_except_table,"a",@progbits75 .p2align 276GCC_except_table1:77.Lexception0:78 .byte 25579 .byte 15680 .uleb128 .Lttbase0-.Lttbaseref081.Lttbaseref0:82 .byte 183 .uleb128 .Lcst_end0-.Lcst_begin084.Lcst_begin0:85 .uleb128 .Ltmp0-.Lfunc_begin086 .uleb128 .Ltmp1-.Ltmp087 .uleb128 .Ltmp2-.Lfunc_begin088 .byte 189 .uleb128 .Ltmp1-.Lfunc_begin090 .uleb128 .Lfunc_end1-.Ltmp191 .byte 092 .byte 093.Lcst_end0:94 .byte 195 96 .byte 097 .p2align 298 99.Ltmp3:100 .quad .L_ZTIi.DW.stub-.Ltmp3101.Lttbase0:102 .p2align 2103 104 .data105 .p2align 3106.L_ZTIi.DW.stub:107 .quad _ZTIi108 .hidden DW.ref.__gxx_personality_v0109 .weak DW.ref.__gxx_personality_v0110 .section .data.DW.ref.__gxx_personality_v0,"awG",@progbits,DW.ref.__gxx_personality_v0,comdat111 .p2align 3112 .type DW.ref.__gxx_personality_v0,@object113 .size DW.ref.__gxx_personality_v0, 8114DW.ref.__gxx_personality_v0:115 .quad __gxx_personality_v0116 .ident "clang version 12.0.0 (git@github.com:llvm/llvm-project.git afd483e57d166418e94a65bd9716e7dc4c114eed)"117 .section ".note.GNU-stack","",@progbits118 .addrsig119 .addrsig_sym __gxx_personality_v0120 .addrsig_sym _ZTIi121