2 # Check R_MIPS_HI16 / LO16 relocations calculation.
4 # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %t.o
5 # RUN: echo "SECTIONS { . = 0x20000; .text ALIGN(0x1000) : { *(.text) } }" > %t.script
6 # RUN: ld.lld %t.o --script %t.script -o %t.exe
7 # RUN: llvm-objdump --no-print-imm-hex -d -t --no-show-raw-insn %t.exe | FileCheck %s
14 addi $t0
,$t0
,%lo
(__start+
4)
15 addi $t0
,$t0
,%lo
(g1+
8)
17 lui $t0
,%hi
(l1+
0x10000)
18 lui $t1
,%hi
(l1+
0x20000)
19 addi $t0
,$t0
,%lo
(l1+
(-4))
33 # CHECK: SYMBOL TABLE:
34 # CHECK: 0021020 l O .data 00000004 l1
35 # CHECK: 0021000 g .text 00000000 __start
36 # CHECK: 0021024 g O .data 00000004 g1
39 # CHECK-NEXT: 21000: lui $8, 2
41 # CHECK-NEXT: 21004: lui $9, 2
43 # CHECK-NEXT: 21008: addi $8, $8, 4100
45 # CHECK-NEXT: 2100c: addi $8, $8, 4140
47 # CHECK-NEXT: 21010: lui $8, 3
48 # ^-- %hi(l1+0x10000-4)
49 # CHECK-NEXT: 21014: lui $9, 4
50 # ^-- %hi(l1+0x20000-4)
51 # CHECK-NEXT: 21018: addi $8, $8, 4124