[lld] r347535 - [LLD][ELF] - Add a test for non-null terminated mergeable strings section. NFCI.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 26 00:40:21 PST 2018


Author: grimar
Date: Mon Nov 26 00:40:20 2018
New Revision: 347535

URL: http://llvm.org/viewvc/llvm-project?rev=347535&view=rev
Log:
[LLD][ELF] - Add a test for non-null terminated mergeable strings section. NFCI.

LLD reports an error in this case, but we had no test.

Added:
    lld/trunk/test/ELF/mergeable-errors.s

Added: lld/trunk/test/ELF/mergeable-errors.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/mergeable-errors.s?rev=347535&view=auto
==============================================================================
--- lld/trunk/test/ELF/mergeable-errors.s (added)
+++ lld/trunk/test/ELF/mergeable-errors.s Mon Nov 26 00:40:20 2018
@@ -0,0 +1,8 @@
+# REQUIRES: x86
+# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
+# RUN: not ld.lld %t.o -o %t1 2>&1 | FileCheck %s
+
+# CHECK: error: {{.*}}.o:(.mergeable): string is not null terminated
+
+.section .mergeable,"MS", at progbits,2
+  .short 0x1122




More information about the llvm-commits mailing list