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 whether the section is switched back properly.
6 @ The assembler should switch the section back to the corresponding section
7 @ after it have emitted the exception handling indices and tables. In this
8 @ test case, we are checking whether the section is correct when .section
11 @ In this example, func1 and func2 should be defined in .TEST1 section.
12 @ It is incorrect if the func2 is in .text, .ARM.extab.TEST1, or
13 @ .ARM.exidx.TEST1 sections.
25 .personality __gxx_personality_v0
35 .personality __gxx_personality_v0
40 @-------------------------------------------------------------------------------
41 @ Check the .text section. This should be empty.
42 @-------------------------------------------------------------------------------
46 @ CHECK: SectionData (
51 @-------------------------------------------------------------------------------
52 @ Check the .TEST1 section. There should be two "bx lr" instructions.
53 @-------------------------------------------------------------------------------
56 @ CHECK: SectionData (
57 @ CHECK: 0000: 1EFF2FE1 1EFF2FE1 |../.../.|
63 @-------------------------------------------------------------------------------
64 @ Check the .ARM.extab.TEST1 section.
65 @-------------------------------------------------------------------------------
67 @ CHECK: Name: .ARM.extab.TEST1
68 @ CHECK: Relocations [
69 @ CHECK: 0x0 R_ARM_PREL31 __gxx_personality_v0 0x0
70 @ CHECK: 0x8 R_ARM_PREL31 __gxx_personality_v0 0x0
72 @ CHECK: SectionData (
73 @ CHECK: 0000: 00000000 B0B0B000 00000000 B0B0B000 |................|
78 @-------------------------------------------------------------------------------
79 @ Check the .ARM.exidx.TEST1 section.
80 @-------------------------------------------------------------------------------
82 @ CHECK: Name: .ARM.exidx.TEST1
84 @-------------------------------------------------------------------------------
85 @ The first word of each entry should be relocated to .TEST1 section.
86 @ The second word of each entry should be relocated to
87 @ .ARM.extab.TESET1 section.
88 @-------------------------------------------------------------------------------
89 @ CHECK: Relocations [
90 @ CHECK: 0x0 R_ARM_PREL31 .TEST1 0x0
91 @ CHECK: 0x4 R_ARM_PREL31 .ARM.extab.TEST1 0x0
92 @ CHECK: 0x8 R_ARM_PREL31 .TEST1 0x0
93 @ CHECK: 0xC R_ARM_PREL31 .ARM.extab.TEST1 0x0
95 @-------------------------------------------------------------------------------
96 @ The first word should be the offset to .TEST1.
97 @ The second word should be the offset to .ARM.extab.TEST1
98 @-------------------------------------------------------------------------------
99 @ CHECK: SectionData (
100 @ CHECK: 0000: 00000000 00000000 04000000 08000000 |................|
107 @-------------------------------------------------------------------------------
108 @ Check the symbols "func1" and "func2". They should belong to .TEST1 section.
109 @-------------------------------------------------------------------------------
115 @ CHECK: Binding: Global (0x1)
116 @ CHECK: Type: Function (0x2)
118 @ CHECK: Section: .TEST1 (0x4)
124 @ CHECK: Binding: Global (0x1)
125 @ CHECK: Type: Function (0x2)
127 @ CHECK: Section: .TEST1 (0x4)