summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lld/test/ELF/relro-non-contiguous-script-data.s7
1 files changed, 7 insertions, 0 deletions
diff --git a/lld/test/ELF/relro-non-contiguous-script-data.s b/lld/test/ELF/relro-non-contiguous-script-data.s
index b56c864dc0c..c2332d14a98 100644
--- a/lld/test/ELF/relro-non-contiguous-script-data.s
+++ b/lld/test/ELF/relro-non-contiguous-script-data.s
@@ -8,6 +8,13 @@
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
// RUN: not ld.lld --export-dynamic %t.o -o %t --script=%t.script 2>&1 | FileCheck %s
+// RUN: echo "SECTIONS { \
+// RUN: .dynamic : { *(.dynamic) } \
+// RUN: .non_ro : { BYTE(1); } \
+// RUN: .jcr : { *(.jcr) } \
+// RUN: } " > %t2.script
+// RUN: not ld.lld --export-dynamic %t.o -o %t --script=%t2.script 2>&1 | FileCheck %s
+
// CHECK: error: section: .jcr is not contiguous with other relro sections
.global _start
OpenPOWER on IntegriCloud