1// REQUIRES: aarch64
2
3// RUN: llvm-mc -filetype=obj -triple=aarch64-linux-none %s -o %t.o
4
5// RUN: echo "SECTIONS \
6// RUN: { \
7// RUN:  .text : { *(.text) *(.rodata.foo) } \
8// RUN:  .rodata : { *(.rodata.bar) } \
9// RUN: }" > %t.lds
10// RUN: not ld.lld -T%t.lds %t.o -o /dev/null --execute-only 2>&1 | FileCheck %s
11
12// RUN: echo "SECTIONS \
13// RUN: { \
14// RUN:  .text : { *(.text) } \
15// RUN:  .rodata : { *(.rodata.bar) *(.rodata.foo) } \
16// RUN: }" > %t.lds
17// RUN: ld.lld -T%t.lds %t.o -o %t -execute-only 2>&1
18
19// CHECK: cannot place {{.*}}:(.rodata.foo) into .text: -execute-only does not support intermingling data and code
20
21    br lr
22
23.section .rodata.foo
24.word 0x1
25.section .rodata.bar
26.word 0x2
27