diff options
Diffstat (limited to 'lld/test/ELF/relro-non-contiguous-script-data.s')
-rw-r--r-- | lld/test/ELF/relro-non-contiguous-script-data.s | 18 |
1 files changed, 18 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 new file mode 100644 index 00000000000..b56c864dc0c --- /dev/null +++ b/lld/test/ELF/relro-non-contiguous-script-data.s @@ -0,0 +1,18 @@ +// REQUIRES: x86 + +// RUN: echo "SECTIONS { \ +// RUN: .dynamic : { *(.dynamic) } \ +// RUN: .non_ro : { . += 1; } \ +// RUN: .jcr : { *(.jcr) } \ +// RUN: } " > %t.script +// 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 + +// CHECK: error: section: .jcr is not contiguous with other relro sections + +.global _start +_start: + + // non-empty relro section + .section .jcr, "aw", @progbits + .quad 0 |