* gas/mips/e32-rel4.s, gas/mips/e32-rel4.s: New test.
* gas/mips/mips.exp: Run new tests.
--- /dev/null
+#objdump: --prefix-addresses -dr
+#name: MIPS ELF reloc 4
+
+.*: +file format.*
+
+Disassembly of section .text:
+0+000 <[^>]*> addiu a0,gp,0
+ 0: R_MIPS_GPREL16 a
+0+004 <[^>]*> addiu a0,gp,4
+ 4: R_MIPS_GPREL16 a
+0+008 <[^>]*> addiu a0,gp,8
+ 8: R_MIPS_GPREL16 a
+0+00c <[^>]*> addiu a0,gp,12
+ c: R_MIPS_GPREL16 a
--- /dev/null
+
+ .section .sdata
+ .global a
+ .4byte 1
+a: .4byte 2
+
+ .section .text
+ la $4,a
+ la $4,a+4
+ la $4,a+8
+ la $4,a+12
+
--- /dev/null
+#objdump: --prefix-addresses -dr
+#name: MIPS ELF reloc 4
+
+.*: +file format.*
+
+Disassembly of section .text:
+0+000 <[^>]*> daddiu a0,gp,0
+ 0: R_MIPS_GPREL16 a
+0+004 <[^>]*> daddiu a0,gp,4
+ 4: R_MIPS_GPREL16 a
+0+008 <[^>]*> daddiu a0,gp,8
+ 8: R_MIPS_GPREL16 a
+0+00c <[^>]*> daddiu a0,gp,12
+ c: R_MIPS_GPREL16 a
--- /dev/null
+
+ .section .sdata
+ .global a
+ .4byte 1
+a: .4byte 2
+
+ .section .text
+ la $4,a
+ la $4,a+4
+ la $4,a+8
+ la $4,a+12
+
run_dump_test "elf${el}-rel"
if [istarget mips64*-*-*] {
- run_dump_test "elf${el}-rel2"
+ run_dump_test "elf${el}-rel2"
+ run_dump_test "elf${el}-rel4"
} {
- run_dump_test "e32${el}-rel2"
+ run_dump_test "e32${el}-rel2"
+ run_dump_test "e32${el}-rel4"
}
run_dump_test "elf${el}-rel3"
run_dump_test "${tmips}${el}empic"