40 lines · plain
1# REQUIRES: mips2# Check the case when small section (less that 0x10000 bytes) occupies3# two adjacent 0xffff-bytes pages. We need to create two GOT entries4# for R_MIPS_GOT_PAGE relocations.5 6# RUN: llvm-mc -filetype=obj -triple=mips64-unknown-linux -o %t.o %s7# RUN: ld.lld --section-start .rodata=0x27FFC -shared -o %t.so %t.o8# RUN: llvm-readobj --symbols -A %t.so | FileCheck %s9 10# CHECK: Name: foo11# CHECK-NEXT: Value: 0x27FFC12# ^ page-address = (0x27ffc + 0x8000) & ~0xffff = 0x2000013 14# CHECK: Name: bar15# CHECK-NEXT: Value: 0x2800016# ^ page-address = (0x28000 + 0x8000) & ~0xffff = 0x3000017 18# CHECK: Local entries [19# CHECK-NEXT: Entry {20# CHECK-NEXT: Address:21# CHECK-NEXT: Access: -3273622# CHECK-NEXT: Initial: 0x2000023# CHECK-NEXT: }24# CHECK-NEXT: Entry {25# CHECK-NEXT: Address:26# CHECK-NEXT: Access: -3272827# CHECK-NEXT: Initial: 0x3000028# CHECK-NEXT: }29# CHECK-NEXT: ]30 31 .text32 ld $v0,%got_page(foo)($gp)33 ld $v0,%got_page(bar)($gp)34 35 .rodata36foo:37 .word 038bar:39 .word 040