[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / ELF / arm-v5-reloc-error.s
blobbd4b9ad68d10acfdd267a9677513e74a699545cb
1 // REQUIRES: arm
2 // RUN: llvm-mc -filetype=obj -triple=armv7a-linux-gnueabi %s -o %t
3 // RUN: echo "SECTIONS { \
4 // RUN: . = SIZEOF_HEADERS; \
5 // RUN: .text_low : { *(.text_low) *(.text_low2) } \
6 // RUN: .text_high 0x2000000 : { *(.text_high) *(.text_high2) } \
7 // RUN: } " > %t.script
8 // RUN: not ld.lld --script %t.script %t -o /dev/null 2>&1 | FileCheck %s
10 // RUN: llvm-mc -filetype=obj -triple=armv7aeb-linux-gnueabi -mcpu=cortex-a8 %s -o %t
11 // RUN: not ld.lld --script %t.script %t -o /dev/null 2>&1 | FileCheck %s
12 // RUN: not ld.lld -be8 --script %t.script %t -o /dev/null 2>&1 | FileCheck %s
14 // CHECK: error: relocation R_ARM_THM_JUMP24 to far not supported for Armv5 or Armv6 targets
16 // Lie about our build attributes. Our triple is armv7a-linux-gnueabi but
17 // we are claiming to be Armv5. This can also happen with llvm-mc when we
18 // don't have any .eabi_attribute directives in the file or the
19 // --arm-add-build-attributes command line isn't used to add them from the
20 // triple.
21 .eabi_attribute 6, 5 // Tag_cpu_arch 5 = v5TEJ
22 .thumb
23 .syntax unified
24 .section .text_low, "ax", %progbits
25 .thumb
26 .globl _start
27 .type _start, %function
28 _start:
29 b.w far // Will produce relocation not supported in Armv5.
31 .section .text_high, "ax", %progbits
32 .globl far
33 .type far, %function
34 far:
35 bx lr