1# REQUIRES: mips 2# Check number of got entries is adjusted for linker script-added space. 3 4# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %t.o 5# RUN: echo "SECTIONS { .data : { *(.data.1); . += 0x10000; *(.data.2) } }" > %t.script 6# RUN: ld.lld %t.o -shared -o %t.so -T %t.script 7# RUN: llvm-readobj -A --dynamic-table %t.so | FileCheck %s 8 9# CHECK: 0x7000000A MIPS_LOCAL_GOTNO 4 10# ^-- 2 * header + 2 local entries 11# CHECK: Local entries [ 12# CHECK-NEXT: Entry { 13# CHECK-NEXT: Address: 14# CHECK-NEXT: Access: -32744 15# CHECK-NEXT: Initial: 0x0 16# ^-- loc1 17# CHECK-NEXT: } 18# CHECK-NEXT: Entry { 19# CHECK-NEXT: Address: 20# CHECK-NEXT: Access: -32740 21# CHECK-NEXT: Initial: 0x10000 22# ^-- loc2 23# CHECK-NEXT: } 24# CHECK-NEXT: ] 25 26 .text 27 .globl foo 28foo: 29 lw $t0, %got(loc1)($gp) 30 addi $t0, $t0, %lo(loc1) 31 lw $t0, %got(loc2)($gp) 32 addi $t0, $t0, %lo(loc2) 33 34 .section .data.1,"aw",%progbits 35loc1: 36 .word 0 37 38 .section .data.2,"aw",%progbits 39loc2: 40 .word 0 41