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