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: SectionData (
64 @ CHECK: 0000: 00000000 B0B0B000 |........|
67 @ CHECK: Relocations [
68 @ CHECK: 0x0 R_ARM_PREL31 __gxx_personality_v0 0x0
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: SectionData (
89 @ CHECK: 0000: 00000000 00000000 |........|
92 @ CHECK: Relocations [
93 @ CHECK: 0x0 R_ARM_PREL31 .TEST1 0x0
94 @ CHECK: 0x4 R_ARM_PREL31 .ARM.extab.TEST1 0x0
98 @-------------------------------------------------------------------------------
99 @ Check the TEST2 section (without the dot in the beginning)
100 @-------------------------------------------------------------------------------
104 @ CHECK: SectionData (
105 @ CHECK: 0000: 1EFF2FE1 |../.|
109 @-------------------------------------------------------------------------------
110 @ Check the .ARM.extabTEST2 section, the EXTAB of TEST2 section.
111 @-------------------------------------------------------------------------------
113 @ CHECK: Name: .ARM.extabTEST2
114 @ CHECK: SectionData (
115 @ CHECK: 0000: 00000000 B0B0B000 |........|
118 @ CHECK: Relocations [
119 @ CHECK: 0x0 R_ARM_PREL31 __gxx_personality_v0 0x0
123 @-------------------------------------------------------------------------------
124 @ Check the .ARM.exidxTEST2 section, the EXIDX of TEST2 section.
125 @-------------------------------------------------------------------------------
127 @ CHECK: Name: .ARM.exidxTEST2
129 @-------------------------------------------------------------------------------
130 @ This section should linked with TEST2 section.
131 @-------------------------------------------------------------------------------
134 @-------------------------------------------------------------------------------
135 @ The first word should be relocated to the code address in TEST2 section.
136 @ The second word should be relocated to the EHTAB entry in .ARM.extabTEST2
138 @-------------------------------------------------------------------------------
139 @ CHECK: SectionData (
140 @ CHECK: 0000: 00000000 00000000 |........|
144 @ CHECK: Relocations [
145 @ CHECK: 0x0 R_ARM_PREL31 TEST2 0x0
146 @ CHECK: 0x4 R_ARM_PREL31 .ARM.extabTEST2 0x0
151 @-------------------------------------------------------------------------------
152 @ Check the symbols and the sections they belong to
153 @-------------------------------------------------------------------------------
157 @ CHECK: Section: .TEST1 (0x4)
161 @ CHECK: Section: TEST2 (0x9)