Commit | Line | Data |
---|---|---|
c1711530 | 1 | # Expect script for simple PE tests that require the just-built binutils only. |
aa820537 | 2 | # Copyright 2004, 2005, 2006, 2007, 2009 |
d127ecce AM |
3 | # Free Software Foundation, Inc. |
4 | # | |
5 | # This file is part of the GNU Binutils. | |
6 | # | |
7 | # This program is free software; you can redistribute it and/or modify | |
8 | # it under the terms of the GNU General Public License as published by | |
9 | # the Free Software Foundation; either version 3 of the License, or | |
10 | # (at your option) any later version. | |
11 | # | |
12 | # This program is distributed in the hope that it will be useful, | |
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | # GNU General Public License for more details. | |
16 | # | |
17 | # You should have received a copy of the GNU General Public License | |
18 | # along with this program; if not, write to the Free Software | |
19 | # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, | |
20 | # MA 02110-1301, USA. | |
21 | # | |
22 | ||
23 | # These tests can only be run on PE/COFF platforms. | |
24 | if {![is_pecoff_format]} { | |
25 | return | |
26 | } | |
27 | ||
28 | # This test can only be run on PE/COFF platforms that support .secrel32. | |
29 | if {[istarget i*86-*-cygwin*] | |
30 | || [istarget i*86-*-pe] | |
31 | || [istarget i*86-*-mingw*] | |
32 | || [istarget x86_64-*-mingw*] | |
33 | || [istarget arm-wince-pe] } { | |
34 | ||
35 | if {[istarget x86_64-*-mingw*] } { | |
36 | set pe_tests { | |
897aea50 | 37 | {".secrel32" "" "" "" {secrel1.s secrel2.s} |
177b81d6 | 38 | {{objdump -s secrel_64.d}} "secrel.x"} |
897aea50 | 39 | {"Empty export table" "" "" "" "exports.s" |
177b81d6 | 40 | {{objdump -p exports64.d}} "exports.dll"} |
897aea50 | 41 | {"TLS directory entry" "" "" "" "tlssec.s" |
c91a930c | 42 | {{objdump -p tlssec64.d}} "tlssec.dll"} |
d127ecce AM |
43 | } |
44 | } elseif {[istarget i*86-*-cygwin*] } { | |
45 | set pe_tests { | |
897aea50 | 46 | {".secrel32" "--disable-auto-import" "" "" {secrel1.s secrel2.s} |
d127ecce | 47 | {{objdump -s secrel.d}} "secrel.x"} |
897aea50 | 48 | {"Empty export table" "" "" "" "exports.s" |
177b81d6 | 49 | {{objdump -p exports.d}} "exports.dll"} |
897aea50 | 50 | {"TLS directory entry" "" "" "" "tlssec.s" |
c91a930c | 51 | {{objdump -p tlssec32.d}} "tlssec.dll"} |
d127ecce AM |
52 | } |
53 | } else { | |
54 | set pe_tests { | |
897aea50 | 55 | {".secrel32" "" "" "" {secrel1.s secrel2.s} |
d127ecce | 56 | {{objdump -s secrel.d}} "secrel.x"} |
897aea50 | 57 | {"Empty export table" "" "" "" "exports.s" |
177b81d6 | 58 | {{objdump -p exports.d}} "exports.dll"} |
897aea50 | 59 | {"TLS directory entry" "" "" "" "tlssec.s" |
c91a930c | 60 | {{objdump -p tlssec32.d}} "tlssec.dll"} |
d127ecce AM |
61 | } |
62 | } | |
63 | ||
64 | run_ld_link_tests $pe_tests | |
65 | } | |
66 | ||
67 | run_dump_test "image_size" | |
68 | run_dump_test "export_dynamic_warning" | |
69 | ||
70 | run_dump_test "longsecn" | |
71 | run_dump_test "longsecn-1" | |
72 | run_dump_test "longsecn-2" | |
73 | run_dump_test "longsecn-3" | |
74 | run_dump_test "longsecn-4" | |
75 | run_dump_test "longsecn-5" | |
76 | ||
77 | run_dump_test "orphan" | |
c51297b4 | 78 | run_dump_test "orphan_nu" |
05056a8d | 79 | |
72b016b4 NC |
80 | if {[istarget x86_64-*-mingw*] } { |
81 | run_dump_test "cfi" | |
82 | } elseif {[istarget i*86-*-cygwin*] || [istarget i*86-*-mingw*] } { | |
83 | run_dump_test "cfi32" | |
84 | } | |
85 | ||
05056a8d | 86 | set foreign_sym_test { |
897aea50 | 87 | {"non-C aligned common" "" "" "" {non-c-lang-syms.s} |
05056a8d DK |
88 | {{nm -C non-c-lang-syms.d}} "non-c-lang-syms.x"} |
89 | } | |
90 | ||
91 | run_ld_link_tests $foreign_sym_test |