1 # RUN: yaml2obj --docnum=1 %s -o %t
2 # RUN: llvm-objcopy --strip-non-alloc %t %t.out
3 # RUN: llvm-readobj --file-headers --sections %t.out | FileCheck %s
5 # CHECK: SectionHeaderCount: 5
6 # CHECK: Name: non_alloc_in_segment
9 # CHECK: Name: .shstrtab
18 - Name: non_alloc_in_segment
27 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
29 # Use an arbitrary segment type to show that the segment type is unimportant.
31 FirstSec: non_alloc_in_segment
32 LastSec: non_alloc_in_segment
34 # RUN: yaml2obj --docnum=2 %s -o %t2
35 # RUN: llvm-objcopy --strip-non-alloc %t2 %t2.out
36 # RUN: llvm-readobj --file-headers --sections %t2.out | FileCheck --check-prefix=CHECK2 %s
38 # CHECK2: SectionHeaderCount: 3
40 # CHECK2: Name: .shstrtab
51 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
52 ## empty_trailing_non_alloc is considered included by the segment,
53 ## so it will be retained.
54 - Name: empty_trailing_non_alloc
56 - Name: trailing_non_alloc