1 ## --no-strip-all disables the --strip-all llvm-strip switch.
2 ## It also disables the default --strip-all behaviour.
4 # RUN: yaml2obj %s -o %t.o
6 ## Base case: no switches, should strip. Used as a sanity check for later test cases.
7 # RUN: llvm-strip %t.o -o %t1.o
8 # RUN: llvm-readobj --file-headers --sections %t1.o | FileCheck %s --check-prefix=ALL
10 ## --no-strip-all alone disables stripping.
11 # RUN: llvm-strip --no-strip-all %t.o -o %t2.o
12 # RUN: llvm-readobj --file-headers --sections %t2.o | FileCheck %s --check-prefix=NO-STRIP
14 ## --no-strip-all wins if last.
15 # RUN: llvm-strip --strip-all --no-strip-all %t.o -o %t3.o
16 # RUN: cmp %t2.o %t3.o
18 ## --strip-all wins if last.
19 # RUN: llvm-strip --no-strip-all --strip-all %t.o -o %t4.o
20 # RUN: cmp %t1.o %t4.o
22 ## The last instance of --no-strip-all is used in the comparison.
23 # RUN: llvm-strip --no-strip-all --strip-all --no-strip-all %t.o -o %t5.o
24 # RUN: cmp %t2.o %t5.o
26 ## The last instance of --strip-all is used in the comparison.
27 # RUN: llvm-strip --strip-all --no-strip-all --strip-all %t.o -o %t6.o
28 # RUN: cmp %t1.o %t6.o
42 # ALL: SectionHeaderCount: 3
44 # ALL: Name: .shstrtab
46 # NO-STRIP: SectionHeaderCount: 5
47 # NO-STRIP: Name: .alloc
48 # NO-STRIP: Name: .symtab
49 # NO-STRIP: Name: .strtab
50 # NO-STRIP: Name: .shstrtab