27 lines · plain
1// REQUIRES: mips2// RUN: llvm-mc -filetype=obj -triple=mips64-unknown-linux %s -o %t3// RUN: ld.lld -shared %t -o %t24// RUN: llvm-readelf --sections --symbols %t2 | FileCheck %s5 6// The Mips _GLOBAL_OFFSET_TABLE_ should be defined at the start of the .got7 8.globl a9.hidden a10.type a,@object11.comm a,4,412 13.globl f14.type f,@function15f:16 ld $v0,%got_page(a)($gp)17 daddiu $v0,$v0,%got_ofst(a)18 19.global _start20.type _start,@function21_start:22 lw $t0,%call16(f)($gp)23 .word _GLOBAL_OFFSET_TABLE_ - .24 25// CHECK: {{.*}} .got PROGBITS [[GOT:[0-9a-f]+]]26// CHECK: {{.*}} [[GOT]] {{.*}} _GLOBAL_OFFSET_TABLE_27