public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Allow [big_or_little_endian] in ld's run_dump_tests
@ 2007-08-08  9:08 Richard Sandiford
  2007-08-17  9:32 ` Richard Sandiford
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Sandiford @ 2007-08-08  9:08 UTC (permalink / raw)
  To: binutils

Some linker test procedures (such as run_ld_link_tests) automatically
add the endianness option for the current multilib.  It would be useful
to have a way of injecting the endianness option into run_dump_test
tests too.  The patch below does this by replacing the string
"[big_or_little_endian]" with the Tcl value of that expression.

We can then fix the only difference in mips-wrs-vxworks results
between no-endianness runs and -EL runs.  vxworks1-static.d is
a check-for-error run_dump_test that relies on objects created
by earlier run_ld_link_tests.  The earlier objects are created
with the multilib endianness option, so vxworks1-static.d should
use that same option.

Tested on mips-wrs-vxworks.  OK to install?

Richard


ld/testsuite/
	* lib/ld-lib.exp (run_dump_test): Allow [big_or_little_endian]
	to appear in assembler and linker options.
	* ld-mips-elf/vxworks1-static.d (ld): Add [big_or_little_endian].

Index: ld/testsuite/lib/ld-lib.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/lib/ld-lib.exp,v
retrieving revision 1.48
diff -u -p -r1.48 ld-lib.exp
--- ld/testsuite/lib/ld-lib.exp	6 Jul 2007 14:09:45 -0000	1.48
+++ ld/testsuite/lib/ld-lib.exp	8 Aug 2007 08:53:26 -0000
@@ -708,6 +708,12 @@ proc run_dump_test { name } {
 	}
 	set opts($opt_name) [concat $opts($opt_name) $opt_val]
     }
+    if [is_endian_output_format $opts(ld)] {
+	foreach opt { as ld } {
+	    regsub {\[big_or_little_endian\]} $opts($opt) \
+		[big_or_little_endian] opts($opt)
+	}
+    }
 
     # Decide early whether we should run the test for this target.
     if { [llength $opts(target)] > 0 } {
Index: ld/testsuite/ld-mips-elf/vxworks1-static.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-mips-elf/vxworks1-static.d,v
retrieving revision 1.1
diff -u -p -r1.1 vxworks1-static.d
--- ld/testsuite/ld-mips-elf/vxworks1-static.d	22 Mar 2006 09:28:15 -0000	1.1
+++ ld/testsuite/ld-mips-elf/vxworks1-static.d	8 Aug 2007 08:53:26 -0000
@@ -1,4 +1,4 @@
 #name: VxWorks executable test 1 (static)
 #source: vxworks1.s
-#ld: tmpdir/libvxworks1.so -Tvxworks1.ld
+#ld: tmpdir/libvxworks1.so -Tvxworks1.ld [big_or_little_endian]
 #error: Dynamic sections created in non-dynamic link

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-08-17 12:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-08  9:08 Allow [big_or_little_endian] in ld's run_dump_tests Richard Sandiford
2007-08-17  9:32 ` Richard Sandiford
2007-08-17 13:16   ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).