xref: /llvm-project/lld/test/ELF/mips-pc64.s (revision b00f0d4238cb34a54073cc5ab7e2060d58f69e3f)
1# REQUIRES: mips
2
3# Check handling of 64-bit pc-realtive relocation.
4
5# RUN: llvm-mc -filetype=obj -triple=mips64-unknown-linux %s -o %t.o
6# RUN: echo 'SECTIONS { \
7# RUN:         .text 0x10000 : { *(.text) } \
8# RUN:         .data 0x30000 : { *(.data) } \
9# RUN:       }' > %t.script
10# RUN: ld.lld -shared %t.o -T %t.script -o %t
11# RUN: llvm-readelf -x .data %t | FileCheck %s
12
13# CHECK:      Hex dump of section '.data':
14# CHECK-NEXT:  0x00030000 ffffffff fffffff0 00000001 fffdffe8
15
16  .option pic2
17  .text
18foo:
19  nop
20  .data
21v0:
22  .quad foo+0x1fff0-.
23v1:
24  .quad foo+0x1fffffff0-.
25