53 lines
1.9 KiB
Plaintext
53 lines
1.9 KiB
Plaintext
## Show that llvm-objcopy/llvm-strip removes all symbols and debug sections.
|
|
|
|
# RUN: yaml2obj %p/Inputs/strip-all.yaml -o %t.exec
|
|
# RUN: yaml2obj %p/Inputs/strip-all-with-dwarf.yaml -o %t.dwarf
|
|
|
|
## Check that the symbol list satisfies the order: local / defined external /
|
|
## undefined external, otherwise llvm-objcopy will fail.
|
|
# RUN: llvm-objcopy %t.exec /dev/null
|
|
|
|
# RUN: llvm-objcopy --strip-all %t.exec %t.exec.stripped
|
|
# RUN: llvm-readobj --sections --relocations --symbols %t.exec.stripped \
|
|
# RUN: | FileCheck --check-prefix=COMMON %s
|
|
|
|
# RUN: llvm-objcopy --strip-all %t.dwarf %t.dwarf.stripped
|
|
# RUN: llvm-readobj --sections --relocations --symbols %t.dwarf.stripped \
|
|
# RUN: | FileCheck --check-prefixes=COMMON,DWARF %s
|
|
|
|
## The output of "llvm-strip" should be identical with that of
|
|
## "llvm-strip --strip-all" and "llvm-objcopy --strip-all".
|
|
# RUN: llvm-strip %t.exec -o %t2
|
|
# RUN: llvm-strip --strip-all %t.exec -o %t3
|
|
# cmp %t2 %t.exec.stripped
|
|
# cmp %t3 %t.exec.stripped
|
|
|
|
# RUN: llvm-strip %t.dwarf -o %t4
|
|
# RUN: llvm-strip --strip-all %t.dwarf -o %t5
|
|
# cmp %t4 %t.dwarf.stripped
|
|
# cmp %t5 %t.dwarf.stripped
|
|
|
|
# RUN: llvm-lipo %t.dwarf -create -output %t.dwarf.universal
|
|
# RUN: llvm-strip %t.dwarf.universal -o %t.dwarf.universal.stripped
|
|
# RUN: llvm-lipo %t.dwarf.universal.stripped -thin x86_64 -output %t6
|
|
# RUN: cmp %t6 %t.dwarf.stripped
|
|
|
|
## Make sure that debug sections are removed.
|
|
# DWARF: Sections [
|
|
# DWARF-NOT: Name: __debug_str
|
|
# DWARF-NOT: Name: __debug_abbrev
|
|
# DWARF-NOT: Name: __debug_info
|
|
# DWARF-NOT: Name: __debug_macinfo
|
|
# DWARF-NOT: Name: __apple_names
|
|
# DWARF-NOT: Name: __apple_objc
|
|
# DWARF-NOT: Name: __apple_namespac
|
|
# DWARF-NOT: Name: __apple_types
|
|
# DWARF-NOT: Name: __debug_line
|
|
# DWARF: ]
|
|
|
|
## Make sure that all relocations and symbols are removed.
|
|
# COMMON: Relocations [
|
|
# COMMON-NEXT: ]
|
|
# COMMON: Symbols [
|
|
# COMMON-NEXT: ]
|