1*56bb7041Schristos # Create a mergeable section full of a single value, 2*56bb7041Schristos # and page references relative to one entry called "data". 3*56bb7041Schristos # 4*56bb7041Schristos # The mergeable entries collapse to one, but the offsets 5*56bb7041Schristos # from "data" must still be retained, and need 3 page entries. 6*56bb7041Schristos # 7*56bb7041Schristos # Technically this isn't valid, because it creates out-of-section 8*56bb7041Schristos # page references. It's still a useful way of making sure that 9*56bb7041Schristos # offsets in mergeable sections are handled correctly. 10*56bb7041Schristos .globl foo 11*56bb7041Schristos .ent foo 12*56bb7041Schristosfoo: 13*56bb7041Schristos .set y,0 14*56bb7041Schristos .rept 4 15*56bb7041Schristos lw $4,%got_page(data + y)($gp) 16*56bb7041Schristos addiu $4,$4,%got_ofst(data + y) 17*56bb7041Schristos .set y,y+0x8000 18*56bb7041Schristos .endr 19*56bb7041Schristos .end foo 20*56bb7041Schristos 21*56bb7041Schristos .section .rodata.cst4,"aM",@progbits,4 22*56bb7041Schristosdata: 23*56bb7041Schristos .rept 0x8000*4 24*56bb7041Schristos .word 123456 25*56bb7041Schristos .endr 26*56bb7041Schristos 27*56bb7041Schristos # Make sure the loadable size of the library is large. 28*56bb7041Schristos .section .bss 29*56bb7041Schristos .globl g 30*56bb7041Schristosg: 31*56bb7041Schristos .space 0x800000 32