Support building gold with gcc 4.2/4.3.
[deliverable/binutils-gdb.git] / gold / testsuite / memory_test.sh
CommitLineData
7f8cd844
NC
1#!/bin/sh
2
3# memory_test.sh -- test MEMORY regions.
4
5# Copyright 2010 Free Software Foundation, Inc.
6# Written by Nick Clifton <nickc@redhat.com>
7
8# This file is part of gold.
9
10# This program is free software; you can redistribute it and/or modify
11# it under the terms of the GNU General Public License as published by
12# the Free Software Foundation; either version 3 of the License, or
13# (at your option) any later version.
14
15# This program is distributed in the hope that it will be useful,
16# but WITHOUT ANY WARRANTY; without even the implied warranty of
17# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18# GNU General Public License for more details.
19
20# You should have received a copy of the GNU General Public License
21# along with this program; if not, write to the Free Software
22# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
23# MA 02110-1301, USA.
24
25
26check()
27{
28 file=$1
29 pattern=$2
30 found=`grep "$pattern" $file`
31 if test -z "$found"; then
32 echo "pattern \"$pattern\" not found in file $file."
33 echo $found
34 exit 1
35 fi
36}
37
38check memory_test.stdout \
41a8542a 39 " LOAD 0x001000 0x0*00000000 0x0*00000000 0x00000\?2 0x00000\?2 R 0x1000"
7f8cd844 40check memory_test.stdout \
41a8542a 41 " LOAD 0x00112c 0x0*00001000 0x0*0000012c 0x00000\?2 0x00000\?2 R 0x1000"
7f8cd844 42check memory_test.stdout \
41a8542a 43 " LOAD 0x002000 0x0*00005000 0x0*00005000 0x00000\?2 0x00000\?2 R 0x1000"
7f8cd844 44check memory_test.stdout \
41a8542a 45 " LOAD 0x00203c 0x0*00004000 0x0*0000603c 0x0000\?2a 0x0000\?2a R E 0x1000"
7f8cd844
NC
46
47
48exit 0
This page took 0.024847 seconds and 4 git commands to generate.