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