This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] Extend MIPS gas elf-rel6 testcase
- From: Thiemo Seufer <ths at networkno dot de>
- To: binutils at sourceware dot org
- Date: Wed, 14 Jun 2006 19:07:43 +0100
- Subject: [PATCH] Extend MIPS gas elf-rel6 testcase
Hello All,
I committed the appended patch, it extends the existing elf-rel6
testcase, and covers now NewABI as well.
Thiemo
2006-06-14 Thiemo Seufer <ths@mips.com>
Maciej W. Rozycki <macro@mips.com>
* gas/mips/elf-rel6.d, gas/mips/elf-rel6.s: Extend testcase.
* gas/mips/elf-rel6.d-n32.d, gas/mips/elf-rel6-n64.d: New files.
* gas/mips/mips.exp: Run new testcases.
Index: gas/testsuite/gas/mips/elf-rel6.d
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/mips/elf-rel6.d,v
retrieving revision 1.3
diff -u -p -r1.3 elf-rel6.d
--- gas/testsuite/gas/mips/elf-rel6.d 7 May 2003 05:08:20 -0000 1.3
+++ gas/testsuite/gas/mips/elf-rel6.d 14 Jun 2006 17:54:43 -0000
@@ -9,7 +9,7 @@ Disassembly of section \.text:
0: R_MIPS16_GPREL bar
0+04 <.*> lb v0,1\(v1\)
4: R_MIPS16_GPREL bar
-0+08 <[^>]*> nop
-0+0a <[^>]*> nop
+0+08 <.*> lb v0,4660\(v1\)
+ 8: R_MIPS16_GPREL bar
0+0c <[^>]*> nop
0+0e <[^>]*> nop
Index: gas/testsuite/gas/mips/elf-rel6.s
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/mips/elf-rel6.s,v
retrieving revision 1.2
diff -u -p -r1.2 elf-rel6.s
--- gas/testsuite/gas/mips/elf-rel6.s 2 Aug 2002 02:33:48 -0000 1.2
+++ gas/testsuite/gas/mips/elf-rel6.s 14 Jun 2006 17:54:43 -0000
@@ -13,6 +13,7 @@ bar: .byte 3
f:
lb $2,%gprel(bar)($3)
lb $2,%gprel(bar+1)($3)
+ lb $2,%gprel(bar+0x1234)($3)
.end f
# align section end to 16-byte boundary for easier testing on multiple targets
Index: gas/testsuite/gas/mips/mips.exp
===================================================================
RCS file: /cvs/src/src/gas/testsuite/gas/mips/mips.exp,v
retrieving revision 1.120
diff -u -p -r1.120 mips.exp
--- gas/testsuite/gas/mips/mips.exp 9 Jun 2006 11:53:39 -0000 1.120
+++ gas/testsuite/gas/mips/mips.exp 14 Jun 2006 17:54:44 -0000
@@ -651,6 +651,10 @@ if { [istarget mips*-*-vxworks*] } {
}
run_dump_test "elf-rel5"
run_dump_test "elf-rel6"
+ if $has_newabi {
+ run_dump_test "elf-rel6-n32"
+ run_dump_test "elf-rel6-n64"
+ }
run_dump_test "elf-rel7"
run_dump_test "elf-rel8"
run_dump_test "elf-rel9"
--- /dev/null 2006-06-14 07:29:53.156000000 +0100
+++ gas/testsuite/gas/mips/elf-rel6-n32.d 2006-06-14 18:42:46.000000000 +0100
@@ -0,0 +1,16 @@
+#objdump: -dr --prefix-addresses
+#name: MIPS ELF reloc 6 n32
+#as: -mabi=n32 -march=mips64
+#source: elf-rel6.s
+
+.*: +file format elf.*mips.*
+
+Disassembly of section \.text:
+0+00 <.*> lb v0,0\(v1\)
+ 0: R_MIPS16_GPREL bar
+0+04 <.*> lb v0,0\(v1\)
+ 4: R_MIPS16_GPREL bar\+0x1
+0+08 <.*> lb v0,0\(v1\)
+ 8: R_MIPS16_GPREL bar\+0x1234
+0+0c <[^>]*> nop
+0+0e <[^>]*> nop
--- /dev/null 2006-06-14 07:29:53.156000000 +0100
+++ gas/testsuite/gas/mips/elf-rel6-n64.d 2006-06-14 18:51:54.000000000 +0100
@@ -0,0 +1,22 @@
+#objdump: -dr --prefix-addresses
+#name: MIPS ELF reloc 6 n64
+#as: -mabi=64 -march=mips64
+#source: elf-rel6.s
+
+.*: +file format elf.*mips.*
+
+Disassembly of section \.text:
+0+00 <.*> lb v0,0\(v1\)
+ 0: R_MIPS16_GPREL bar
+ 0: R_MIPS_NONE \*ABS\*
+ 0: R_MIPS_NONE \*ABS\*
+0+04 <.*> lb v0,0\(v1\)
+ 4: R_MIPS16_GPREL bar\+0x1
+ 4: R_MIPS_NONE \*ABS\*\+0x1
+ 4: R_MIPS_NONE \*ABS\*\+0x1
+0+08 <.*> lb v0,0\(v1\)
+ 8: R_MIPS16_GPREL bar\+0x1234
+ 8: R_MIPS_NONE \*ABS\*\+0x1234
+ 8: R_MIPS_NONE \*ABS\*\+0x1234
+0+0c <[^>]*> nop
+0+0e <[^>]*> nop