[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / ELF / mips-jalr.s
blob7084a592a662bfb152a735ec3e0b13f1531e77c5
1 # REQUIRES: mips
3 ## Check handling of the R_MIPS_JALR relocation.
5 # RUN: llvm-mc -filetype=obj -triple=mipsel-unknown-linux %s -o %t.o
6 # RUN: llvm-readelf -r %t.o | FileCheck -check-prefix=REL %s
8 # RUN: ld.lld %t.o -shared -o %t.so
9 # RUN: llvm-objdump -d --no-show-raw-insn %t.so | FileCheck --check-prefix=SO %s
11 # RUN: ld.lld %t.o --defsym=bar=__start -o %t.so
12 # RUN: llvm-objdump -d --no-show-raw-insn %t.so | FileCheck --check-prefix=EXE %s
14 # REL: R_MIPS_JALR {{.*}} bar
15 # REL: R_MIPS_JALR {{.*}} foo
16 # REL: R_MIPS_JALR {{.*}} far
18 # SO: jalr $25
19 # SO: bal {{.*}} <foo>
20 # SO: jalr $25
22 # SO: jr $25
23 # SO: b {{.*}} <foo>
24 # SO: jr $25
26 # EXE: bal {{.*}} <foo>
27 # EXE: bal {{.*}} <foo>
28 # EXE: jalr $25
30 # EXE: b {{.*}} <foo>
31 # EXE: b {{.*}} <foo>
32 # EXE: jr $25
34 .text
35 .global bar
36 .global __start
37 .option pic2
38 far:
39 .space 0x4fff0
40 __start:
41 foo:
42 jal bar
43 nop
44 jal foo
45 nop
46 jal far
47 nop
48 l1:
49 jr $25
50 .reloc l1, R_MIPS_JALR, bar
51 l2:
52 jr $25
53 .reloc l2, R_MIPS_JALR, foo
54 l3:
55 jr $25
56 .reloc l3, R_MIPS_JALR, far