This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Allow [big_or_little_endian] in ld's run_dump_tests
- From: Richard Sandiford <richard at codesourcery dot com>
- To: binutils at sourceware dot org
- Date: Fri, 17 Aug 2007 09:56:22 +0100
- Subject: Re: Allow [big_or_little_endian] in ld's run_dump_tests
- References: <873ayuv1ga.fsf@firetop.home>
Ping!
Richard Sandiford <richard@codesourcery.com> writes:
> 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