diff options
Diffstat (limited to 'ld/testsuite/ld-powerpc/powerpc.exp')
-rw-r--r-- | ld/testsuite/ld-powerpc/powerpc.exp | 56 |
1 files changed, 51 insertions, 5 deletions
diff --git a/ld/testsuite/ld-powerpc/powerpc.exp b/ld/testsuite/ld-powerpc/powerpc.exp index a853df9..01fca29 100644 --- a/ld/testsuite/ld-powerpc/powerpc.exp +++ b/ld/testsuite/ld-powerpc/powerpc.exp @@ -1,5 +1,5 @@ # Expect script for ld-powerpc tests -# Copyright (C) 2002 Free Software Foundation +# Copyright 2002, 2003 Free Software Foundation # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -20,15 +20,26 @@ if { ![istarget "powerpc*-*-*"] } { return } -# powerpc 32 bit ELF only at the moment. +# powerpc ELF only at the moment. if { [istarget "*-*-macos*"] || [istarget "*-*-netware*"] || [istarget "*-*-pe"] || [istarget "*-*-winnt*"] || [istarget "*-*-cygwin*"] || [istarget "*-*-aix*"] - || [istarget "*-*-beos*"] || [istarget "powerpc64*-*-*"] } { + || [istarget "*-*-beos*"] } { return } +proc supports_ppc64 { } { + global ld + + catch "exec $ld --help | grep emulations" tmp + if [ string match "*elf64ppc*" $tmp ] then { + return 1 + } else { + return 0 + } +} + # List contains test-items with 3 items followed by 2 lists: # 0:name 1:ld options 2:assembler options # 3:filenames of assembler files 4: action and options. 5: name of output file @@ -39,10 +50,45 @@ if { [istarget "*-*-macos*"] || [istarget "*-*-netware*"] # readelf: Apply readelf options on result. Compare with regex (last arg). set ppcelftests { - {"Reloc section order" "-shared -z nocombreloc" "" {reloc.s} + {"Reloc section order" "-melf32ppc -shared -z nocombreloc" "-a32" {reloc.s} {{objdump -hw reloc.d}} "reloc.so"} - {"APUinfo section processing" "" "-me500" {apuinfo1.s apuinfo2.s} + {"APUinfo section processing" "-melf32ppc" + "-a32 -me500" {apuinfo1.s apuinfo2.s} {{readelf -x5 apuinfo.rd}} "apuinfo"} } +set ppc64elftests { + {"TLS static exec" "-melf64ppc" "-a64" {tls.s tlslib.s} + {{objdump -dr tls.d} {objdump -sj.got tls.g} {objdump -sj.tdata tls.t}} + "tls"} + {"TLS helper shared library" "-shared -melf64ppc tmpdir/tlslib.o" "" {} + {} "libtlslib.so"} + {"TLS dynamic exec" "-melf64ppc tmpdir/tls.o tmpdir/libtlslib.so" "" {} + {{readelf -WSsrl tlsexe.r} {objdump -dr tlsexe.d} + {objdump -sj.got tlsexe.g} {objdump -sj.tdata tlsexe.t}} + "tlsexe"} + {"TLS shared" "-shared -melf64ppc tmpdir/tls.o" "" {} + {{readelf -WSsrl tlsso.r} {objdump -dr tlsso.d} + {objdump -sj.got tlsso.g} {objdump -sj.tdata tlsso.t}} + "tls.so"} + {"TLSTOC static exec" "-melf64ppc tmpdir/tlslib.o " "-a64" {tlstoc.s} + {{objdump -dr tlstoc.d} {objdump -sj.toc tlstoc.g} + {objdump -sj.tdata tlstoc.t}} + "tlstoc"} + {"TLSTOC dynamic exec" "-melf64ppc tmpdir/tlstoc.o tmpdir/libtlslib.so" + "" {} + {{readelf -WSsrl tlsexetoc.r} {objdump -dr tlsexetoc.d} + {objdump -sj.toc tlsexetoc.g} {objdump -sj.tdata tlsexetoc.t}} + "tlsexetoc"} + {"TLSTOC shared" "-shared -melf64ppc tmpdir/tlstoc.o" "" {} + {{readelf -WSsrl tlstocso.r} {objdump -dr tlstocso.d} + {objdump -sj.toc tlstocso.g} {objdump -sj.tdata tlstocso.t}} + "tlstoc.so"} +} + + run_ld_link_tests $ppcelftests + +if [ supports_ppc64 ] then { + run_ld_link_tests $ppc64elftests +} |