2 # Check handling multiple MIPS N64 ABI relocations packed
3 # into the single relocation record.
5 # RUN: llvm-mc -filetype=obj -triple=mips64-unknown-linux %s -o %t.o
6 # RUN: ld.lld %t.o -o %t.exe
7 # RUN: llvm-objdump -d -s -t %t.exe | FileCheck %s
8 # RUN: llvm-readobj -r %t.exe | FileCheck -check-prefix=REL %s
11 # CHECK-NEXT: 20000: 3c 1c 00 01 lui $gp, 1
12 # ^-- 0x20000 - 0x37ff0
13 # ^-- 0 - 0xfffffffffffe8010
16 # CHECK-NEXT: 20004: 67 9c 7f f0 daddiu $gp, $gp, 32752
17 # ^-- 0x20000 - 0x37ff0
18 # ^-- 0 - 0xfffffffffffe8010
21 # CHECK: Contents of section .rodata:
22 # CHECK-NEXT: {{[0-9a-f]+}} ffffffff fffe8014
23 # ^-- 0x20004 - 0x37ff0 = 0xfffffffffffe8014
25 # CHECK: 0000000000020004 .text 00000000 loc
26 # CHECK: 0000000000037ff0 .got 00000000 .hidden _gp
27 # CHECK: 0000000000020000 .text 00000000 __start
35 lui $gp,%hi(%neg(%gp_rel(__start))) # R_MIPS_GPREL16
39 daddiu $gp,$gp,%lo(%neg(%gp_rel(__start))) # R_MIPS_GPREL16
43 .section .rodata,"a",@progbits
44 .gpdword(loc) # R_MIPS_GPREL32