Move run-time support check for size relocation
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 29 Jul 2015 17:51:08 +0000 (10:51 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 29 Jul 2015 17:52:38 +0000 (10:52 -0700)
We must check run-time support for size relocation first before running
the tests.

* ld-size/size.exp: Move run-time support check.

ld/testsuite/ChangeLog
ld/testsuite/ld-size/size.exp

index d0b5daf42c64313e3611aa838eeeaf8e722b2145..a9e5a7be9dda3b096c6aa7882b0b64221725a991 100644 (file)
@@ -1,3 +1,7 @@
+2015-07-29  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * ld-size/size.exp: Move run-time support check.
+
 2015-07-28  Alan Modra  <amodra@gmail.com>
 
        * ld-powerpc/elfv2so.d: Update.
index 2a16c71266867590535530b9ac6e547f266d47c3..5a774fa1f6a4742deaea131a0ff1ca93c292dd02 100644 (file)
@@ -161,6 +161,20 @@ run_cc_link_tests [list \
     ] \
 ]
 
+# Check if size relocation works at run-time.
+catch "exec tmpdir/size-7.exe > tmpdir/dump.out" exec_output
+if ![string match "" $exec_output] then {
+    send_log "No run-time size relocation support: $exec_output\n"
+    verbose "No run-time size relocation support: $exec_output" 1
+    return
+}
+
+if { [regexp_diff "tmpdir/dump.out" "$srcdir/$subdir/size-7.out" ] } then {
+    verbose "output is [file_contents "tmpdir/dump.out"]" 2
+    fail "Run-time size relocation"
+    return
+}
+
 # Run-time size relocation tests.
 run_ld_link_exec_tests [] [list \
     [list \
@@ -295,17 +309,3 @@ run_ld_link_exec_tests [] [list \
        "size-10.out" \
     ] \
 ]
-
-# Check if size relocation works at run-time.
-catch "exec tmpdir/size-7.exe > tmpdir/dump.out" exec_output
-if ![string match "" $exec_output] then {
-    send_log "No run-time size relocation support: $exec_output\n"
-    verbose "No run-time size relocation support: $exec_output" 1
-    return
-}
-
-if { [regexp_diff "tmpdir/dump.out" "$srcdir/$subdir/size-7.out" ] } then {
-    verbose "output is [file_contents "tmpdir/dump.out"]" 2
-    fail "Run-time size relocation"
-    return
-}