1 # Check the case when small section (less that 0x10000 bytes) occupies
2 # two adjacent 0xffff-bytes pages. We need to create two GOT entries
3 # for R_MIPS_GOT_PAGE relocations.
5 # RUN: llvm-mc -filetype=obj -triple=mips64-unknown-linux -o %t.o %s
6 # RUN: ld.lld --section-start .rodata=0x27FFC -shared -o %t.so %t.o
7 # RUN: llvm-readobj -t -mips-plt-got %t.so | FileCheck %s
12 # CHECK-NEXT: Value: 0x28000
13 # ^ page-address = (0x28000 + 0x8000) & ~0xffff = 0x30000
16 # CHECK-NEXT: Value: 0x27FFC
17 # ^ page-address = (0x27ffc + 0x8000) & ~0xffff = 0x20000
19 # CHECK: Local entries [
21 # CHECK-NEXT: Address:
22 # CHECK-NEXT: Access: -32736
23 # CHECK-NEXT: Initial: 0x20000
26 # CHECK-NEXT: Address:
27 # CHECK-NEXT: Access: -32728
28 # CHECK-NEXT: Initial: 0x30000
33 ld $v0,%got_page(foo)($gp)
34 ld $v0,%got_page(bar)($gp)