Files
clang-p2996/llvm/test/tools/llvm-objcopy/ELF/basic-only-keep-debug.test
Jordan Rupprecht 12ed01dcf9 [llvm-strip] Hook up (unimplemented) --only-keep-debug
For ELF, we accept but ignore --only-keep-debug. Do the same for llvm-strip.

COFF does implement this, so update the test that it is supported.

llvm-svn: 356207
2019-03-14 21:51:42 +00:00

25 lines
786 B
Plaintext

# NOTE: This test is only intended to be valid as long as --only-keep-debug is
# implemented as a NOP. This test should fail when that changes and you
# will need to update this test.
# RUN: yaml2obj %s > %t
# RUN: llvm-objcopy %t %t2
# RUN: llvm-objcopy --only-keep-debug %t %t3
# RUN: cmp %t2 %t3
# Run llvm-strip with --strip-symbol on a non-existent symbol to prevent
# defaulting to --strip-all.
# RUN: llvm-strip --only-keep-debug --strip-symbol foo %t -o %t4
# RUN: cmp %t2 %t4
!ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_EXEC
Machine: EM_X86_64
Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
Content: "DEADBEEF"