OLD | NEW |
1 # Expect script for ld-x86_64 tests | 1 # Expect script for ld-x86_64 tests |
2 # Copyright (C) 2002, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 | 2 # Copyright (C) 2002, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 |
3 # Free Software Foundation | 3 # Free Software Foundation |
4 # | 4 # |
5 # This file is part of the GNU Binutils. | 5 # This file is part of the GNU Binutils. |
6 # | 6 # |
7 # This program is free software; you can redistribute it and/or modify | 7 # This program is free software; you can redistribute it and/or modify |
8 # it under the terms of the GNU General Public License as published by | 8 # it under the terms of the GNU General Public License as published by |
9 # the Free Software Foundation; either version 3 of the License, or | 9 # the Free Software Foundation; either version 3 of the License, or |
10 # (at your option) any later version. | 10 # (at your option) any later version. |
11 # | 11 # |
12 # This program is distributed in the hope that it will be useful, | 12 # This program is distributed in the hope that it will be useful, |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 } | 155 } |
156 | 156 |
157 run_ld_link_tests $x86_64tests | 157 run_ld_link_tests $x86_64tests |
158 | 158 |
159 global link_output | 159 global link_output |
160 global ld | 160 global ld |
161 | 161 |
162 set test_name "Mixed x86_64 and i386 input test 1" | 162 set test_name "Mixed x86_64 and i386 input test 1" |
163 set test mixed1 | 163 set test mixed1 |
164 if { ![ld_simple_link $ld tmpdir/$test "-m$emul tmpdir/${test}a.o tmpdir/${test}
b.o"] } { | 164 if { ![ld_simple_link $ld tmpdir/$test "-m$emul tmpdir/${test}a.o tmpdir/${test}
b.o"] } { |
165 if [string match "*i386 architecture of input file `tmpdir/${test}b.o' is in
compatible with i386:x86-64 output*" $link_output] { | 165 if [string match "*i386* architecture of input file `tmpdir/${test}b.o' is i
ncompatible with i386:x86-64* output*" $link_output] { |
166 pass "$test_name" | 166 pass "$test_name" |
167 } { | 167 } { |
168 fail "$test_name" | 168 fail "$test_name" |
169 } | 169 } |
170 } | 170 } |
171 | 171 |
172 set test_name "Mixed x86_64 and i386 input test 2" | 172 set test_name "Mixed x86_64 and i386 input test 2" |
173 set test mixed2 | 173 set test mixed2 |
174 if { ![ld_simple_link $ld tmpdir/$test "-m$emul tmpdir/${test}a.o tmpdir/${test}
b.o"] } { | 174 if { ![ld_simple_link $ld tmpdir/$test "-m$emul tmpdir/${test}a.o tmpdir/${test}
b.o"] } { |
175 if [string match "*i386 architecture of input file `tmpdir/${test}b.o' is in
compatible with i386:x86-64 output*" $link_output] { | 175 if [string match "*i386* architecture of input file `tmpdir/${test}b.o' is i
ncompatible with i386:x86-64* output*" $link_output] { |
176 pass "$test_name" | 176 pass "$test_name" |
177 } { | 177 } { |
178 fail "$test_name" | 178 fail "$test_name" |
179 } | 179 } |
180 } | 180 } |
181 | 181 |
182 run_dump_test "abs" | 182 run_dump_test "abs" |
183 run_dump_test "abs-l1om" | 183 run_dump_test "abs-l1om" |
184 run_dump_test "pcrel8" | 184 run_dump_test "pcrel8" |
185 run_dump_test "pcrel16" | 185 run_dump_test "pcrel16" |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 fail "Convert x86-64 object to x32" | 292 fail "Convert x86-64 object to x32" |
293 return | 293 return |
294 } | 294 } |
295 | 295 |
296 run_ld_link_tests { | 296 run_ld_link_tests { |
297 {"X32 DSO from x86-64 object" | 297 {"X32 DSO from x86-64 object" |
298 "-shared -melf32_x86_64 tmpdir/simple-x32.o" "--x32" | 298 "-shared -melf32_x86_64 tmpdir/simple-x32.o" "--x32" |
299 {dummy.s} {{readelf {-s --wide} x86-64-x32.rd}} "x86-64-x32"} | 299 {dummy.s} {{readelf {-s --wide} x86-64-x32.rd}} "x86-64-x32"} |
300 } | 300 } |
301 } | 301 } |
OLD | NEW |