got-page-6.s 592 B

123456789101112131415161718192021222324252627
  1. # Create a mergeable section full of a single value.
  2. # Create page references relative to instances of the value
  3. # that are large distances apart.
  4. #
  5. # The mergeable entries collapse to one, so even with the
  6. # large distances in the original file, we should end
  7. # up with a single page entry.
  8. .globl foo
  9. .ent foo
  10. foo:
  11. .rept 4
  12. lw $4,%got_page(1f)($gp)
  13. addiu $4,$4,%got_ofst(1f)
  14. .section .rodata.cst4,"aM",@progbits,4
  15. 1:
  16. .rept 0x8000
  17. .word 123456
  18. .endr
  19. .text
  20. .endr
  21. .end foo
  22. # Make sure the loadable size of the library is large.
  23. .section .bss
  24. .globl g
  25. g:
  26. .space 0x800000