1 @ RUN: llvm-mc %s -triple=armv7-unknown-linux-gnueabi -filetype=obj -o - \ 2 @ RUN: | llvm-readobj -s -sd -sr | FileCheck %s 3 4 @ Check the .personality directive. 5 6 .syntax unified 7 8 @------------------------------------------------------------------------------- 9 @ TEST1 10 @------------------------------------------------------------------------------- 11 .section .TEST1 12 .globl func1 13 .align 2 14 .type func1,%function 15 .fnstart 16 func1: 17 bx lr 18 .personality __gxx_personality_v0 19 .handlerdata 20 .fnend 21 22 23 @ CHECK: Section { 24 @ CHECK: Name: .TEST1 25 @ CHECK: SectionData ( 26 @ CHECK: 0000: 1EFF2FE1 |../.| 27 @ CHECK: ) 28 @ CHECK: } 29 @ CHECK: Section { 30 @ CHECK: Name: .ARM.extab.TEST1 31 @ CHECK: SectionData ( 32 @ CHECK: 0000: 00000000 B0B0B000 |........| 33 @ CHECK: ) 34 @ CHECK: } 35 @ CHECK: Relocations [ 36 @ CHECK: 0x0 R_ARM_PREL31 __gxx_personality_v0 0x0 37 @ CHECK: ] 38 @ CHECK: Section { 39 @ CHECK: Name: .ARM.exidx.TEST1 40 @ CHECK: SectionData ( 41 @ CHECK: 0000: 00000000 00000000 |........| 42 @ CHECK: ) 43 @ CHECK: } 44 @ CHECK: Relocations [ 45 @ CHECK: 0x0 R_ARM_PREL31 .TEST1 0x0 46 @ CHECK: 0x4 R_ARM_PREL31 .ARM.extab.TEST1 0x0 47 @ CHECK: ] 48 49 50 @------------------------------------------------------------------------------- 51 @ TEST2 52 @------------------------------------------------------------------------------- 53 .section .TEST2 54 .globl func2 55 .align 2 56 .type func2,%function 57 .fnstart 58 func2: 59 bx lr 60 .personality __gxx_personality_v0 61 @ The .handlerdata directive is intentionally ignored. The .fnend @ directive should create the EXTAB entry and flush the unwind opcodes. 62 .fnend 63 64 65 @ CHECK: Section { 66 @ CHECK: Name: .TEST2 67 @ CHECK: SectionData ( 68 @ CHECK: 0000: 1EFF2FE1 |../.| 69 @ CHECK: ) 70 @ CHECK: } 71 @ CHECK: Section { 72 @ CHECK: Name: .ARM.extab.TEST2 73 @ CHECK: SectionData ( 74 @ CHECK: 0000: 00000000 B0B0B000 |........| 75 @ CHECK: ) 76 @ CHECK: } 77 @ CHECK: Relocations [ 78 @ CHECK: 0x0 R_ARM_PREL31 __gxx_personality_v0 0x0 79 @ CHECK: ] 80 @ CHECK: Section { 81 @ CHECK: Name: .ARM.exidx.TEST2 82 @ CHECK: SectionData ( 83 @ CHECK: 0000: 00000000 00000000 |........| 84 @ CHECK: ) 85 @ CHECK: } 86 @ CHECK: Relocations [ 87 @ CHECK: 0x0 R_ARM_PREL31 .TEST2 0x0 88 @ CHECK: 0x4 R_ARM_PREL31 .ARM.extab.TEST2 0x0 89 @ CHECK: ] 90