summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-objcopy/ELF/compress-debug-sections-zlib-gnu.test
diff options
context:
space:
mode:
authorAlexander Shaposhnikov <shal1t712@gmail.com>2018-11-30 05:43:39 +0000
committerAlexander Shaposhnikov <shal1t712@gmail.com>2018-11-30 05:43:39 +0000
commit6e4dc6f23f0e755b29b1e9bba76632a536f5f534 (patch)
treeb04a13ad08b45c342bf531bcc1059c26c7705aad /llvm/test/tools/llvm-objcopy/ELF/compress-debug-sections-zlib-gnu.test
parentc0769073848512c410099fa8bf6897f36c24af0f (diff)
downloadbcm5719-llvm-6e4dc6f23f0e755b29b1e9bba76632a536f5f534.tar.gz
bcm5719-llvm-6e4dc6f23f0e755b29b1e9bba76632a536f5f534.zip
[llvm-objcopy] Move elf-specific tests into subfolder
In this diff the elf-specific tests are moved into the subfolder llvm-objcopy/ELF (the change was discussed in the comments on https://reviews.llvm.org/D54674). A separate code reivew wasn't sent for this change since Phabricator is failing to create such a large diff. Test plan: make check-all make check-llvm-tools make check-llvm-tools-llvm-objcopy llvm-svn: 347958
Diffstat (limited to 'llvm/test/tools/llvm-objcopy/ELF/compress-debug-sections-zlib-gnu.test')
-rw-r--r--llvm/test/tools/llvm-objcopy/ELF/compress-debug-sections-zlib-gnu.test63
1 files changed, 63 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-objcopy/ELF/compress-debug-sections-zlib-gnu.test b/llvm/test/tools/llvm-objcopy/ELF/compress-debug-sections-zlib-gnu.test
new file mode 100644
index 00000000000..7199b2e5e11
--- /dev/null
+++ b/llvm/test/tools/llvm-objcopy/ELF/compress-debug-sections-zlib-gnu.test
@@ -0,0 +1,63 @@
+# REQUIRES: zlib
+
+# RUN: yaml2obj %p/Inputs/compress-debug-sections.yaml -o %t.o
+# RUN: llvm-objcopy --compress-debug-sections=zlib-gnu %t.o %t-compressed.o
+# RUN: llvm-objcopy --decompress-debug-sections %t-compressed.o %t-decompressed.o
+
+# RUN: llvm-objdump -s %t.o -section=.debug_foo | FileCheck %s
+# RUN: llvm-objdump -s %t-compressed.o | FileCheck %s --check-prefix=CHECK-COMPRESSED
+# RUN: llvm-readobj -relocations -s %t-compressed.o | FileCheck %s --check-prefix=CHECK-FLAGS
+# RUN: llvm-readobj -relocations -s %t-decompressed.o | FileCheck %s --check-prefix=CHECK-HEADER
+# RUN: llvm-readobj -relocations -s %t.o | FileCheck %s --check-prefix=CHECK-HEADER
+# RUN: llvm-objdump -s %t-decompressed.o -section=.debug_foo | FileCheck %s
+
+# CHECK: .debug_foo:
+# CHECK-NEXT: 0000 00000000 00000000
+
+# CHECK-HEADER: Index: 1
+# CHECK-HEADER-NEXT: Name: .debug_foo
+# CHECK-HEADER-NEXT: Type: SHT_PROGBITS
+# CHECK-HEADER-NEXT: Flags [
+# CHECK-HEADER-NEXT: ]
+# CHECK-HEADER-NEXT: Address:
+# CHECK-HEADER-NEXT: Offset:
+# CHECK-HEADER-NEXT: Size: 8
+
+# CHECK-COMPRESSED: .zdebug_foo:
+# CHECK-COMPRESSED: ZLIB
+# CHECK-COMPRESSED: .notdebug_foo:
+
+# CHECK-FLAGS-NOT: Name: .debug_foo
+# CHECK-FLAGS: Index: 1
+# CHECK-FLAGS-NEXT: Name: .zdebug_foo
+# CHECK-FLAGS-NEXT: Type: SHT_PROGBITS
+# CHECK-FLAGS-NEXT: Flags [
+# CHECK-FLAGS-NEXT: ]
+# CHECK-FLAGS-NEXT: Address:
+# CHECK-FLAGS-NEXT: Offset:
+# CHECK-FLAGS-NEXT: Size: 23
+
+# CHECK-FLAGS: Name: .notdebug_foo
+# CHECK-FLAGS-NEXT: Type: SHT_PROGBITS
+# CHECK-FLAGS-NEXT: Flags [
+# CHECK-FLAGS-NEXT: ]
+# CHECK-FLAGS-NEXT: Address:
+# CHECK-FLAGS-NEXT: Offset:
+# CHECK-FLAGS-NEXT: Size: 8
+
+# CHECK-FLAGS: Name: .rela.debug_foo
+# CHECK-FLAGS-NEXT: Type: SHT_RELA
+# CHECK-FLAGS-NEXT: Flags [
+# CHECK-FLAGS-NEXT: ]
+# CHECK-FLAGS-NEXT: Address:
+# CHECK-FLAGS-NEXT: Offset:
+# CHECK-FLAGS-NEXT: Size:
+# CHECK-FLAGS-NEXT: Link:
+# CHECK-FLAGS-NEXT: Info: 1
+
+# CHECK-FLAGS: Relocations [
+# CHECK-FLAGS-NEXT: .rela.debug_foo {
+# CHECK-FLAGS-NEXT: 0x1 R_X86_64_32 - 0x0
+# CHECK-FLAGS-NEXT: }
+# CHECK-FLAGS-NEXT: ]
+
OpenPOWER on IntegriCloud