diff options
Diffstat (limited to 'ld/testsuite/ld-nios2/gprel.s')
-rw-r--r-- | ld/testsuite/ld-nios2/gprel.s | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/ld/testsuite/ld-nios2/gprel.s b/ld/testsuite/ld-nios2/gprel.s new file mode 100644 index 0000000..2414722 --- /dev/null +++ b/ld/testsuite/ld-nios2/gprel.s @@ -0,0 +1,29 @@ +.set noat + +.sdata + +sym1: +.long 0xdead +sym2: +.long 0xbeef +sym3: +.byte 0x7f + +.section .sbss, "w" +sym4: +.long 0 +sym5: +.long 0 +sym6: +.byte 0 + +.text +.global _start +_start: + movui gp, _gp + ldw r1, %gprel(sym1)(gp) + ldw r2, %gprel(sym2)(gp) + ldb r3, %gprel(sym3)(gp) + ldw r1, %gprel(sym4)(gp) + ldw r2, %gprel(sym5)(gp) + ldb r3, %gprel(sym6)(gp) |