1 @ RUN: llvm-mc %s -triple=armv7-unknown-linux-gnueabi -filetype=obj -o - \
2 @ RUN: | llvm-readobj -s -sd -sr | FileCheck %s
4 @ Check the .fnstart directive and the .fnend directive.
6 @ The .fnstart directive and .fnend directive should create an entry in
7 @ exception handling table. For example, if the function is defined in .text
8 @ section, then there should be an entry in .ARM.exidx section.
23 @-------------------------------------------------------------------------------
24 @ Check the .text section.
25 @-------------------------------------------------------------------------------
29 @-------------------------------------------------------------------------------
30 @ Check the index of .text section. This will be used in .ARM.exidx.
31 @-------------------------------------------------------------------------------
34 @ CHECK: Type: SHT_PROGBITS (0x1)
35 @ CHECK: Flags [ (0x6)
36 @ CHECK: SHF_ALLOC (0x2)
37 @ CHECK: SHF_EXECINSTR (0x4)
39 @ CHECK: SectionData (
40 @ CHECK: 0000: 1EFF2FE1 |../.|
45 @-------------------------------------------------------------------------------
46 @ Check the name of the EXIDX section. For the function in the .text section,
47 @ this should be .ARM.exidx. It is incorrect to see .ARM.exidx.text here.
48 @-------------------------------------------------------------------------------
50 @ CHECK: Name: .ARM.exidx
51 @ CHECK: Type: SHT_ARM_EXIDX (0x70000001)
52 @ CHECK: Flags [ (0x82)
53 @ CHECK: SHF_ALLOC (0x2)
54 @ CHECK: SHF_LINK_ORDER (0x80)
57 @-------------------------------------------------------------------------------
58 @ Check the linked section of the EXIDX section. This should be the index
59 @ of the .text section.
60 @-------------------------------------------------------------------------------
63 @-------------------------------------------------------------------------------
64 @ The first word should be relocated to the code address in .text section.
65 @ Besides, since this function is using compact model 0, thus we have to
66 @ add an relocation to __aeabi_unwind_cpp_pr0.
67 @-------------------------------------------------------------------------------
68 @ CHECK: Relocations [
69 @ CHECK: 0x0 R_ARM_PREL31 .text 0x0
70 @ CHECK: 0x0 R_ARM_NONE __aeabi_unwind_cpp_pr0 0x0
73 @-------------------------------------------------------------------------------
74 @ The first word should be the offset to .text. The second word should be
75 @ 0xB0B0B080, which means compact model 0 is used (0x80) and the rest of the
76 @ word is filled with FINISH opcode (0xB0).
77 @-------------------------------------------------------------------------------
78 @ CHECK: SectionData (
79 @ CHECK: 0000: 00000000 B0B0B080 |........|