2 # Check that default _gp value is calculated relative
3 # to the GP-relative section with the lowest address.
5 # RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %t.o
6 # RUN: echo "SECTIONS { \
7 # RUN: .sdata : { *(.sdata) } \
8 # RUN: .got : { *(.got) } }" > %t.rel.script
9 # RUN: ld.lld %t.o --script %t.rel.script -shared -o %t.so
10 # RUN: llvm-readobj -S --symbols %t.so | FileCheck %s
22 # CHECK-NEXT: Type: SHT_PROGBITS
24 # CHECK-NEXT: SHF_ALLOC
25 # CHECK-NEXT: SHF_MIPS_GPREL
26 # CHECK-NEXT: SHF_WRITE
28 # CHECK-NEXT: Address: 0xF0
32 # CHECK-NEXT: Type: SHT_PROGBITS
34 # CHECK-NEXT: SHF_ALLOC
35 # CHECK-NEXT: SHF_MIPS_GPREL
36 # CHECK-NEXT: SHF_WRITE
38 # CHECK-NEXT: Address: 0x100
41 # CHECK: Name: _gp (5)
42 # CHECK-NEXT: Value: 0x80E0