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