[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / ELF / mips-gprel32-relocs-gp0.s
blobf26237e905cd4525a20346b744bad860a1435b26
1 # REQUIRES: mips
2 # Check that relocatable object produced by LLD has zero gp0 value.
4 # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %t.o
5 # RUN: ld.lld -r -o %t-rel.o %t.o
6 # RUN: llvm-readobj -A %t-rel.o | FileCheck --check-prefix=REL %s
8 # RUN: echo "SECTIONS { \
9 # RUN: .rodata ALIGN(0x1000) : { *(.rodata) } \
10 # RUN: . = 0x20000; .text : { *(.text) } \
11 # RUN: }" > %t.script
12 # RUN: ld.lld -shared --script %t.script -o %t.so %S/Inputs/mips-gp0-non-zero.o
13 # RUN: llvm-objdump -s -t %t.so | FileCheck --check-prefix=DUMP %s
15 # REL: GP: 0x0
17 # DUMP: SYMBOL TABLE:
18 # DUMP: 00020008 l .text 00000000 bar
19 # DUMP: 00020004 l .text 00000000 foo
20 # DUMP: 00028000 l .got 00000000 .hidden _gp
22 # DUMP: Contents of section .rodata:
23 # DUMP: 1000 fffffff4 fffffff8
24 # ^ 0x20004 + 0x7ff0 - 0x28000
25 # ^ 0x20008 + 0x7ff0 - 0x28000
27 .text
28 .global __start
29 __start:
30 lw $t0,%call16(__start)($gp)
31 foo:
32 nop
33 bar:
34 nop
36 .section .rodata, "a"
38 .gpword foo
39 .gpword bar