aboutsummaryrefslogtreecommitdiff
path: root/test/MC/AsmParser/section.s
blob: 0c3828d714a75aee681799297ea33c5f02df6460 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# RUN: llvm-mc -triple i386-pc-linux-gnu -filetype=obj -o %t %s
# RUN: llvm-readobj -s -sd < %t | FileCheck %s
.section test1
.byte 1
.section test2
.byte 2
.previous
.byte 1
.section test2
.byte 2
.previous
.byte 1
.section test1
.byte 1
.previous
.byte 1
.section test2
.byte 2
.pushsection test3
.byte 3
.pushsection test4
.byte 4
.pushsection test5
.byte 5
.popsection
.byte 4
.popsection
.byte 3
.popsection
.byte 2
.pushsection test3
.byte 3
.pushsection test4
.byte 4
.previous
.byte 3
.popsection
.byte 3
.previous
.byte 2
.section test1
.byte 1
.popsection
.byte 2
.previous
.byte 1
.previous

# CHECK:      Sections [
# CHECK:        Section {
# CHECK:          Name: test1 (68)
# CHECK-NEXT:     Type: SHT_PROGBITS
# CHECK-NEXT:     Flags [ (0x0)
# CHECK-NEXT:     ]
# CHECK-NEXT:     Address: 0x0
# CHECK-NEXT:     Offset: 0x34
# CHECK-NEXT:     Size: 7
# CHECK-NEXT:     Link: 0
# CHECK-NEXT:     Info: 0
# CHECK-NEXT:     AddressAlignment: 1
# CHECK-NEXT:     EntrySize: 0
# CHECK-NEXT:     SectionData (
# CHECK-NEXT:       0000: 01010101 010101
# CHECK-NEXT:     )
# CHECK-NEXT:   }
# CHECK:        Section {
# CHECK:          Name: test2 (62)
# CHECK-NEXT:     Type: SHT_PROGBITS
# CHECK-NEXT:     Flags [ (0x0)
# CHECK-NEXT:     ]
# CHECK-NEXT:     Address: 0x0
# CHECK-NEXT:     Offset: 0x3B
# CHECK-NEXT:     Size: 6
# CHECK-NEXT:     Link: 0
# CHECK-NEXT:     Info: 0
# CHECK-NEXT:     AddressAlignment: 1
# CHECK-NEXT:     EntrySize: 0
# CHECK-NEXT:     SectionData (
# CHECK-NEXT:       0000: 02020202 0202
# CHECK-NEXT:     )
# CHECK-NEXT:   }
# CHECK:        Section {
# CHECK:          Name: test3 (56)
# CHECK-NEXT:     Type: SHT_PROGBITS
# CHECK-NEXT:     Flags [ (0x0)
# CHECK-NEXT:     ]
# CHECK-NEXT:     Address: 0x0
# CHECK-NEXT:     Offset: 0x41
# CHECK-NEXT:     Size: 5
# CHECK-NEXT:     Link: 0
# CHECK-NEXT:     Info: 0
# CHECK-NEXT:     AddressAlignment: 1
# CHECK-NEXT:     EntrySize: 0
# CHECK-NEXT:     SectionData (
# CHECK-NEXT:       0000: 03030303 03
# CHECK-NEXT:     )
# CHECK-NEXT:   }
# CHECK:        Section {
# CHECK:          Name: test4 (50)
# CHECK-NEXT:     Type: SHT_PROGBITS
# CHECK-NEXT:     Flags [ (0x0)
# CHECK-NEXT:     ]
# CHECK-NEXT:     Address: 0x0
# CHECK-NEXT:     Offset: 0x46
# CHECK-NEXT:     Size: 3
# CHECK-NEXT:     Link: 0
# CHECK-NEXT:     Info: 0
# CHECK-NEXT:     AddressAlignment: 1
# CHECK-NEXT:     EntrySize: 0
# CHECK-NEXT:     SectionData (
# CHECK-NEXT:       0000: 040404
# CHECK-NEXT:     )
# CHECK-NEXT:   }
# CHECK:        Section {
# CHECK:          Name: test5 (44)
# CHECK-NEXT:     Type: SHT_PROGBITS
# CHECK-NEXT:     Flags [ (0x0)
# CHECK-NEXT:     ]
# CHECK-NEXT:     Address: 0x0
# CHECK-NEXT:     Offset: 0x49
# CHECK-NEXT:     Size: 1
# CHECK-NEXT:     Link: 0
# CHECK-NEXT:     Info: 0
# CHECK-NEXT:     AddressAlignment: 1
# CHECK-NEXT:     EntrySize: 0
# CHECK-NEXT:     SectionData (
# CHECK-NEXT:       0000: 05
# CHECK-NEXT:     )
# CHECK-NEXT:   }