28 lines · plain
1// REQUIRES: x862 3// RUN: llvm-mc -filetype=obj -triple=x86_64 /dev/null -o %t2.o4// RUN: ld.lld -shared -soname=t2 %t2.o -o %t2.so5// RUN: echo "SECTIONS { \6// RUN: .dynamic : { *(.dynamic) } \7// RUN: .non_ro : { . += 1; } \8// RUN: .jcr : { *(.jcr) } \9// RUN: } " > %t.script10// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o11// RUN: not ld.lld %t.o %t2.so -o /dev/null --script=%t.script 2>&1 | FileCheck %s12 13// RUN: echo "SECTIONS { \14// RUN: .dynamic : { *(.dynamic) } \15// RUN: .non_ro : { BYTE(1); } \16// RUN: .jcr : { *(.jcr) } \17// RUN: } " > %t2.script18// RUN: not ld.lld %t.o %t2.so -o /dev/null --script=%t2.script 2>&1 | FileCheck %s19 20// CHECK: error: section: .jcr is not contiguous with other relro sections21 22.global _start23_start:24 25 // non-empty relro section26 .section .jcr, "aw", @progbits27 .quad 028