This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] MIPS: Enable NewABI tests for SDE targets


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: binutils-mips-sde-test-newabi.diff.bz2
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]