1// REQUIRES: x86 2 3// RUN: echo "SECTIONS { \ 4// RUN: .dynamic : { *(.dynamic) } \ 5// RUN: .non_ro : { . += 1; } \ 6// RUN: .jcr : { *(.jcr) } \ 7// RUN: } " > %t.script 8// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o 9// RUN: not ld.lld --export-dynamic %t.o -o /dev/null --script=%t.script 2>&1 | FileCheck %s 10 11// RUN: echo "SECTIONS { \ 12// RUN: .dynamic : { *(.dynamic) } \ 13// RUN: .non_ro : { BYTE(1); } \ 14// RUN: .jcr : { *(.jcr) } \ 15// RUN: } " > %t2.script 16// RUN: not ld.lld --export-dynamic %t.o -o /dev/null --script=%t2.script 2>&1 | FileCheck %s 17 18// CHECK: error: section: .jcr is not contiguous with other relro sections 19 20.global _start 21_start: 22 23 // non-empty relro section 24 .section .jcr, "aw", @progbits 25 .quad 0 26