1 ## Check how we dump regular ELF section flags.
3 # RUN: yaml2obj %s -o %t.o
4 # RUN: llvm-readobj -S %t.o | FileCheck --check-prefix=LLVM %s
5 # RUN: llvm-readelf -S %t.o | FileCheck --check-prefix=GNU %s
8 # LLVM-NEXT: Type: SHT_PROGBITS
9 # LLVM-NEXT: Flags [ (0x80200FF7)
10 # LLVM-NEXT: SHF_ALLOC (0x2)
11 # LLVM-NEXT: SHF_COMPRESSED (0x800)
12 # LLVM-NEXT: SHF_EXCLUDE (0x80000000)
13 # LLVM-NEXT: SHF_EXECINSTR (0x4)
14 # LLVM-NEXT: SHF_GNU_RETAIN (0x200000)
15 # LLVM-NEXT: SHF_GROUP (0x200)
16 # LLVM-NEXT: SHF_INFO_LINK (0x40)
17 # LLVM-NEXT: SHF_LINK_ORDER (0x80)
18 # LLVM-NEXT: SHF_MERGE (0x10)
19 # LLVM-NEXT: SHF_OS_NONCONFORMING (0x100)
20 # LLVM-NEXT: SHF_STRINGS (0x20)
21 # LLVM-NEXT: SHF_TLS (0x400)
22 # LLVM-NEXT: SHF_WRITE (0x1)
26 # LLVM-NEXT: Type: SHT_PROGBITS
27 # LLVM-NEXT: Flags [ (0x0)
31 # LLVM-NEXT: Type: SHT_PROGBITS
32 # LLVM-NEXT: Flags [ (0x1)
33 # LLVM-NEXT: SHF_WRITE (0x1)
37 # LLVM-NEXT: Type: SHT_PROGBITS
38 # LLVM-NEXT: Flags [ (0x2)
39 # LLVM-NEXT: SHF_ALLOC (0x2)
43 # LLVM-NEXT: Type: SHT_PROGBITS
44 # LLVM-NEXT: Flags [ (0x4)
45 # LLVM-NEXT: SHF_EXECINSTR (0x4)
49 # LLVM-NEXT: Type: SHT_PROGBITS
50 # LLVM-NEXT: Flags [ (0x10)
51 # LLVM-NEXT: SHF_MERGE (0x10)
55 # LLVM-NEXT: Type: SHT_PROGBITS
56 # LLVM-NEXT: Flags [ (0x20)
57 # LLVM-NEXT: SHF_STRINGS (0x20)
60 # LLVM: Name: infolink
61 # LLVM-NEXT: Type: SHT_PROGBITS
62 # LLVM-NEXT: Flags [ (0x40)
63 # LLVM-NEXT: SHF_INFO_LINK (0x40)
66 # LLVM: Name: linkorder
67 # LLVM-NEXT: Type: SHT_PROGBITS
68 # LLVM-NEXT: Flags [ (0x80)
69 # LLVM-NEXT: SHF_LINK_ORDER (0x80)
72 # LLVM: Name: nonconforming
73 # LLVM-NEXT: Type: SHT_PROGBITS
74 # LLVM-NEXT: Flags [ (0x100)
75 # LLVM-NEXT: SHF_OS_NONCONFORMING (0x100)
79 # LLVM-NEXT: Type: SHT_PROGBITS
80 # LLVM-NEXT: Flags [ (0x200)
81 # LLVM-NEXT: SHF_GROUP (0x200)
85 # LLVM-NEXT: Type: SHT_PROGBITS
86 # LLVM-NEXT: Flags [ (0x400)
87 # LLVM-NEXT: SHF_TLS (0x400)
90 # LLVM: Name: compressed
91 # LLVM-NEXT: Type: SHT_PROGBITS
92 # LLVM-NEXT: Flags [ (0x800)
93 # LLVM-NEXT: SHF_COMPRESSED (0x800)
96 ## SHF_GNU_RETAIN is defined in the OS-specific range, but we treat it generic
97 ## and allow it to be used with OSABI values other than GNU and FREEBSD.
99 # LLVM-NEXT: Type: SHT_PROGBITS
100 # LLVM-NEXT: Flags [ (0x200000)
101 # LLVM-NEXT: SHF_GNU_RETAIN (0x200000)
104 # LLVM: Name: exclude
105 # LLVM-NEXT: Type: SHT_PROGBITS
106 # LLVM-NEXT: Flags [ (0x80000000)
107 # LLVM-NEXT: SHF_EXCLUDE (0x80000000)
110 # LLVM: Name: unknown
111 # LLVM-NEXT: Type: SHT_PROGBITS
112 # LLVM-NEXT: Flags [ (0xF0000)
115 # GNU: [Nr] Name Type Address Off Size ES Flg Lk Inf Al
116 # GNU: [ 1] allflags PROGBITS 0000000000000000 000040 000000 00 WAXMSILOGTCRE 0 0 0
117 # GNU: [ 2] noflags PROGBITS 0000000000000000 000040 000000 00 0 0 0
118 # GNU: [ 3] write PROGBITS 0000000000000000 000040 000000 00 W 0 0 0
119 # GNU: [ 4] alloc PROGBITS 0000000000000000 000040 000000 00 A 0 0 0
120 # GNU: [ 5] exec PROGBITS 0000000000000000 000040 000000 00 X 0 0 0
121 # GNU: [ 6] merge PROGBITS 0000000000000000 000040 000000 00 M 0 0 0
122 # GNU: [ 7] strings PROGBITS 0000000000000000 000040 000000 00 S 0 0 0
123 # GNU: [ 8] infolink PROGBITS 0000000000000000 000040 000000 00 I 0 0 0
124 # GNU: [ 9] linkorder PROGBITS 0000000000000000 000040 000000 00 L 0 0 0
125 # GNU: [10] nonconforming PROGBITS 0000000000000000 000040 000000 00 O 0 0 0
126 # GNU: [11] group PROGBITS 0000000000000000 000040 000000 00 G 0 0 0
127 # GNU: [12] tls PROGBITS 0000000000000000 000040 000000 00 T 0 0 0
128 # GNU: [13] compressed PROGBITS 0000000000000000 000040 000000 00 C 0 0 0
129 # GNU: [14] retain PROGBITS 0000000000000000 000040 000000 00 R 0 0 0
130 # GNU: [15] exclude PROGBITS 0000000000000000 000040 000000 00 E 0 0 0
131 # GNU: [16] unknown PROGBITS 0000000000000000 000040 000000 00 x 0 0 0
142 Flags: [ SHF_WRITE, SHF_ALLOC, SHF_EXECINSTR, SHF_MERGE,
143 SHF_STRINGS, SHF_INFO_LINK, SHF_LINK_ORDER, SHF_OS_NONCONFORMING,
144 SHF_GROUP, SHF_TLS, SHF_COMPRESSED, SHF_GNU_RETAIN, SHF_EXCLUDE ]
156 Flags: [ SHF_EXECINSTR ]
162 Flags: [ SHF_STRINGS ]
165 Flags: [ SHF_INFO_LINK ]
168 Flags: [ SHF_LINK_ORDER ]
169 - Name: nonconforming
171 Flags: [ SHF_OS_NONCONFORMING ]
180 Flags: [ SHF_COMPRESSED ]
183 Flags: [ SHF_GNU_RETAIN ]
186 Flags: [ SHF_EXCLUDE ]