* ld-scripts/map-address.exp: New test.

* ld-scripts/map-address.[td]: New files for it.
This commit is contained in:
Richard Sandiford 2002-04-30 09:23:14 +00:00
parent 7b17f854f7
commit 33a301baa7
4 changed files with 61 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2002-04-30 Richard Sandiford <rsandifo@redhat.com>
* ld-scripts/map-address.exp: New test.
* ld-scripts/map-address.[td]: New files for it.
2002-04-19 Richard Henderson <rth@redhat.com>
* ld-elfvsb/elfvsb.exp: Mirror ia64 non-pic xfails for alpha.

View File

@ -0,0 +1,10 @@
#...
Linker script and memory map
*0x0*010001 *\. = 0x10001
*0x0*010001 *foo = \.
*0x0*010201 *\. = \(\. \+ 0x200\)
*0x0*010201 *bar = \.
*0x0*010204 *\. = ALIGN \(0x4\)
*0x0*010204 *frob = \.
#pass

View File

@ -0,0 +1,37 @@
# Test address printed by --print-map
# Copyright 2002 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
set testname "map addresses"
# The source file doesn't matter. Pinch one from the sizeof test.
if ![ld_assemble $as $srcdir/$subdir/sizeof.s tmpdir/map-address.o] {
unresolved $testname
return
}
if ![ld_simple_link $ld tmpdir/map-address \
"-T $srcdir/$subdir/map-address.t \
tmpdir/map-address.o \
-Map tmpdir/map-address.map"] {
fail $testname
} elseif [regexp_diff \
"tmpdir/map-address.map" \
"$srcdir/$subdir/map-address.d"] {
fail $testname
} else {
pass $testname
}

View File

@ -0,0 +1,9 @@
SECTIONS
{
. = 0x10001;
foo = .;
. += 0x200;
bar = .;
. = ALIGN (4);
frob = .;
}