]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - ld/testsuite/ld-pe/pe.exp
gdb/
[thirdparty/binutils-gdb.git] / ld / testsuite / ld-pe / pe.exp
CommitLineData
d127ecce
AM
1# Expect script for export table in executables tests
2# Copyright 2004, 2006, 2007
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.
24if {![is_pecoff_format]} {
25 return
26}
27
28# This test can only be run on PE/COFF platforms that support .secrel32.
29if {[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 {
37 {".secrel32" "" "" {secrel1.s secrel2.s}
177b81d6
DK
38 {{objdump -s secrel_64.d}} "secrel.x"}
39 {"Empty export table" "" "" "exports.s"
40 {{objdump -p exports64.d}} "exports.dll"}
d127ecce
AM
41 }
42 } elseif {[istarget i*86-*-cygwin*] } {
43 set pe_tests {
44 {".secrel32" "--disable-auto-import" "" {secrel1.s secrel2.s}
45 {{objdump -s secrel.d}} "secrel.x"}
177b81d6
DK
46 {"Empty export table" "" "" "exports.s"
47 {{objdump -p exports.d}} "exports.dll"}
d127ecce
AM
48 }
49 } else {
50 set pe_tests {
51 {".secrel32" "" "" {secrel1.s secrel2.s}
52 {{objdump -s secrel.d}} "secrel.x"}
177b81d6
DK
53 {"Empty export table" "" "" "exports.s"
54 {{objdump -p exports.d}} "exports.dll"}
d127ecce
AM
55 }
56 }
57
58 run_ld_link_tests $pe_tests
59}
60
61run_dump_test "image_size"
62run_dump_test "export_dynamic_warning"
63
64run_dump_test "longsecn"
65run_dump_test "longsecn-1"
66run_dump_test "longsecn-2"
67run_dump_test "longsecn-3"
68run_dump_test "longsecn-4"
69run_dump_test "longsecn-5"
70
71run_dump_test "orphan"