1 # RUN: yaml2obj %s > %t
2 # RUN: llvm-objcopy --strip-all-gnu %t %t2
3 # RUN: llvm-strip --strip-all-gnu %t -o %t3
4 # RUN: llvm-readobj --file-headers --sections %t2 | FileCheck %s
7 # Show that the debug section in a segment was removed, to match GNU.
8 # First validate that the offset in use is correct.
9 # RUN: llvm-objcopy %t %t4
10 # RUN: od -t x1 -N 4 -j 120 %t4 | FileCheck %s --check-prefix=COPY-BYTES
11 # RUN: od -t x1 -N 4 -j 120 %t2 | FileCheck %s --check-prefix=STRIP-BYTES
20 - Name: .debug_in_segment
33 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
47 - Name: .random_section_name
49 - Name: .debug_not_a_real_debug_section
58 # Use an arbitrary segment type to show that the segment type is unimportant.
61 - Section: .debug_in_segment
63 # CHECK: SectionHeaderCount: 8
65 # CHECK: Name: .dynstr
66 # CHECK: Name: .symtab.dyn
68 # CHECK: Name: .debug_loc
69 # CHECK: Name: .comment
70 # CHECK: Name: .random_section_name
71 # CHECK: Name: .shstrtab
73 # COPY-BYTES: de ad be ef
74 # STRIP-BYTES: 00 00 00 00