summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/test/ELF/compressed-debug-input-err.s11
1 files changed, 11 insertions, 0 deletions
diff --git a/lld/test/ELF/compressed-debug-input-err.s b/lld/test/ELF/compressed-debug-input-err.s
new file mode 100644
index 00000000000..b18b11ad97e
--- /dev/null
+++ b/lld/test/ELF/compressed-debug-input-err.s
@@ -0,0 +1,11 @@
+# REQUIRES: zlib, x86
+
+# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
+# RUN: not ld.lld %t.o -o %t.so -shared 2>&1 | Filecheck %s
+
+## Check we are able to report zlib decompressor errors.
+# CHECK: error: {{.*}}.o:(.zdebug_str): decompress failed: zlib error: Z_DATA_ERROR
+
+.section .zdebug_str,"MS",@progbits,1
+ .ascii "ZLIB"
+ .byte 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1
OpenPOWER on IntegriCloud