51 lines · plain
1## --no-strip-all disables the --strip-all llvm-strip switch.2## It also disables the default --strip-all behaviour.3 4# RUN: yaml2obj %s -o %t.o5 6## Base case: no switches, should strip. Used as a basic correctness check for later test cases.7# RUN: llvm-strip %t.o -o %t1.o8# RUN: llvm-readobj --file-headers --sections %t1.o | FileCheck %s --check-prefix=ALL9 10## --no-strip-all alone disables stripping.11# RUN: llvm-strip --no-strip-all %t.o -o %t2.o12# RUN: llvm-readobj --file-headers --sections %t2.o | FileCheck %s --check-prefix=NO-STRIP13 14## --no-strip-all wins if last.15# RUN: llvm-strip --strip-all --no-strip-all %t.o -o %t3.o16# RUN: cmp %t2.o %t3.o17 18## --strip-all wins if last.19# RUN: llvm-strip --no-strip-all --strip-all %t.o -o %t4.o20# RUN: cmp %t1.o %t4.o21 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.o24# RUN: cmp %t2.o %t5.o25 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.o28# RUN: cmp %t1.o %t6.o29 30--- !ELF31FileHeader:32 Class: ELFCLASS6433 Data: ELFDATA2LSB34 Type: ET_REL35 Machine: EM_X86_6436Sections:37 - Name: .alloc38 Type: SHT_PROGBITS39 Flags: [ SHF_ALLOC ]40Symbols: []41 42# ALL: SectionHeaderCount: 343# ALL: Name: .alloc44# ALL: Name: .shstrtab45 46# NO-STRIP: SectionHeaderCount: 547# NO-STRIP: Name: .alloc48# NO-STRIP: Name: .symtab49# NO-STRIP: Name: .strtab50# NO-STRIP: Name: .shstrtab51