aboutsummaryrefslogtreecommitdiff
path: root/test/ELF/merge-string-empty.s
diff options
context:
space:
mode:
Diffstat (limited to 'test/ELF/merge-string-empty.s')
-rw-r--r--test/ELF/merge-string-empty.s12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/ELF/merge-string-empty.s b/test/ELF/merge-string-empty.s
new file mode 100644
index 000000000000..0b82ce700a2c
--- /dev/null
+++ b/test/ELF/merge-string-empty.s
@@ -0,0 +1,12 @@
+// Ensure that a mergeable string with size 0 does not cause any issue.
+
+// REQUIRES: x86
+// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
+// RUN: ld.lld %t.o -o %t
+
+.globl _start, s
+.section .rodata.str1.1,"aMS",@progbits,1
+s:
+.text
+_start:
+ .quad s