section-flags.test
5.28 KB
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
## Check how we dump regular ELF section flags.
# RUN: yaml2obj %s -o %t.o
# RUN: llvm-readobj -S %t.o | FileCheck --check-prefix=LLVM %s
# RUN: llvm-readelf -S %t.o | FileCheck --check-prefix=GNU %s
# LLVM: Name: allflags
# LLVM-NEXT: Type: SHT_PROGBITS
# LLVM-NEXT: Flags [ (0x80000FF7)
# LLVM-NEXT: SHF_ALLOC (0x2)
# LLVM-NEXT: SHF_COMPRESSED (0x800)
# LLVM-NEXT: SHF_EXCLUDE (0x80000000)
# LLVM-NEXT: SHF_EXECINSTR (0x4)
# LLVM-NEXT: SHF_GROUP (0x200)
# LLVM-NEXT: SHF_INFO_LINK (0x40)
# LLVM-NEXT: SHF_LINK_ORDER (0x80)
# LLVM-NEXT: SHF_MERGE (0x10)
# LLVM-NEXT: SHF_OS_NONCONFORMING (0x100)
# LLVM-NEXT: SHF_STRINGS (0x20)
# LLVM-NEXT: SHF_TLS (0x400)
# LLVM-NEXT: SHF_WRITE (0x1)
# LLVM-NEXT: ]
# LLVM: Name: noflags
# LLVM-NEXT: Type: SHT_PROGBITS
# LLVM-NEXT: Flags [ (0x0)
# LLVM-NEXT: ]
# LLVM: Name: write
# LLVM-NEXT: Type: SHT_PROGBITS
# LLVM-NEXT: Flags [ (0x1)
# LLVM-NEXT: SHF_WRITE (0x1)
# LLVM-NEXT: ]
# LLVM: Name: alloc
# LLVM-NEXT: Type: SHT_PROGBITS
# LLVM-NEXT: Flags [ (0x2)
# LLVM-NEXT: SHF_ALLOC (0x2)
# LLVM-NEXT: ]
# LLVM: Name: exec
# LLVM-NEXT: Type: SHT_PROGBITS
# LLVM-NEXT: Flags [ (0x4)
# LLVM-NEXT: SHF_EXECINSTR (0x4)
# LLVM-NEXT: ]
# LLVM: Name: merge
# LLVM-NEXT: Type: SHT_PROGBITS
# LLVM-NEXT: Flags [ (0x10)
# LLVM-NEXT: SHF_MERGE (0x10)
# LLVM-NEXT: ]
# LLVM: Name: strings
# LLVM-NEXT: Type: SHT_PROGBITS
# LLVM-NEXT: Flags [ (0x20)
# LLVM-NEXT: SHF_STRINGS (0x20)
# LLVM-NEXT: ]
# LLVM: Name: infolink
# LLVM-NEXT: Type: SHT_PROGBITS
# LLVM-NEXT: Flags [ (0x40)
# LLVM-NEXT: SHF_INFO_LINK (0x40)
# LLVM-NEXT: ]
# LLVM: Name: linkorder
# LLVM-NEXT: Type: SHT_PROGBITS
# LLVM-NEXT: Flags [ (0x80)
# LLVM-NEXT: SHF_LINK_ORDER (0x80)
# LLVM-NEXT: ]
# LLVM: Name: nonconforming
# LLVM-NEXT: Type: SHT_PROGBITS
# LLVM-NEXT: Flags [ (0x100)
# LLVM-NEXT: SHF_OS_NONCONFORMING (0x100)
# LLVM-NEXT: ]
# LLVM: Name: group
# LLVM-NEXT: Type: SHT_PROGBITS
# LLVM-NEXT: Flags [ (0x200)
# LLVM-NEXT: SHF_GROUP (0x200)
# LLVM-NEXT: ]
# LLVM: Name: tls
# LLVM-NEXT: Type: SHT_PROGBITS
# LLVM-NEXT: Flags [ (0x400)
# LLVM-NEXT: SHF_TLS (0x400)
# LLVM-NEXT: ]
# LLVM: Name: compressed
# LLVM-NEXT: Type: SHT_PROGBITS
# LLVM-NEXT: Flags [ (0x800)
# LLVM-NEXT: SHF_COMPRESSED (0x800)
# LLVM-NEXT: ]
# LLVM: Name: exclude
# LLVM-NEXT: Type: SHT_PROGBITS
# LLVM-NEXT: Flags [ (0x80000000)
# LLVM-NEXT: SHF_EXCLUDE (0x80000000)
# LLVM-NEXT: ]
# LLVM: Name: unknown
# LLVM-NEXT: Type: SHT_PROGBITS
# LLVM-NEXT: Flags [ (0xF0000)
# LLVM-NEXT: ]
# GNU: [Nr] Name Type Address Off Size ES Flg Lk Inf Al
# GNU: [ 1] allflags PROGBITS 0000000000000000 000040 000000 00 WAXMSILOGTCE 0 0 0
# GNU: [ 2] noflags PROGBITS 0000000000000000 000040 000000 00 0 0 0
# GNU: [ 3] write PROGBITS 0000000000000000 000040 000000 00 W 0 0 0
# GNU: [ 4] alloc PROGBITS 0000000000000000 000040 000000 00 A 0 0 0
# GNU: [ 5] exec PROGBITS 0000000000000000 000040 000000 00 X 0 0 0
# GNU: [ 6] merge PROGBITS 0000000000000000 000040 000000 00 M 0 0 0
# GNU: [ 7] strings PROGBITS 0000000000000000 000040 000000 00 S 0 0 0
# GNU: [ 8] infolink PROGBITS 0000000000000000 000040 000000 00 I 0 0 0
# GNU: [ 9] linkorder PROGBITS 0000000000000000 000040 000000 00 L 0 0 0
# GNU: [10] nonconforming PROGBITS 0000000000000000 000040 000000 00 O 0 0 0
# GNU: [11] group PROGBITS 0000000000000000 000040 000000 00 G 0 0 0
# GNU: [12] tls PROGBITS 0000000000000000 000040 000000 00 T 0 0 0
# GNU: [13] compressed PROGBITS 0000000000000000 000040 000000 00 C 0 0 0
# GNU: [14] exclude PROGBITS 0000000000000000 000040 000000 00 E 0 0 0
# GNU: [15] unknown PROGBITS 0000000000000000 000040 000000 00 x 0 0 0
--- !ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_REL
Machine: EM_X86_64
Flags: []
Sections:
- Name: allflags
Type: SHT_PROGBITS
Flags: [ SHF_WRITE, SHF_ALLOC, SHF_EXECINSTR, SHF_MERGE,
SHF_STRINGS, SHF_INFO_LINK, SHF_LINK_ORDER, SHF_OS_NONCONFORMING,
SHF_GROUP, SHF_TLS, SHF_COMPRESSED, SHF_EXCLUDE ]
- Name: noflags
Type: SHT_PROGBITS
Flags: [ ]
- Name: write
Type: SHT_PROGBITS
Flags: [ SHF_WRITE ]
- Name: alloc
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC ]
- Name: exec
Type: SHT_PROGBITS
Flags: [ SHF_EXECINSTR ]
- Name: merge
Type: SHT_PROGBITS
Flags: [ SHF_MERGE ]
- Name: strings
Type: SHT_PROGBITS
Flags: [ SHF_STRINGS ]
- Name: infolink
Type: SHT_PROGBITS
Flags: [ SHF_INFO_LINK ]
- Name: linkorder
Type: SHT_PROGBITS
Flags: [ SHF_LINK_ORDER ]
- Name: nonconforming
Type: SHT_PROGBITS
Flags: [ SHF_OS_NONCONFORMING ]
- Name: group
Type: SHT_PROGBITS
Flags: [ SHF_GROUP ]
- Name: tls
Type: SHT_PROGBITS
Flags: [ SHF_TLS ]
- Name: compressed
Type: SHT_PROGBITS
Flags: [ SHF_COMPRESSED ]
- Name: exclude
Type: SHT_PROGBITS
Flags: [ SHF_EXCLUDE ]
- Name: unknown
Type: SHT_PROGBITS
ShFlags: 0x000f0000