1 @ RUN: llvm-mc %s -triple=armv7-unknown-linux-gnueabi -filetype=obj -o - \
2 @ RUN: | llvm-readobj -s -sd -sr -t > %t
3 @ RUN: FileCheck %s < %t
4 @ RUN: FileCheck --check-prefix=RELOC %s < %t
6 @ Check whether the section is switched back properly.
8 @ The assembler should switch the section back to the corresponding section
9 @ after it have emitted the exception handling indices and tables. In this
10 @ test case, we are checking whether the section is correct when .section
13 @ In this example, func1 and func2 should be defined in .TEST1 section.
14 @ It is incorrect if the func2 is in .text, .ARM.extab.TEST1, or
15 @ .ARM.exidx.TEST1 sections.
27 .personality __gxx_personality_v0
37 .personality __gxx_personality_v0
42 @-------------------------------------------------------------------------------
43 @ Check the .text section. This should be empty.
44 @-------------------------------------------------------------------------------
48 @ CHECK: SectionData (
53 @-------------------------------------------------------------------------------
54 @ Check the .TEST1 section. There should be two "bx lr" instructions.
55 @-------------------------------------------------------------------------------
58 @ CHECK-NEXT: Name: .TEST1
59 @ CHECK: SectionData (
60 @ CHECK: 0000: 1EFF2FE1 1EFF2FE1 |../.../.|
66 @-------------------------------------------------------------------------------
67 @ Check the .ARM.extab.TEST1 section.
68 @-------------------------------------------------------------------------------
70 @ CHECK: Name: .ARM.extab.TEST1
71 @ CHECK: SectionData (
72 @ CHECK: 0000: 00000000 B0B0B000 00000000 B0B0B000 |................|
77 @ RELOC: Name: .rel.ARM.extab.TEST1
78 @ RELOC: Relocations [
79 @ RELOC: 0x0 R_ARM_PREL31 __gxx_personality_v0 0x0
80 @ RELOC: 0x8 R_ARM_PREL31 __gxx_personality_v0 0x0
85 @-------------------------------------------------------------------------------
86 @ Check the .ARM.exidx.TEST1 section.
87 @-------------------------------------------------------------------------------
89 @ CHECK: Name: .ARM.exidx.TEST1
91 @-------------------------------------------------------------------------------
92 @ The first word should be the offset to .TEST1.
93 @ The second word should be the offset to .ARM.extab.TEST1
94 @-------------------------------------------------------------------------------
95 @ CHECK: SectionData (
96 @ CHECK: 0000: 00000000 00000000 04000000 08000000 |................|
99 @-------------------------------------------------------------------------------
100 @ The first word of each entry should be relocated to .TEST1 section.
101 @ The second word of each entry should be relocated to
102 @ .ARM.extab.TESET1 section.
103 @-------------------------------------------------------------------------------
106 @ RELOC: Name: .rel.ARM.exidx.TEST1
107 @ RELOC: Relocations [
108 @ RELOC: 0x0 R_ARM_PREL31 .TEST1 0x0
109 @ RELOC: 0x4 R_ARM_PREL31 .ARM.extab.TEST1 0x0
110 @ RELOC: 0x8 R_ARM_PREL31 .TEST1 0x0
111 @ RELOC: 0xC R_ARM_PREL31 .ARM.extab.TEST1 0x0
116 @-------------------------------------------------------------------------------
117 @ Check the symbols "func1" and "func2". They should belong to .TEST1 section.
118 @-------------------------------------------------------------------------------
124 @ CHECK: Binding: Global (0x1)
125 @ CHECK: Type: Function (0x2)
127 @ CHECK: Section: .TEST1
133 @ CHECK: Binding: Global (0x1)
134 @ CHECK: Type: Function (0x2)
136 @ CHECK: Section: .TEST1