[PATCH] Fix ld-scripts/sane1 for mingw32

Joe Seymour jseymour@codesourcery.com
Thu Oct 4 21:05:00 GMT 2012


On 24 Jan 2011, Alan Modra wrote:
> It takes a while to write a proper testcase that doesn't introduce
> failures on some target.  This one fails on x86_64-mingw32 for
> reasons that I haven't fully investigated, but suspect that the
> failure is showing a real bug.  It looks like a case of address wrap.
>
> 	* ld-scripts/sane1.d, * ld-scripts/sane1.t: New test.
> 	* ld-scripts/expr.exp: Run it.

I've noticed this. I don't think it's a real bug, but just an artifact of output
being ordered differently on mingw32 hosts. The addresses & symbols are still
correct.

This patch adjusts the test to invoke nm with "-n", making output consistent
across hosts.

I don't have commit access, so if this is acceptable perhaps someone could
commit this for me.

Thanks,

2012-10-04  Joe Seymour  <jseymour@codesourcery.com>

	* ld-scripts/sane1.d: Sort output from nm.

diff --git a/ld/testsuite/ld-scripts/sane1.d b/ld/testsuite/ld-scripts/sane1.d
index 26abaf3..2e13465 100644
--- a/ld/testsuite/ld-scripts/sane1.d
+++ b/ld/testsuite/ld-scripts/sane1.d
@@ -1,33 +1,33 @@
 # source: data.s
 # ld: -T sane1.t
-# nm: -B
+# nm: -B -n
 # notarget: mmix-* pdp11-* rs6000-*-aix* tic30-*-aout
 # mmix symbol sections are wrong, pdp sign extends 16-bit addresses
 # rs6000-aix and tic30 don't like empty .text

 #...
-0+8004 D d1
-0+8024 D d2
+0+0004 A s5
+0+0004 A x5
 0+0020 A diff
-0+0100 A e1
+0+0020 A sum_neg
+0+0028 A sum
 0+0080 A e2
-0+8000 A e3
 0+0090 A prod
-0+8002 D s1
+0+0100 A e1
+0+19a0 A s6
+0+19a0 A x6
+0+8000 A e3
 0+8001 D s2
-0+8007 D s3
+0+8001 D x2
+0+8002 D s1
 0+8002 A s4
-0+0004 A s5
-0+19a0 A s6
-0+8020 D s_diff
-0+8090 D s_prod
-0+8028 D s_sum
-0+8020 D s_sum_neg
-0+0028 A sum
-0+0020 A sum_neg
 0+8002 D x1
-0+8001 D x2
-0+8007 D x3
 0+8002 A x4
-0+0004 A x5
-0+19a0 A x6
+0+8004 D d1
+0+8007 D s3
+0+8007 D x3
+0+8020 D s_diff
+0+8020 D s_sum_neg
+0+8024 D d2
+0+8028 D s_sum
+0+8090 D s_prod



More information about the Binutils mailing list