summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/tools/llvm-objcopy/basic-only-keep-debug.test20
1 files changed, 20 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-objcopy/basic-only-keep-debug.test b/llvm/test/tools/llvm-objcopy/basic-only-keep-debug.test
new file mode 100644
index 00000000000..c35c4a5c60a
--- /dev/null
+++ b/llvm/test/tools/llvm-objcopy/basic-only-keep-debug.test
@@ -0,0 +1,20 @@
+# 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
+
+!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"
OpenPOWER on IntegriCloud