2 // This test intentionally checks for fatal errors
, and fatal errors aren
't supported for testing when main is run twice.
3 // XFAIL: main-run-twice
4 // RUN: llvm-mc -filetype=obj -triple=armv7a-linux-gnueabi %s -o %t
5 // RUN: echo "SECTIONS { \
6 // RUN: . = SIZEOF_HEADERS; \
7 // RUN: .text_low : { *(.text_low) *(.text_low2) } \
8 // RUN: .text_high 0x2000000 : { *(.text_high) *(.text_high2) } \
9 // RUN: } " > %t.script
10 // RUN: not ld.lld --script %t.script %t -o /dev/null 2>&1 | FileCheck %s
12 // RUN: llvm-mc -filetype=obj -triple=armv7aeb-linux-gnueabi -mcpu=cortex-a8 %s -o %t
13 // RUN: not ld.lld --script %t.script %t -o /dev/null 2>&1 | FileCheck %s
14 // RUN: not ld.lld -be8 --script %t.script %t -o /dev/null 2>&1 | FileCheck %s
16 // CHECK: error: relocation R_ARM_THM_JUMP24 to far not supported for Armv5 or Armv6 targets
18 // Lie about our build attributes. Our triple is armv7a-linux-gnueabi but
19 // we are claiming to be Armv5. This can also happen with llvm-mc when we
20 // don't have any
.eabi_attribute directives in the file or the
21 // --arm-add-build-attributes command line isn
't used to add them from the
23 .eabi_attribute 6, 5 // Tag_cpu_arch 5 = v5TEJ
26 .section .text_low, "ax", %progbits
29 .type _start, %function
31 b.w far // Will produce relocation not supported in Armv5.
33 .section .text_high, "ax", %progbits