]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/ELF/mips-gprel32-relocs.s
Vendor import of lld trunk r338150:
[FreeBSD/FreeBSD.git] / test / ELF / mips-gprel32-relocs.s
1 # REQUIRES: mips
2 # Check R_MIPS_GPREL32 relocation calculation.
3
4 # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %t.o
5 # RUN: ld.lld -shared -o %t.so %t.o
6 # RUN: llvm-objdump -s -section=.rodata -t %t.so | FileCheck %s
7
8   .text
9   .globl  __start
10 __start:
11   lw      $t0,%call16(__start)($gp)
12 foo:
13   nop
14 bar:
15   nop
16
17   .section .rodata, "a"
18 v1:
19   .gpword foo
20   .gpword bar
21
22 # CHECK: Contents of section .rodata:
23 # CHECK:  {{[0-9a-f]+}} fffe8014 fffe8018
24 #                       ^ 0x10004 - 0x27ff0
25 #                                ^ 0x10008 - 0x27ff0
26
27 # CHECK: SYMBOL TABLE:
28 # CHECK: 00010008         .text           00000000 bar
29 # CHECK: 00010004         .text           00000000 foo
30 # CHECK: 00027ff0         .got            00000000 .hidden _gp