This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[MIPS PATCH RFA] ld-mips-elf testsuite tweaks:
- From: cgd at broadcom dot com
- To: binutils at sources dot redhat dot com
- Cc: echristo at redhat dot com
- Date: 01 Oct 2002 12:00:42 -0700
- Subject: [MIPS PATCH RFA] ld-mips-elf testsuite tweaks:
The following patch enables a few of the "ld-mips-elf" ld testsuite
entries on more targets than mips*-*-elf:
* mips16-1 works fine on non-embedded MIPS ELF targets as-is.
* branch-misc-[12] work fine on non-embedded MIPS ELF targets with
minor modifications that do not impact the functionality of the
tests.
Verified to work properly on the list of targets given in:
http://sources.redhat.com/ml/binutils/2002-10/msg00024.html
8-)
chris
=====
2002-10-01 Chris Demetriou <cgd@broadcom.com>
* ld-mips-elf/branch-misc-1.d: Link at 0x500000 and use -N, to be
more compatible with non-embedded targets.
* ld-mips-elf/branch-misc-2.d: Likewise.
* ld-mips-elf/mips-elf.exp: Clean up some comments about embedded
PIC tests.
(elf): New variable, to control whether generic ELF tests are run.
(embedded_elf): New variable, to control whether ELF tests
requiring embedded PIC or embedded relocs are run.
Index: ld-mips-elf/branch-misc-1.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-mips-elf/branch-misc-1.d,v
retrieving revision 1.1
diff -u -p -r1.1 branch-misc-1.d
--- ld-mips-elf/branch-misc-1.d 18 Sep 2002 20:50:47 -0000 1.1
+++ ld-mips-elf/branch-misc-1.d 1 Oct 2002 18:55:56 -0000
@@ -1,7 +1,7 @@
#name: MIPS branch-misc-1
#source: ../../../gas/testsuite/gas/mips/branch-misc-1.s
#objdump: --prefix-addresses -tdr --show-raw-insn
-#ld: -Ttext 0x400000 -e 0x400000
+#ld: -Ttext 0x500000 -e 0x500000 -N
.*: file format elf.*mips.*
@@ -11,18 +11,18 @@ Disassembly of section \.text:
\.\.\.
\.\.\.
\.\.\.
-0+40003c <[^>]*> 0411fff0 bal 0+400000 <[^>]*>
-0+400040 <[^>]*> 00000000 nop
-0+400044 <[^>]*> 0411fff3 bal 0+400014 <[^>]*>
-0+400048 <[^>]*> 00000000 nop
-0+40004c <[^>]*> 0411fff6 bal 0+400028 <[^>]*>
-0+400050 <[^>]*> 00000000 nop
-0+400054 <[^>]*> 0411000a bal 0+400080 <[^>]*>
-0+400058 <[^>]*> 00000000 nop
-0+40005c <[^>]*> 0411000d bal 0+400094 <[^>]*>
-0+400060 <[^>]*> 00000000 nop
-0+400064 <[^>]*> 04110010 bal 0+4000a8 <[^>]*>
-0+400068 <[^>]*> 00000000 nop
+0+50003c <[^>]*> 0411fff0 bal 0+500000 <[^>]*>
+0+500040 <[^>]*> 00000000 nop
+0+500044 <[^>]*> 0411fff3 bal 0+500014 <[^>]*>
+0+500048 <[^>]*> 00000000 nop
+0+50004c <[^>]*> 0411fff6 bal 0+500028 <[^>]*>
+0+500050 <[^>]*> 00000000 nop
+0+500054 <[^>]*> 0411000a bal 0+500080 <[^>]*>
+0+500058 <[^>]*> 00000000 nop
+0+50005c <[^>]*> 0411000d bal 0+500094 <[^>]*>
+0+500060 <[^>]*> 00000000 nop
+0+500064 <[^>]*> 04110010 bal 0+5000a8 <[^>]*>
+0+500068 <[^>]*> 00000000 nop
\.\.\.
\.\.\.
\.\.\.
Index: ld-mips-elf/branch-misc-2.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-mips-elf/branch-misc-2.d,v
retrieving revision 1.1
diff -u -p -r1.1 branch-misc-2.d
--- ld-mips-elf/branch-misc-2.d 18 Sep 2002 20:50:47 -0000 1.1
+++ ld-mips-elf/branch-misc-2.d 1 Oct 2002 18:55:56 -0000
@@ -1,7 +1,7 @@
#name: MIPS branch-misc-2
#source: ../../../gas/testsuite/gas/mips/branch-misc-2.s
#objdump: --prefix-addresses -tdr --show-raw-insn
-#ld: -Ttext 0x400000 -e 0x400000
+#ld: -Ttext 0x500000 -e 0x500000 -N
.*: file format elf.*mips.*
@@ -11,18 +11,18 @@ Disassembly of section \.text:
\.\.\.
\.\.\.
\.\.\.
-0+40003c <[^>]*> 0411fff0 bal 0+400000 <[^>]*>
-0+400040 <[^>]*> 00000000 nop
-0+400044 <[^>]*> 0411fff3 bal 0+400014 <[^>]*>
-0+400048 <[^>]*> 00000000 nop
-0+40004c <[^>]*> 0411fff6 bal 0+400028 <[^>]*>
-0+400050 <[^>]*> 00000000 nop
-0+400054 <[^>]*> 0411000a bal 0+400080 <[^>]*>
-0+400058 <[^>]*> 00000000 nop
-0+40005c <[^>]*> 0411000d bal 0+400094 <[^>]*>
-0+400060 <[^>]*> 00000000 nop
-0+400064 <[^>]*> 04110010 bal 0+4000a8 <[^>]*>
-0+400068 <[^>]*> 00000000 nop
+0+50003c <[^>]*> 0411fff0 bal 0+500000 <[^>]*>
+0+500040 <[^>]*> 00000000 nop
+0+500044 <[^>]*> 0411fff3 bal 0+500014 <[^>]*>
+0+500048 <[^>]*> 00000000 nop
+0+50004c <[^>]*> 0411fff6 bal 0+500028 <[^>]*>
+0+500050 <[^>]*> 00000000 nop
+0+500054 <[^>]*> 0411000a bal 0+500080 <[^>]*>
+0+500058 <[^>]*> 00000000 nop
+0+50005c <[^>]*> 0411000d bal 0+500094 <[^>]*>
+0+500060 <[^>]*> 00000000 nop
+0+500064 <[^>]*> 04110010 bal 0+5000a8 <[^>]*>
+0+500068 <[^>]*> 00000000 nop
\.\.\.
\.\.\.
\.\.\.
Index: ld-mips-elf/mips-elf.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-mips-elf/mips-elf.exp,v
retrieving revision 1.5
diff -u -p -r1.5 mips-elf.exp
--- ld-mips-elf/mips-elf.exp 18 Sep 2002 20:50:47 -0000 1.5
+++ ld-mips-elf/mips-elf.exp 1 Oct 2002 18:55:57 -0000
@@ -18,9 +18,22 @@
if { [istarget mips*-*-*] } then {
- # Run embedded-pic tests only if generic ELF.
- if { [istarget mips*-*-elf] } {
- # Check basic PC-relative HI/LO relocs.
+ set elf [expr [istarget mips*-*-elf] || [istarget mips*-*-linux*] || \
+ [istarget mips*-*-netbsd]]
+ set embedded_elf [expr [istarget mips*-*-elf]]
+
+
+ if { $elf } {
+ # Check MIPS16 markings being passed through link.
+ run_dump_test "mips16-1"
+
+ # MIPS branch offset final link checking.
+ run_dump_test "branch-misc-1"
+ run_dump_test "branch-misc-2"
+ }
+
+ if { $embedded_elf } {
+ # Check basic Embedded-PIC PC-relative HI/LO relocs.
run_dump_test "empic1-ln"
run_dump_test "empic1-lp"
run_dump_test "empic1-mn"
@@ -28,7 +41,7 @@ if { [istarget mips*-*-*] } then {
run_dump_test "empic1-sn"
run_dump_test "empic1-sp"
- # PC-relative HI/LO reloc edge-case regression tests.
+ # Embedded-PIC PC-relative HI/LO reloc edge-case regression tests.
# As of 2001-12-26, the linker botches the fwd-0 and rev-1 tests.
run_dump_test "empic2-fwd-0"
run_dump_test "empic2-fwd-1"
@@ -39,11 +52,6 @@ if { [istarget mips*-*-*] } then {
run_dump_test "emrelocs-eb"
run_dump_test "emrelocs-el"
- run_dump_test "mips16-1"
-
run_dump_test "region1"
-
- run_dump_test "branch-misc-1"
- run_dump_test "branch-misc-2"
}
}