brintos

brintos / llvm-project-archived public Read only

0
0
Text · 859 B · b74182d Raw
28 lines · plain
1// REQUIRES: arm2// RUN: llvm-mc --arm-add-build-attributes -filetype=obj -triple=thumbv5-none-linux-gnueabi %s -o %t3// RUN: ld.lld %t -o %t24// RUN: llvm-objdump --no-print-imm-hex --no-show-raw-insn -d %t2 | FileCheck %s5 6/// Check that the ARM ABI rules for undefined weak symbols are applied.7/// Relative relocations are resolved to the place. Although we can't encode8/// this for R_ARM_THM_PC8 as negative addends are not permitted. Use smallest9/// available value. These are corner cases.10 .syntax unified11 12 .weak target13 .type target, %function14 15 .text16 .global _start17_start:18 /// R_ARM_THM_PC819 /// adr r0, target20 .inst.n 0xa0ff21 .reloc 0, R_ARM_THM_PC8, target22 /// ldr r0, target23 .inst.n 0x48ff24 .reloc 2, R_ARM_THM_PC8, target25// CHECK:      000200b4 <_start>:26// CHECK-NEXT: 200b4: adr     r0, #027// CHECK-NEXT:        ldr     r0, [pc, #0]28