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]

RFA: correct xfailed mips-targets for localize-hidden-1 test


When running the binutils test-suite for mips targets,
localize-hidden-1 "randomly" passes, xpasses and fails.  Last
November, Nick added an xfail seen in the patch, but that can
just work for big-endian plain "mips" targets with irix5 and
irix6 compatibility, like mips-elf and mips-sgi-irix5.  Not
e.g. mipsel-elf, mipsisa32r2-elf or mips-linux, and not
mips64-sgi-irix6.  The comment mentions ascending symbol order,
but localize-hidden-1 requires... ...another order (Ldefault
coming last of the local symbols, while having the lowest
value), so I just weasled the wording.

The basic problem is that a lot of MIPS targets for no obvious
good reason have "irix5" and "irix6" ELF compatibility on;
enabling various warts such as noncanonical ELF symbol ordering,
causing localize-hidden-1 to fail.  See
elf32-mips.c:elf32_mips_irix_compat and
elfn32-mips.c:elf_n32_mips_irix_compat.  Other MIPS targets
don't have the wart.  It seems largely unintended to enable the
wart for non-irix targets, as implied by the bfd_target keying
and losing it when creating a system-specific bfd_target vector.

Why isn't this wart specifically keyed to irix5 and irix6; why
is it blindly keyed to bfd_elf32_bigmips_vec,
bfd_elf32_littlemips_vec bfd_elf32_nbigmips_vec and
bfd_elf32_nlittlemips_vec?  If keying to bfd_targets is really a
good idea, wouldn't it be better to make specific
bfd_elf32_bigmips_irix5_vec and bfd_elf32_nbigmips_irix6_vec and
check those in elf32_mips_irix_compat and
elf_n32_mips_irix_compat respectively?

Another minor bug I noticed while looking into adjusting the
xfails is that there are two pairs of matches for
mips*-*-vxworks; the first one would select
bfd_elf32_littlemips_vxworks_vec or bfd_elf32_bigmips_vxworks_vec,
i.e. without the irix-wart.  The second pair, with the irix
wart, can AFAICT only match when configuring for another "32-bit
target" on a "32-bit host" and specifying --enable-targets=all
but not --with-64-bit-bfd.  I'm not touching that, at least not
this time.

I'm just asking to fix the xfail as follows, tested for crosses
to the mentioned targets above.

Ok?

binutils/testsuite:

	* binutils-all/objcopy.exp (localize-hidden-1): Correct xfailed
	mips-targets.

Index: objcopy.exp
===================================================================
RCS file: /cvs/src/src/binutils/testsuite/binutils-all/objcopy.exp,v
retrieving revision 1.76
diff -p -u -r1.76 objcopy.exp
--- objcopy.exp	25 Nov 2011 14:47:48 -0000	1.76
+++ objcopy.exp	2 Mar 2012 04:28:36 -0000
@@ -980,9 +980,19 @@ if [is_elf_format] {
 	}
     }
 
-    # The symbol table for MIPS targets is not sorted by ascending value,
-    # so the regexps in localize-hidden-1.d fail to match.
-    setup_xfail "mips-*-*"
+    # The symbol table for some MIPS targets is sorted differently than
+    # the ELF canonical order, so the regexps in localize-hidden-1.d fail
+    # to match.  These tests must be matched to targets for which
+    # targ_defvec=bfd_elf32_bigmips_vec,
+    # targ_defvec=bfd_elf32_littlemips_vec,
+    # targ_defvec=bfd_elf32_nbigmips_vec or
+    # targ_defvec=bfd_elf32_nlittlemips_vec in config.bfd.  When syncing,
+    # don't forget that earlier case-matches trump later ones.
+    if { ![istarget "mips*-sde-elf*"] && ![istarget "mips64*-*-openbsd*"] } {
+	setup_xfail "mips*-*-irix5*" "mips*-*-irix6*" "mips*-*-elf*" \
+	    "mips*-*-rtems*" "mips*-*-windiss" "mips*-*-none" \
+	    "mips*-*-openbsd*" "mips*-*-chorus*"
+    }
     run_dump_test "localize-hidden-1"
     run_dump_test "testranges"
     run_dump_test "testranges-ia64"

brgds, H-P


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