summaryrefslogtreecommitdiff
path: root/test/ELF/incompatible-section-flags.s
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-01-06 20:14:02 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-01-06 20:14:02 +0000
commitc09ce7fd2d62d85dcdf370f4bef732380fca4f1b (patch)
treedd5cf05b9ae703e6fb816b9663d4a0c903e0c2c6 /test/ELF/incompatible-section-flags.s
parent5d4d137132d719d0d20d119375b205d6a2c721ee (diff)
Vendor import of lld trunk r291274:vendor/lld/lld-trunk-r291274
Notes
svn path=/vendor/lld/dist/; revision=311540 svn path=/vendor/lld/lld-trunk-r291274/; revision=311541; tag=vendor/lld/lld-trunk-r291274
Diffstat (limited to 'test/ELF/incompatible-section-flags.s')
-rw-r--r--test/ELF/incompatible-section-flags.s18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/ELF/incompatible-section-flags.s b/test/ELF/incompatible-section-flags.s
new file mode 100644
index 000000000000..efca31bb9a80
--- /dev/null
+++ b/test/ELF/incompatible-section-flags.s
@@ -0,0 +1,18 @@
+// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
+// RUN: not ld.lld -shared %t.o -o %t 2>&1 | FileCheck %s
+
+// CHECK: error: Section has flags incompatible with others with the same name {{.*}}incompatible-section-flags.s.tmp.o:(.foo)
+// CHECK: error: Section has flags incompatible with others with the same name {{.*}}incompatible-section-flags.s.tmp.o:(.bar)
+
+.section .foo, "awT", @progbits, unique, 1
+.quad 0
+
+.section .foo, "aw", @progbits, unique, 2
+.quad 0
+
+
+.section .bar, "aw", @progbits, unique, 3
+.quad 0
+
+.section .bar, "awT", @progbits, unique, 4
+.quad 0