Alexander Shaposhnikov d7eaf27654 [llvm-strip] Add missing aliases for --strip-debug
Add missing aliases for --strip-debug: -g, -S, -d.

Test plan: make check-all

Differential revision: https://reviews.llvm.org/D47674

llvm-svn: 333940
2018-06-04 18:55:41 +00:00

74 lines
1.7 KiB
Plaintext

# RUN: yaml2obj %s > %t
# RUN: cp %t %t3
# RUN: llvm-objcopy -strip-debug %t %t2
# RUN: llvm-readobj -file-headers -sections -symbols %t2 | FileCheck %s
# Verify that the previous run of llvm-objcopy has not modified the input.
# RUN: cmp %t %t3
# RUN: llvm-strip -strip-debug %t3
# RUN: cmp %t2 %t3
# RUN: cp %t %t4
# RUN: llvm-strip -d %t4
# RUN: cmp %t2 %t4
# RUN: cp %t %t5
# RUN: llvm-strip -g %t5
# RUN: cmp %t2 %t5
# RUN: cp %t %t6
# RUN: llvm-strip -S %t6
# RUN: cmp %t2 %t6
!ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_REL
Machine: EM_X86_64
Sections:
- Name: .debugfoo
Type: SHT_PROGBITS
Content: "00000000"
- Name: .text
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
AddressAlign: 0x0000000000000010
Content: "00000000"
Symbols:
Global:
- Name: foo
Section: .text
- Name: debugfoo
Section: .debugfoo
# CHECK: SectionHeaderCount: 5
# CHECK: Name: .text
# CHECK: Name: .symtab
# CHECK: Name: .strtab
# CHECK: Name: .shstrtab
# Check that *only* foo is copied and not debugfoo
# CHECK: Symbols [
# CHECK-NEXT: Symbol {
# CHECK-NEXT: Name:
# CHECK-NEXT: Value:
# CHECK-NEXT: Size:
# CHECK-NEXT: Binding:
# CHECK-NEXT: Type:
# CHECK-NEXT: Other:
# CHECK-NEXT: Section: Undefined
# CHECK-NEXT: }
# CHECK-NEXT: Symbol {
# CHECK-NEXT: Name: foo
# CHECK-NEXT: Value:
# CHECK-NEXT: Size:
# CHECK-NEXT: Binding: Global
# CHECK-NEXT: Type:
# CHECK-NEXT: Other:
# CHECK-NEXT: Section: .text
# CHECK-NEXT: }
# CHECK-NEXT: ]