1 # RUN: yaml2obj %s -o %t
2 # RUN: llvm-objcopy --strip-all-gnu --allow-broken-links %t %t2
3 # RUN: llvm-strip --strip-all-gnu --allow-broken-links %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 --ignore-case --check-prefix=COPY-BYTES
11 # RUN: od -t x1 -N 4 -j 120 %t2 | FileCheck %s --ignore-case --check-prefix=STRIP-BYTES
20 - Name: .debug_in_segment
32 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
46 - Name: .random_section_name
48 - Name: .debug_not_a_real_debug_section
57 # Use an arbitrary segment type to show that the segment type is unimportant.
59 FirstSec: .debug_in_segment
60 LastSec: .debug_in_segment
62 # CHECK: SectionHeaderCount: 8
64 # CHECK: Name: .dynstr
65 # CHECK: Name: .symtab
67 # CHECK: Name: .debug_loc
68 # CHECK: Name: .comment
69 # CHECK: Name: .random_section_name
70 # CHECK: Name: .shstrtab
72 # COPY-BYTES: de ad be ef
73 # STRIP-BYTES: 00 00 00 00