[lld] r337252 - [ELF] - Check we are able to report zlib decompressor errors.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 17 01:42:42 PDT 2018


Author: grimar
Date: Tue Jul 17 01:42:42 2018
New Revision: 337252

URL: http://llvm.org/viewvc/llvm-project?rev=337252&view=rev
Log:
[ELF] - Check we are able to report zlib decompressor errors.

This test case adds a check for the following line of the code:
https://github.com/llvm-mirror/lld/blob/master/ELF/InputSection.cpp#L194

Added:
    lld/trunk/test/ELF/compressed-debug-input-err.s

Added: lld/trunk/test/ELF/compressed-debug-input-err.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/compressed-debug-input-err.s?rev=337252&view=auto
==============================================================================
--- lld/trunk/test/ELF/compressed-debug-input-err.s (added)
+++ lld/trunk/test/ELF/compressed-debug-input-err.s Tue Jul 17 01:42:42 2018
@@ -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", at progbits,1
+ .ascii "ZLIB"
+ .byte 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1




More information about the llvm-commits mailing list