41 lines · plain
1# REQUIRES: mips2# 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.o5# RUN: echo "SECTIONS { .data : { *(.data.1); . += 0x10000; *(.data.2) } }" > %t.script6# RUN: ld.lld %t.o -shared -o %t.so -T %t.script7# RUN: llvm-readobj -A --dynamic-table %t.so | FileCheck %s8 9# CHECK: 0x7000000A MIPS_LOCAL_GOTNO 410# ^-- 2 * header + 2 local entries11# CHECK: Local entries [12# CHECK-NEXT: Entry {13# CHECK-NEXT: Address:14# CHECK-NEXT: Access: -3274415# CHECK-NEXT: Initial: 0x016# ^-- loc117# CHECK-NEXT: }18# CHECK-NEXT: Entry {19# CHECK-NEXT: Address:20# CHECK-NEXT: Access: -3274021# CHECK-NEXT: Initial: 0x1000022# ^-- loc223# CHECK-NEXT: }24# CHECK-NEXT: ]25 26 .text27 .globl foo28foo: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",%progbits35loc1:36 .word 037 38 .section .data.2,"aw",%progbits39loc2:40 .word 041