Commit | Line | Data |
---|---|---|
a657e7c1 | 1 | # Expect script for MIPS ELF linker tests |
48fe7bda | 2 | # Copyright 2002, 2003 Free Software Foundation, Inc. |
a657e7c1 CD |
3 | # |
4 | # This file is free software; you can redistribute it and/or modify | |
5 | # it under the terms of the GNU General Public License as published by | |
6 | # the Free Software Foundation; either version 2 of the License, or | |
7 | # (at your option) any later version. | |
8 | # | |
9 | # This program is distributed in the hope that it will be useful, | |
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | # GNU General Public License for more details. | |
13 | # | |
14 | # You should have received a copy of the GNU General Public License | |
15 | # along with this program; if not, write to the Free Software | |
16 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
17 | # | |
18 | ||
fbf18a5c TS |
19 | if {![istarget mips*-*-*] || ![is_elf_format]} { |
20 | return | |
21 | } | |
30a2f863 | 22 | |
fbf18a5c TS |
23 | set has_newabi [expr [istarget *-*-irix6*] || [istarget mips64*-*-linux*]] |
24 | set linux_gnu [expr [istarget mips*-*-linux*]] | |
25 | set embedded_elf [expr [istarget mips*-*-elf]] | |
30a2f863 | 26 | |
30a2f863 | 27 | |
fbf18a5c TS |
28 | # Check MIPS16 markings being passed through link. |
29 | run_dump_test "mips16-1" | |
8914585c | 30 | |
fbf18a5c TS |
31 | # MIPS branch offset final link checking. |
32 | run_dump_test "branch-misc-1" | |
7d6c7577 | 33 | |
732be173 DJ |
34 | # Test multi-got link. We only do this on GNU/Linux because it requires |
35 | # the "traditional" emulations. | |
36 | if { $linux_gnu } { | |
37 | run_dump_test "multi-got-1" | |
38 | } | |
30a2f863 | 39 | |
fbf18a5c TS |
40 | if $has_newabi { |
41 | run_dump_test "elf-rel-got-n32" | |
42 | run_dump_test "elf-rel-xgot-n32" | |
48fe7bda | 43 | if { $linux_gnu } { |
fbf18a5c TS |
44 | run_dump_test "elf-rel-got-n64-linux" |
45 | run_dump_test "elf-rel-xgot-n64-linux" | |
46 | } else { | |
47 | run_dump_test "elf-rel-got-n64" | |
48 | run_dump_test "elf-rel-xgot-n64" | |
48fe7bda AO |
49 | } |
50 | ||
fbf18a5c TS |
51 | run_dump_test "relax-jalr-n32" |
52 | run_dump_test "relax-jalr-n32-shared" | |
53 | run_dump_test "relax-jalr-n64" | |
54 | run_dump_test "relax-jalr-n64-shared" | |
55 | } | |
48fe7bda | 56 | |
fbf18a5c TS |
57 | if { $linux_gnu } { |
58 | run_dump_test "rel32-o32" | |
59 | run_dump_test "rel32-n32" | |
60 | run_dump_test "rel64" | |
61 | } | |
a657e7c1 | 62 | |
fbf18a5c | 63 | if { $embedded_elf } { |
fbf18a5c | 64 | run_dump_test "region1" |
a657e7c1 | 65 | } |
18ab1921 RS |
66 | |
67 | if $embedded_elf { | |
68 | # This could work on other targets too, but would need the appropriate | |
69 | # ld -m switch. | |
70 | run_dump_test "reloc-1-rel" | |
71 | } | |
72 | if $has_newabi { | |
73 | run_dump_test "reloc-1-n32" | |
74 | if $linux_gnu { | |
75 | # Uses a linux-specific ld -m switch | |
76 | run_dump_test "reloc-1-n64" | |
77 | } | |
78 | } | |
79 | run_dump_test "reloc-2" | |
17a6716a | 80 | run_dump_test "reloc-merge-lo16" |
353057a5 RS |
81 | if {$has_newabi && $linux_gnu} { |
82 | run_dump_test "eh-frame1-n32" | |
83 | run_dump_test "eh-frame1-n64" | |
dcf507a6 RS |
84 | run_dump_test "eh-frame2-n32" |
85 | run_dump_test "eh-frame2-n64" | |
353057a5 | 86 | } |
8c946ed5 RS |
87 | if {$embedded_elf} { |
88 | run_dump_test "eh-frame3" | |
89 | run_dump_test "eh-frame4" | |
90 | } | |
0efd4160 ILT |
91 | |
92 | run_dump_test "jaloverflow" | |
c314987d | 93 | run_dump_test "jaloverflow-2" |
1f0f3e9b RS |
94 | if {$has_newabi} { |
95 | run_dump_test "jalbal" | |
96 | } | |
d6f16593 MR |
97 | |
98 | run_dump_test "mips16-hilo" | |
99 | if {$has_newabi} { | |
100 | run_dump_test "mips16-hilo-n32" | |
101 | } |