57 lines · plain
1# REQUIRES: mips2 3## Check handling of the R_MIPS_JALR relocation.4 5# RUN: llvm-mc -filetype=obj -triple=mipsel-unknown-linux %s -o %t.o6# RUN: llvm-readelf -r %t.o | FileCheck -check-prefix=REL %s7 8# RUN: ld.lld %t.o -shared -o %t.so9# RUN: llvm-objdump -d --no-show-raw-insn %t.so | FileCheck --check-prefix=SO %s10 11# RUN: ld.lld %t.o --defsym=bar=__start -o %t.so12# RUN: llvm-objdump -d --no-show-raw-insn %t.so | FileCheck --check-prefix=EXE %s13 14# REL: R_MIPS_JALR {{.*}} bar15# REL: R_MIPS_JALR {{.*}} foo16# REL: R_MIPS_JALR {{.*}} far17 18# SO: jalr $2519# SO: bal {{.*}} <foo>20# SO: jalr $2521 22# SO: jr $2523# SO: b {{.*}} <foo>24# SO: jr $2525 26# EXE: bal {{.*}} <foo>27# EXE: bal {{.*}} <foo>28# EXE: jalr $2529 30# EXE: b {{.*}} <foo>31# EXE: b {{.*}} <foo>32# EXE: jr $2533 34 .text35 .global bar36 .global __start37 .option pic238far:39 .space 0x4fff040__start:41foo:42 jal bar43 nop44 jal foo45 nop46 jal far47 nop48l1:49 jr $2550 .reloc l1, R_MIPS_JALR, bar51l2:52 jr $2553 .reloc l2, R_MIPS_JALR, foo54l3:55 jr $2556 .reloc l3, R_MIPS_JALR, far57