From: "Maciej W. Rozycki" <macro@codesourcery.com>
To: Richard Sandiford <rdsandiford@googlemail.com>,
Alan Modra <amodra@gmail.com>
Cc: <binutils@sourceware.org>
Subject: [PATCH] MIPS: Enable NewABI tests for SDE targets
Date: Wed, 01 Aug 2012 14:43:00 -0000 [thread overview]
Message-ID: <alpine.DEB.1.10.1208011342120.20608@tp.orcam.me.uk> (raw)
[-- Attachment #1: Type: text/plain, Size: 4489 bytes --]
Hi,
As easily observed in config.bfd SDE targets support NewABI these days as
well and therefore need testing. The change below enables NewABI tests
for GAS and LD.
Regrettably this turned out not as straightforward as it would seem,
especially for LD, as there is assumption about The NewABI Target being
Linux made in a few places. The change therefore makes additional changes
to make this assumption go away. As a side effect some IRIX failures have
gone away.
These additional changes required updates to the LD version of
run_dump_test -- I carried over features added to the GAS version of same,
specifically the optional EXTRA_OPTIONS argument and the "dump" keyword.
Then mips-elf.exp makes use of these changes to abstract the handling of
GAS and LD options across targets.
In the course of developing these changes the "dump" keyword turned out
unneeded, but I propose to keep it for consistency between the two
implementations of run_dump_test, especially as it looks reasonable to use
by targets whose maintainers prefer to bulk-run dump tests through a glob
pattern -- that obviously precludes calling the same test with
EXTRA_OPTIONS depending on configuration as I do here.
The rest of the changes are the usual padding/alignment fixes as
bare-iron MIPS targets align known sections to 4 while other MIPS targets
use 8.
I have regression-tested this using Alan's clever script (thanks, Alan!),
although with more interesting MIPS targets added (these included
mips-freebsd, mips64el-freebsd, mips-sgi-irix5 and mips-sgi-irix6 in
particular as these use incompatible LD emulations). This produced no
regressions and the following progressions:
mips-sgi-irix6 -FAIL: MIPS ELF got reloc n32
mips-sgi-irix6 -FAIL: MIPS ELF xgot reloc n32
mips-sgi-irix6 -FAIL: MIPS ELF got reloc n64
mips-sgi-irix6 -FAIL: MIPS ELF xgot reloc n64
mips-sgi-irix6 -ERROR: -mips32r2 .../ld/testsuite/ld-mips-elf/mips16-call-global-1.s: assembly failed
mips-sgi-irix6 -ERROR: -mips32r2 .../ld/testsuite/ld-mips-elf/mips16-intermix-1.s: assembly failed
Alan, while at it -- may I suggest that you add UNRESOLVED to the list of
test results watched? According to DejaGNU/POSIX test suite standard
documentation that test result means there is a problem with the test case
itself and such should not be missed. I've seen it happen where an
exception was thrown by the TCL interpreter for example because a
reference to an uninitialised variable was made and the appearance (or
removal) of such problems should be highlighted when regression testing.
I have such change applied to my copy of your script already.
2012-08-01 Maciej W. Rozycki <macro@codesourcery.com>
gas/testsuite/
* gas/mips/mips.exp: Set has_newabi for mips*-sde-elf* too.
* gas/mips/elf-rel-got-n32.s: Adjust padding.
* gas/mips/elf-rel-got-n64.s: Likewise.
* gas/mips/elf-rel23.s: Likewise.
* gas/mips/elf-rel28.s: Likewise.
* gas/mips/n32-consec.s: Likewise.
* gas/mips/elf-rel-xgot-n32.d: Adjust output expected.
* gas/mips/elf-rel-xgot-n64.d: Likewise.
* gas/mips/elf-rel23.d: Likewise.
* gas/mips/elf-rel23a.d: Likewise.
* gas/mips/elf-rel23b.d: Likewise.
* gas/mips/elf-rel28-n32.d: Likewise.
ld/testsuite/
* ld-mips-elf/emit-relocs-1a.s: Make section alignment uniform
across targets.
* ld-mips-elf/emit-relocs-1b.s: Likewise.
* ld-mips-elf/jalbal.s: Adjust padding.
* ld-mips-elf/elf-rel-got-n32-embed.d: New test.
* ld-mips-elf/elf-rel-got-n64-embed.d: New test.
* ld-mips-elf/elf-rel-xgot-n32-embed.d: New test.
* ld-mips-elf/elf-rel-xgot-n64-embed.d: New test.
* ld-mips-elf/elf-rel-got-n32.d: Remove -melf32btsmipn32.
* ld-mips-elf/elf-rel-got-n64.d: Remove -melf64btsmip. Adjust
output.
* ld-mips-elf/elf-rel-got-n64-linux.d: Remove -melf64btsmip.
* ld-mips-elf/elf-rel-xgot-n32.d: Remove -melf32btsmipn32.
Adjust output.
* ld-mips-elf/elf-rel-xgot-n64.d: Remove -melf64btsmip. Adjust
output.
* ld-mips-elf/elf-rel-xgot-n64-linux.d: Likewise.
* ld-mips-elf/reloc-1-n64.d: Remove -melf64btsmip.
* ld-mips-elf/mips-elf.exp: Set has_newabi for mips*-sde-elf*
too. Move tool flags from o32_as_flags and o32_ld_flags
variables into abi_asflags and abi_ldflags arrays. Adjust test
cases run to use them. Run the new tests.
* lib/ld-lib.exp (run_dump_test): Implement the EXTRA_OPTIONS
argument and the "dump" keyword.
OK to apply?
Maciej
binutils-mips-sde-test-newabi.diff
[Attached compressed due to its size.]
[-- Attachment #2: Type: application/octet-stream, Size: 16797 bytes --]
next reply other threads:[~2012-08-01 14:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-01 14:43 Maciej W. Rozycki [this message]
2012-08-01 18:20 ` Maciej W. Rozycki
2012-08-02 18:39 ` Richard Sandiford
2012-08-03 21:46 ` Maciej W. Rozycki
2012-08-04 12:07 ` Richard Sandiford
2012-08-06 21:39 ` Maciej W. Rozycki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.1.10.1208011342120.20608@tp.orcam.me.uk \
--to=macro@codesourcery.com \
--cc=amodra@gmail.com \
--cc=binutils@sourceware.org \
--cc=rdsandiford@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).