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) } \
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
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
30 lw $t0
,%call16
(__start
)($gp
)