1 # Test ALIGN in a linker script.
2 # By Nathan Sidwell, CodeSourcery LLC
3 # Copyright 2004, 2005, 2006, 2007
4 # Free Software Foundation, Inc.
6 # This file is part of the GNU Binutils.
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 3 of the License, or
11 # (at your option) any later version.
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
23 if [istarget "rs6000-*-aix*"] {
24 # Target maps .text and .data to other sections.
30 if ![ld_assemble $as $srcdir/$subdir/align.s tmpdir/align.o] {
35 # mingw on x86_64 targets need to set the image base to 0 to avoid auto image-basing.
37 set saved_LDFLAGS "$LDFLAGS"
38 if [istarget "x86_64-*-mingw*"] then {
39 set LDFLAGS "$LDFLAGS --image-base 0"
42 if ![ld_simple_link $ld tmpdir/align "$LDFLAGS -T $srcdir/$subdir/align.t tmpdir/align.o"] {
48 if ![is_aout_format] {
49 # The z80-coff port defaults to a "binary" like output
50 # file format which does not include a data section.
51 setup_xfail "z80-*-coff"
53 setup_xfail "z80-*-coff"
57 set LDFLAGS "$saved_LDFLAGS"