diff options
Diffstat (limited to 'ld/testsuite/ld-x86-64/x86-64.exp')
-rw-r--r-- | ld/testsuite/ld-x86-64/x86-64.exp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp index ed5d8dc..f5d1b0b 100644 --- a/ld/testsuite/ld-x86-64/x86-64.exp +++ b/ld/testsuite/ld-x86-64/x86-64.exp @@ -75,10 +75,41 @@ set x86_64tests { {"TLS IE->LE transition" "-melf_x86_64" "--64" {tlsie1.s} {{objdump -dwr tlsie1.dd}} "tlsie1"} + {"Helper 64bit object 1" "-r -melf_x86_64" + "--64" {mixed1a.s} {} "libmixe1a.o"} + {"Helper 32bit object 1" "-r -melf_i386" + "--32" {mixed1b.s} {} "libmixe1b.o"} + {"Helper 64bit object 2" "-r -melf_x86_64" + "--64" {mixed2a.s} {} "libmixe2a.o"} + {"Helper 32bit object 2" "-r -melf_i386" + "--32" {mixed2b.s} {} "libmixe2b.o"} } run_ld_link_tests $x86_64tests +global link_output +global ld + +set test_namename "Mixed x86_64 and i386 input test 1" +set test mixed1 +if { ![ld_simple_link $ld tmpdir/$test "-melf_x86_64 tmpdir/${test}a.o tmpdir/${test}b.o"] } { + if [string match "*i386 architecture of input file `tmpdir/${test}b.o' is incompatible with i386:x86-64 output*" $link_output] { + pass "$test_name" + } { + fail "$test_name" + } +} + +set test_namename "Mixed x86_64 and i386 input test 2" +set test mixed2 +if { ![ld_simple_link $ld tmpdir/$test "-melf_x86_64 tmpdir/${test}a.o tmpdir/${test}b.o"] } { + if [string match "*i386 architecture of input file `tmpdir/${test}b.o' is incompatible with i386:x86-64 output*" $link_output] { + pass "$test_name" + } { + fail "$test_name" + } +} + run_dump_test "abs" run_dump_test "abs-l1om" run_dump_test "pcrel8" |