aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-mips-elf/mips-elf.exp
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2005-03-02 21:22:57 +0000
committerDaniel Jacobowitz <drow@false.org>2005-03-02 21:22:57 +0000
commitf4e584bd00f115a370c1975cf512285337022624 (patch)
tree36330d8555b43e9c438795b89328002860d0c99e /ld/testsuite/ld-mips-elf/mips-elf.exp
parent128b3d864335747b62d95d2d8ba8e737e14a6d8f (diff)
downloadgdb-f4e584bd00f115a370c1975cf512285337022624.zip
gdb-f4e584bd00f115a370c1975cf512285337022624.tar.gz
gdb-f4e584bd00f115a370c1975cf512285337022624.tar.bz2
* ld-mips-elf/tlsbin-o32.s, ld-mips-elf/mips-dyn.ld,
ld-mips-elf/tlslib-o32.got, ld-mips-elf/tlslib-o32.d, ld-mips-elf/tlslib-o32.s, ld-mips-elf/mips-lib.ld, ld-mips-elf/tlsbin-o32.got, ld-mips-elf/tlsdyn-o32.d, ld-mips-elf/tlsdyn-o32.got, ld-mips-elf/tlsbin-o32.d, ld-mips-elf/tlsdyn-o32.s, ld-mips-elf/tls-multi-got-1.got, ld-mips-elf/tls-multi-got-1-1.s, ld-mips-elf/tls-multi-got-1.d, ld-mips-elf/tls-multi-got-1.r, ld-mips-elf/tls-multi-got-1-2.s, ld-mips-elf/tlslib-o32-ver.got, ld-mips-elf/tlslib.ver, ld-mips-elf/tlslib-o32-hidden.got, ld-mips-elf/tlslib-hidden.ver, ld-mips-elf/tlsdyn-o32-1.d, ld-mips-elf/tlsdyn-o32-3.got, ld-mips-elf/tlsdyn-o32-2.d, ld-mips-elf/tlsdyn-o32-2.s, ld-mips-elf/tlsdyn-o32-3.d, ld-mips-elf/tlsdyn-o32-1.got, ld-mips-elf/tlsdyn-o32-2.got: New files. * ld-mips-elf/mips-elf.exp: Run the new tests.
Diffstat (limited to 'ld/testsuite/ld-mips-elf/mips-elf.exp')
-rw-r--r--ld/testsuite/ld-mips-elf/mips-elf.exp66
1 files changed, 65 insertions, 1 deletions
diff --git a/ld/testsuite/ld-mips-elf/mips-elf.exp b/ld/testsuite/ld-mips-elf/mips-elf.exp
index 15574e7..6cc7d9a 100644
--- a/ld/testsuite/ld-mips-elf/mips-elf.exp
+++ b/ld/testsuite/ld-mips-elf/mips-elf.exp
@@ -1,5 +1,5 @@
# Expect script for MIPS ELF linker tests
-# Copyright 2002, 2003 Free Software Foundation, Inc.
+# Copyright 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
#
# 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
@@ -99,3 +99,67 @@ run_dump_test "mips16-hilo"
if {$has_newabi} {
run_dump_test "mips16-hilo-n32"
}
+
+# For tests which may involve multiple files, use run_ld_link_tests.
+
+# 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
+
+# Actions:
+# objdump: Apply objdump options on result. Compare with regex (last arg).
+# nm: Apply nm options on result. Compare with regex (last arg).
+# readelf: Apply readelf options on result. Compare with regex (last arg).
+
+set mips_tls_tests {
+ {"Static executable with TLS" "-static -melf32btsmip -T mips-dyn.ld"
+ "-EB -march=mips1 -32 -KPIC" {tlsbin-o32.s}
+ {{objdump {-dr -m mips:isa32r2} tlsbin-o32.d} {objdump -srj.got tlsbin-o32.got}}
+ "tls-static-o32"}
+ {"Shared library with TLS" "-shared -melf32btsmip -T mips-lib.ld"
+ "-EB -march=mips1 -32 -KPIC" {tlslib-o32.s}
+ {{objdump {-dr -m mips:isa32r2} tlslib-o32.d} {objdump -Rsj.got tlslib-o32.got}}
+ "tlslib-o32.so"}
+ {"Dynamic executable with TLS"
+ "-melf32btsmip -T mips-dyn.ld tmpdir/tlslib-o32.so"
+ "-EB -march=mips1 -32 -KPIC" {tlsdyn-o32.s}
+ {{objdump {-dr -m mips:isa32r2} tlsdyn-o32.d} {objdump -Rsj.got tlsdyn-o32.got}}
+ "tls-dynamic-o32"}
+ {"Shared library with multiple GOTs and TLS"
+ "-shared -melf32btsmip -T mips-lib.ld"
+ "-EB -march=mips1 -32 -KPIC" {tls-multi-got-1-1.s tls-multi-got-1-2.s}
+ {{readelf {-d -r} tls-multi-got-1.r}
+ {objdump {-dr -m mips:isa32r2} tls-multi-got-1.d}
+ {objdump -Rsj.got tls-multi-got-1.got}}
+ "tlslib-multi.so"}
+ {"Shared library with TLS and versioning"
+ "-shared -melf32btsmip -T mips-lib.ld --version-script tlslib.ver"
+ "-EB -march=mips1 -32 -KPIC" {tlslib-o32.s}
+ {{objdump {-dr -m mips:isa32r2} tlslib-o32.d} {objdump -Rsj.got tlslib-o32-ver.got}}
+ "tlslib-o32-ver.so"}
+ {"Dynamic executable with TLS and versioning"
+ "-melf32btsmip -T mips-dyn.ld tmpdir/tlslib-o32-ver.so"
+ "-EB -march=mips1 -32 -KPIC" {tlsdyn-o32.s tlsdyn-o32-2.s}
+ {{objdump {-dr -m mips:isa32r2} tlsdyn-o32-1.d} {objdump -Rsj.got tlsdyn-o32-1.got}}
+ "tls-dynamic-o32-ver"}
+ {"Dynamic executable with TLS and versioning (order 2)"
+ "-melf32btsmip -T mips-dyn.ld tmpdir/tlsdyn-o32.o tmpdir/tlslib-o32-ver.so tmpdir/tlsdyn-o32-2.o"
+ "-EB -march=mips1 -32 -KPIC" {}
+ {{objdump {-dr -m mips:isa32r2} tlsdyn-o32-2.d} {objdump -Rsj.got tlsdyn-o32-2.got}}
+ "tls-dynamic-o32-ver-2"}
+ {"Dynamic executable with TLS and versioning (order 3)"
+ "-melf32btsmip -T mips-dyn.ld tmpdir/tlsdyn-o32-2.o tmpdir/tlslib-o32-ver.so tmpdir/tlsdyn-o32.o"
+ "-EB -march=mips1 -32 -KPIC" {}
+ {{objdump {-dr -m mips:isa32r2} tlsdyn-o32-3.d} {objdump -Rsj.got tlsdyn-o32-3.got}}
+ "tls-dynamic-o32-ver-3"}
+ {"Shared library with TLS and hidden symbols"
+ "-shared -melf32btsmip -T mips-lib.ld --version-script tlslib-hidden.ver"
+ "-EB -march=mips1 -32 -KPIC" {tlslib-o32.s}
+ {{objdump {-dr -m mips:isa32r2} tlslib-o32.d} {objdump -Rsj.got tlslib-o32-hidden.got}}
+ "tlslib-o32-hidden.so"}
+}
+
+if {[istarget mips*-*-linux*]} {
+ run_ld_link_tests $mips_tls_tests
+}
+