1 @ RUN: llvm-mc %s -triple=armv7-unknown-linux-gnueabi -filetype=obj -o - \
2 @ RUN: | llvm-readobj -s -sd -sr -t | FileCheck %s
4 @ Check the combination of .section, .fnstart, and .fnend directives.
6 @ For the functions in .text section, the exception handling index (EXIDX)
7 @ should be generated in .ARM.exidx, and the exception handling table (EXTAB)
8 @ should be generated in .ARM.extab.
10 @ For the functions in custom section specified by .section directives,
11 @ the EXIDX should be generated in ".ARM.exidx[[SECTION_NAME]]", and the EXTAB
12 @ should be generated in ".ARM.extab[[SECTION_NAME]]".
16 @-------------------------------------------------------------------------------
18 @-------------------------------------------------------------------------------
26 .personality __gxx_personality_v0
31 @-------------------------------------------------------------------------------
32 @ TEST2 section (without the dot in the beginning)
33 @-------------------------------------------------------------------------------
41 .personality __gxx_personality_v0
46 @-------------------------------------------------------------------------------
47 @ Check the .TEST1 section.
48 @-------------------------------------------------------------------------------
53 @ CHECK: SectionData (
54 @ CHECK: 0000: 1EFF2FE1 |../.|
58 @-------------------------------------------------------------------------------
59 @ Check the .ARM.extab.TEST1 section, the EXTAB of .TEST1 section.
60 @-------------------------------------------------------------------------------
62 @ CHECK: Name: .ARM.extab.TEST1
63 @ CHECK: Relocations [
64 @ CHECK: 0x0 R_ARM_PREL31 __gxx_personality_v0 0x0
66 @ CHECK: SectionData (
67 @ CHECK: 0000: 00000000 B0B0B000 |........|
72 @-------------------------------------------------------------------------------
73 @ Check the.ARM.exidx.TEST1 section, the EXIDX of .TEST1 section.
74 @-------------------------------------------------------------------------------
76 @ CHECK: Name: .ARM.exidx.TEST1
78 @-------------------------------------------------------------------------------
79 @ This section should linked with .TEST1 section.
80 @-------------------------------------------------------------------------------
83 @-------------------------------------------------------------------------------
84 @ The first word should be relocated to the code address in .TEST1 section.
85 @ The second word should be relocated to the EHTAB entry in .ARM.extab.TEST1
87 @-------------------------------------------------------------------------------
88 @ CHECK: Relocations [
89 @ CHECK: 0x0 R_ARM_PREL31 .TEST1 0x0
90 @ CHECK: 0x4 R_ARM_PREL31 .ARM.extab.TEST1 0x0
92 @ CHECK: SectionData (
93 @ CHECK: 0000: 00000000 00000000 |........|
99 @-------------------------------------------------------------------------------
100 @ Check the TEST2 section (without the dot in the beginning)
101 @-------------------------------------------------------------------------------
105 @ CHECK: SectionData (
106 @ CHECK: 0000: 1EFF2FE1 |../.|
110 @-------------------------------------------------------------------------------
111 @ Check the .ARM.extabTEST2 section, the EXTAB of TEST2 section.
112 @-------------------------------------------------------------------------------
114 @ CHECK: Name: .ARM.extabTEST2
115 @ CHECK: Relocations [
116 @ CHECK: 0x0 R_ARM_PREL31 __gxx_personality_v0 0x0
118 @ CHECK: SectionData (
119 @ CHECK: 0000: 00000000 B0B0B000 |........|
124 @-------------------------------------------------------------------------------
125 @ Check the .ARM.exidxTEST2 section, the EXIDX of TEST2 section.
126 @-------------------------------------------------------------------------------
128 @ CHECK: Name: .ARM.exidxTEST2
130 @-------------------------------------------------------------------------------
131 @ This section should linked with TEST2 section.
132 @-------------------------------------------------------------------------------
135 @-------------------------------------------------------------------------------
136 @ The first word should be relocated to the code address in TEST2 section.
137 @ The second word should be relocated to the EHTAB entry in .ARM.extabTEST2
139 @-------------------------------------------------------------------------------
140 @ CHECK: Relocations [
141 @ CHECK: 0x0 R_ARM_PREL31 TEST2 0x0
142 @ CHECK: 0x4 R_ARM_PREL31 .ARM.extabTEST2 0x0
144 @ CHECK: SectionData (
145 @ CHECK: 0000: 00000000 00000000 |........|
152 @-------------------------------------------------------------------------------
153 @ Check the symbols and the sections they belong to
154 @-------------------------------------------------------------------------------
158 @ CHECK: Section: .TEST1 (0x4)
162 @ CHECK: Section: TEST2 (0x9)