2 # Check R_MIPS_CALL_HI16 / R_MIPS_CALL_LO16 relocations calculation.
4 # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %t.o
5 # RUN: ld.lld %t.o -shared -o %t.so
6 # RUN: llvm-objdump -d %t.so | FileCheck %s
7 # RUN: llvm-readobj -r -mips-plt-got %t.so | FileCheck -check-prefix=GOT %s
9 # CHECK: Disassembly of section .text:
11 # CHECK-NEXT: 10000: 3c 02 00 00 lui $2, 0
12 # CHECK-NEXT: 10004: 8c 42 80 20 lw $2, -32736($2)
13 # CHECK-NEXT: 10008: 3c 02 00 00 lui $2, 0
14 # CHECK-NEXT: 1000c: 8c 42 80 18 lw $2, -32744($2)
15 # CHECK-NEXT: 10010: 3c 02 00 00 lui $2, 0
16 # CHECK-NEXT: 10014: 8c 42 80 1c lw $2, -32740($2)
22 # GOT-NEXT: Canonical gp value: 0x27FF0
23 # GOT: Local entries [
25 # GOT-NEXT: Address: 0x20008
26 # GOT-NEXT: Access: -32744
27 # GOT-NEXT: Initial: 0x10018
30 # GOT-NEXT: Address: 0x2000C
31 # GOT-NEXT: Access: -32740
32 # GOT-NEXT: Initial: 0x1001C
35 # GOT-NEXT: Global entries [
37 # GOT-NEXT: Address: 0x20010
38 # GOT-NEXT: Access: -32736
39 # GOT-NEXT: Initial: 0x0
40 # GOT-NEXT: Value: 0x0
41 # GOT-NEXT: Type: None
42 # GOT-NEXT: Section: Undefined
46 # GOT-NEXT: Number of TLS and multi-GOT entries: 0
53 lw $2, %call_lo(bar)($2)
54 lui $2, %call_hi(loc1)
55 lw $2, %call_lo(loc1)($2)
56 lui $2, %call_hi(loc2)
57 lw $2, %call_lo(loc2)($2)