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 | ||
19 | if { [istarget mips*-*-*] } then { | |
7d6c7577 | 20 | set has_newabi [expr [istarget *-*-irix6*] || [istarget mips64*-*-linux*]] |
a657e7c1 | 21 | |
30a2f863 | 22 | set elf [expr [istarget mips*-*-elf] || [istarget mips*-*-linux*] || \ |
493e6a13 | 23 | [istarget mips*-*-netbsd*] || [istarget mips*-*-irix*]] |
48fe7bda | 24 | set linux_gnu [expr [istarget mips*-*-linux*]] |
30a2f863 CD |
25 | set embedded_elf [expr [istarget mips*-*-elf]] |
26 | ||
27 | ||
28 | if { $elf } { | |
29 | # Check MIPS16 markings being passed through link. | |
30 | run_dump_test "mips16-1" | |
31 | ||
32 | # MIPS branch offset final link checking. | |
33 | run_dump_test "branch-misc-1" | |
8914585c AO |
34 | |
35 | # Test multi-got link. | |
36 | run_dump_test "multi-got-1" | |
05e6bb2f | 37 | |
7d6c7577 AO |
38 | if $has_newabi { |
39 | run_dump_test "elf-rel-got-n32" | |
40 | run_dump_test "elf-rel-xgot-n32" | |
31a1f3a1 TS |
41 | if { $linux_gnu } { |
42 | run_dump_test "elf-rel-got-n64-linux" | |
43 | run_dump_test "elf-rel-xgot-n64-linux" | |
44 | } else { | |
45 | run_dump_test "elf-rel-got-n64" | |
46 | run_dump_test "elf-rel-xgot-n64" | |
47 | } | |
7d6c7577 AO |
48 | |
49 | run_dump_test "relax-jalr-n32" | |
50 | run_dump_test "relax-jalr-n32-shared" | |
51 | run_dump_test "relax-jalr-n64" | |
52 | run_dump_test "relax-jalr-n64-shared" | |
53 | } | |
30a2f863 CD |
54 | } |
55 | ||
48fe7bda AO |
56 | if { $linux_gnu } { |
57 | run_dump_test "rel32-o32" | |
58 | run_dump_test "rel32-n32" | |
59 | run_dump_test "rel64" | |
60 | } | |
61 | ||
62 | ||
30a2f863 CD |
63 | if { $embedded_elf } { |
64 | # Check basic Embedded-PIC PC-relative HI/LO relocs. | |
a657e7c1 CD |
65 | run_dump_test "empic1-ln" |
66 | run_dump_test "empic1-lp" | |
67 | run_dump_test "empic1-mn" | |
68 | run_dump_test "empic1-mp" | |
69 | run_dump_test "empic1-sn" | |
70 | run_dump_test "empic1-sp" | |
71 | ||
30a2f863 | 72 | # Embedded-PIC PC-relative HI/LO reloc edge-case regression tests. |
a657e7c1 CD |
73 | # As of 2001-12-26, the linker botches the fwd-0 and rev-1 tests. |
74 | run_dump_test "empic2-fwd-0" | |
75 | run_dump_test "empic2-fwd-1" | |
76 | run_dump_test "empic2-rev-0" | |
77 | run_dump_test "empic2-rev-1" | |
38b566ae CD |
78 | |
79 | # Check generation of embedded relocs section. | |
80 | run_dump_test "emrelocs-eb" | |
81 | run_dump_test "emrelocs-el" | |
e560f274 RS |
82 | |
83 | run_dump_test "region1" | |
a657e7c1 CD |
84 | } |
85 | } |