1 ## Show that llvm-objcopy/llvm-strip removes all symbols and debug sections.
3 # RUN: yaml2obj %p/Inputs/strip-all-with-dwarf.yaml -o %t
5 # RUN: llvm-objcopy --strip-debug %t %t.stripped
6 # RUN: llvm-readobj --sections %t.stripped | FileCheck /dev/null \
7 # RUN: --implicit-check-not='Name: __debug' --implicit-check-not='Name: __apple'
9 ## Make sure that all symbols are kept.
10 # RUN: llvm-readobj --symbols %t | FileCheck %s --check-prefix=SYM
11 # RUN: llvm-readobj --symbols %t.stripped | FileCheck %s --check-prefix=SYM
17 ## Make sure that all relocations to non-debug sections are kept.
18 # RUN: llvm-readobj -r %t | FileCheck %s --check-prefixes=RELOC,DEBUG
19 # RUN: llvm-readobj -r %t.stripped | FileCheck %s --check-prefix=RELOC
21 # RUN: llvm-strip --strip-debug %t -o %t.stripped2
22 # RUN: cmp %t.stripped %t.stripped2
24 # RELOC: Relocations [
25 # RELOC-NEXT: Section __text {
26 # RELOC-NEXT: 0x0 0 0 1 X86_64_RELOC_UNSIGNED 0 _bar
27 # RELOC-NEXT: 0x0 0 0 1 X86_64_RELOC_UNSIGNED 0 _main
29 # DEBUG: Section __debug_info {
30 # DEBUG-NEXT: 0x0 0 0 1 X86_64_RELOC_UNSIGNED 0 _bar
31 # DEBUG-NEXT: 0x0 0 0 1 X86_64_RELOC_UNSIGNED 0 _bar
32 # DEBUG-NEXT: 0x0 0 0 1 X86_64_RELOC_UNSIGNED 0 _bar
33 # DEBUG-NEXT: 0x0 0 0 1 X86_64_RELOC_UNSIGNED 0 _bar
35 # RELOC-NEXT: Section __compact_unwind {
36 # RELOC-NEXT: 0x0 0 0 1 X86_64_RELOC_UNSIGNED 0 _bar
38 # DEBUG-NEXT: Section __debug_line {
39 # DEBUG-NEXT: 0x0 0 0 1 X86_64_RELOC_UNSIGNED 0 _bar