| 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.o |
| 5 |
|
| 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.o |
| 8 |
# RUN: llvm-readobj --file-headers --sections %t1.o | FileCheck %s --check-prefix=ALL |
| 9 |
|
| 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 |
| 13 |
|
| 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 |
| 17 |
|
| 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 |
| 21 |
|
| 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 |
| 25 |
|
| 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 |
| 29 |
|
| 30 |
--- !ELF |
| 31 |
FileHeader: |
| 32 |
Class: ELFCLASS64 |
| 33 |
Data: ELFDATA2LSB |
| 34 |
Type: ET_REL |
| 35 |
Machine: EM_X86_64 |
| 36 |
Sections: |
| 37 |
- Name: .alloc |
| 38 |
Type: SHT_PROGBITS |
| 39 |
Flags: [ SHF_ALLOC ] |
| 40 |
Symbols: [] |
| 41 |
|
| 42 |
# ALL: SectionHeaderCount: 3 |
| 43 |
# ALL: Name: .alloc |
| 44 |
# ALL: Name: .shstrtab |
| 45 |
|
| 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 |