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 .group section for the function in comdat section.
6 @ In C++, the instantiation of the template will come with linkonce (or
7 @ linkonce_odr) linkage, so that the linker can remove the duplicated
8 @ instantiation. When the exception handling is enabled on those function,
9 @ we have to group the corresponding .ARM.extab and .ARM.exidx with the
10 @ text section together.
12 @ This test case will check the content of .group section. The section index
13 @ of the grouped sections should be recorded in .group section.
16 .section .TEST1,"axG",%progbits,func1,comdat
24 .vsave {d8, d9, d10, d11, d12}
25 vpush {d8, d9, d10, d11, d12}
30 vpop {d8, d9, d10, d11, d12}
33 .globl __gxx_personality_v0
34 .personality __gxx_personality_v0
40 @-------------------------------------------------------------------------------
41 @ Check the .group section
42 @-------------------------------------------------------------------------------
47 @ CHECK: Type: SHT_GROUP (0x11)
48 @ CHECK: Flags [ (0x0)
51 @ CHECK: SectionData (
52 @-------------------------------------------------------------------------------
53 @ These are the section indexes of .TEST1, .ARM.extab.TEST1, .ARM.exidx.TEST1,
54 @ .rel.ARM.extab.TEST1, and .rel.ARM.exidx.TEST1.
55 @-------------------------------------------------------------------------------
56 @ CHECK-NEXT: 0000: 01000000 04000000 05000000 06000000
57 @ CHECK-NEXT: 0010: 07000000 08000000
62 @-------------------------------------------------------------------------------
63 @ Check the .TEST1 section
64 @-------------------------------------------------------------------------------
67 @ CHECK-NEXT: Name: .TEST1
68 @ CHECK: Type: SHT_PROGBITS (0x1)
69 @-------------------------------------------------------------------------------
70 @ The flags should contain SHF_GROUP.
71 @-------------------------------------------------------------------------------
72 @ CHECK: Flags [ (0x206)
73 @ CHECK: SHF_ALLOC (0x2)
74 @ CHECK: SHF_EXECINSTR (0x4)
75 @ CHECK: SHF_GROUP (0x200)
80 @-------------------------------------------------------------------------------
81 @ Check the .ARM.extab.TEST1 section
82 @-------------------------------------------------------------------------------
85 @ CHECK-NEXT: Name: .ARM.extab.TEST1
86 @ CHECK: Type: SHT_PROGBITS (0x1)
87 @-------------------------------------------------------------------------------
88 @ The flags should contain SHF_GROUP.
89 @-------------------------------------------------------------------------------
90 @ CHECK: Flags [ (0x202)
91 @ CHECK: SHF_ALLOC (0x2)
92 @ CHECK: SHF_GROUP (0x200)
98 @ CHECK-NEXT: Name: .rel.ARM.extab.TEST1
101 @-------------------------------------------------------------------------------
102 @ Check the .ARM.exidx.TEST1 section
103 @-------------------------------------------------------------------------------
106 @ CHECK-NEXT: Name: .ARM.exidx.TEST1
107 @ CHECK: Type: SHT_ARM_EXIDX (0x70000001)
108 @-------------------------------------------------------------------------------
109 @ The flags should contain SHF_GROUP.
110 @-------------------------------------------------------------------------------
111 @ CHECK: Flags [ (0x282)
112 @ CHECK: SHF_ALLOC (0x2)
113 @ CHECK: SHF_GROUP (0x200)
114 @ CHECK: SHF_LINK_ORDER (0x80)
122 @ CHECK-NEXT: Name: .rel.ARM.exidx.TEST1
127 @-------------------------------------------------------------------------------
128 @ Check symbol func1. It should be weak binding, and belong to .TEST1 section.
129 @-------------------------------------------------------------------------------
133 @ CHECK: Binding: Weak (0x2)
134 @ CHECK: Type: Function (0x2)
135 @ CHECK: Section: .TEST1