brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 85e66f1 Raw
38 lines · plain
1// REQUIRES: arm2// This test intentionally checks for fatal errors, and fatal errors aren't supported for testing when main is run twice.3// XFAIL: main-run-twice4// RUN: llvm-mc -filetype=obj -triple=armv7a-linux-gnueabi %s -o %t5// 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.script10// RUN: not ld.lld --script %t.script %t -o /dev/null 2>&1 | FileCheck %s11 12// RUN: llvm-mc -filetype=obj -triple=armv7aeb-linux-gnueabi -mcpu=cortex-a8 %s -o %t13// RUN: not ld.lld --script %t.script %t -o /dev/null 2>&1 | FileCheck %s14// RUN: not ld.lld -be8 --script %t.script %t -o /dev/null 2>&1 | FileCheck %s15 16// CHECK: error: relocation R_ARM_THM_JUMP24 to far not supported for Armv5 or Armv6 targets17 18// Lie about our build attributes. Our triple is armv7a-linux-gnueabi but19// we are claiming to be Armv5. This can also happen with llvm-mc when we20// don't have any .eabi_attribute directives in the file or the21// --arm-add-build-attributes command line isn't used to add them from the22// triple.23 .eabi_attribute 6, 5           // Tag_cpu_arch 5 = v5TEJ24 .thumb25 .syntax unified26 .section .text_low, "ax", %progbits27 .thumb28 .globl _start29 .type _start, %function30_start:31 b.w far // Will produce relocation not supported in Armv5.32 33 .section .text_high, "ax", %progbits34 .globl far35 .type far, %function36far:37 bx lr38