bfd: don't silently wrap or truncate PE image section RVAs
[deliverable/binutils-gdb.git] / ld / testsuite / ld-scripts / print-memory-usage.exp
CommitLineData
3604cb1f
TG
1# Test --print-memory-usage linker functionality
2# By Tristan Gingold, AdaCore
250d07de 3# Copyright (C) 2015-2021 Free Software Foundation, Inc.
3604cb1f
TG
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# Mips adds MIPS.abiflags section.
23# Spu, pdp11 memory is too small.
24# Tic30 needs a special linker script.
25# Tic54x interpret space values in bits.
26# XCOFF has garbage collection
27if { [istarget mips*-*-*]
28 || [istarget spu*-*-*]
29 || [istarget pdp11*-*-*]
30 || [istarget tic30*-*-*]
31 || [istarget tic54x*-*-*]
7193487f 32 || [is_xcoff_format] } {
3604cb1f
TG
33 return
34}
35
87fa7d56
JB
36set old_LDFLAGS $LDFLAGS
37if { [is_pecoff_format] } {
38 set LDFLAGS "$LDFLAGS --image-base 0"
39}
40
3604cb1f
TG
41run_ld_link_tests {
42 {
43 "print-memory-usage-1"
44 "-T print-memory-usage-1.t -T print-memory-usage.t --print-memory-usage"
45 ""
46 ""
47 { "print-memory-usage-1.s" }
48 { { ld "print-memory-usage-1.l" } }
49 "print-memory-usage-1"
50 }
51
52 {
53 "print-memory-usage-2"
54 "-T print-memory-usage-2.t --print-memory-usage"
55 ""
56 ""
57 { "print-memory-usage-1.s" }
58 { { ld "print-memory-usage-2.l" } }
59 "print-memory-usage-2"
60 }
61
62 {
63 "print-memory-usage-3"
64 "-T print-memory-usage-3.t -T print-memory-usage.t --print-memory-usage"
65 ""
66 ""
67 { "print-memory-usage-3.s" }
68 { { ld "print-memory-usage-3.l" } }
69 "print-memory-usage-3"
70 }
71
72}
73
87fa7d56 74set LDFLAGS $old_LDFLAGS
This page took 0.287756 seconds and 4 git commands to generate.