blob: 1f082bf47344df8307dcc413a321ff374a4a9ff3 [file] [log] [blame]
Inna Palantff3f07a2019-07-11 16:15:26 -07001# RUN: yaml2obj %s > %t
2# RUN: llvm-objcopy --strip-non-alloc %t %t2
3# RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s
4
5!ELF
6FileHeader:
7 Class: ELFCLASS64
8 Data: ELFDATA2LSB
9 Type: ET_REL
10 Machine: EM_X86_64
11Sections:
Chih-Hung Hsieh43f06942019-12-19 15:01:08 -080012 - Name: non_alloc_in_segment
13 Type: SHT_PROGBITS
14 Flags: [ ]
15 Size: 4
Inna Palantff3f07a2019-07-11 16:15:26 -070016 - Name: .bss
17 Type: SHT_NOBITS
18 Flags: [ SHF_ALLOC ]
19 - Name: .text
20 Type: SHT_PROGBITS
21 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
22 - Name: .blarg
23 Type: SHT_PROGBITS
24 Flags: [ ]
Chih-Hung Hsieh43f06942019-12-19 15:01:08 -080025ProgramHeaders:
26 # Use an arbitrary segment type to show that the segment type is unimportant.
27 - Type: 0x61234567
28 Sections:
29 - Section: non_alloc_in_segment
Inna Palantff3f07a2019-07-11 16:15:26 -070030
Chih-Hung Hsieh43f06942019-12-19 15:01:08 -080031# CHECK: SectionHeaderCount: 5
Inna Palantff3f07a2019-07-11 16:15:26 -070032
Chih-Hung Hsieh43f06942019-12-19 15:01:08 -080033# CHECK: Name: non_alloc_in_segment
Inna Palantff3f07a2019-07-11 16:15:26 -070034# CHECK: Name: .bss
35# CHECK: Name: .text
36# CHECK: Name: .shstrtab