From 7f9adacd07adbcfd99db1f65160643a1c8b45ffd Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 1 May 2001 08:07:35 +0000 Subject: [PATCH] * ld-scripts/phdrs.exp: Fix regexp, s390x is 64 bit platform. * ld-scripts/phdrs.t: Use startaddress that's greater than any MAXPAGESIZE used. --- ld/testsuite/ChangeLog | 7 +++++++ ld/testsuite/ld-scripts/phdrs.exp | 11 ++++++----- ld/testsuite/ld-scripts/phdrs.t | 4 +++- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index f0e15ed1e23..665b3cea7f5 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2001-05-01 Andreas Jaeger , Andreas Schwab + + * ld-scripts/phdrs.exp: Fix regexp, s390x is 64 bit platform. + + * ld-scripts/phdrs.t: Use startaddress that's greater than any + MAXPAGESIZE used. + 2001-04-29 H.J. Lu * ld-shared/symbolic.dat: New. diff --git a/ld/testsuite/ld-scripts/phdrs.exp b/ld/testsuite/ld-scripts/phdrs.exp index f0bc1ad5489..fe06d141880 100644 --- a/ld/testsuite/ld-scripts/phdrs.exp +++ b/ld/testsuite/ld-scripts/phdrs.exp @@ -7,12 +7,12 @@ # 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. @@ -44,13 +44,14 @@ if ![ld_assemble $as $srcdir/$subdir/phdrs.s tmpdir/phdrs.o] { } set phdrs_regexp \ -".*Program Header:.*PHDR *off *0x00*34 *vaddr *0x00*80034 *paddr *0x00*80034.*filesz *0x0\[0-9a-f\]* *memsz *0x0\[0-9a-f\]* flags r--.*LOAD *off *0x00* *vaddr *0x00*80000 *paddr *0x00*80000.*filesz *0x00*\[0-9a-f\]* *memsz *0x0\[0-9a-f\]* *flags r-x.*LOAD *off *0x0\[0-9a-f\]* *vaddr *0x00*80*\[0-9a-f\]* *paddr *0x00*80*\[0-9a-f\]*.*filesz *0x0\[0-9a-f\]* *memsz *0x0\[0-9a-f\]* *flags *rw-.*" +".*Program Header:.*PHDR *off *0x00*34 *vaddr *0x00*800034 *paddr *0x00*800034.*filesz *0x0\[0-9a-f\]* *memsz *0x0\[0-9a-f\]* flags r--.*LOAD *off *0x00* *vaddr *0x00*800000 *paddr *0x00*800000.*filesz *0x00*\[0-9a-f\]* *memsz *0x0\[0-9a-f\]* *flags r-x.*LOAD *off *0x0\[0-9a-f\]* *vaddr *0x00*80*\[0-9a-f\]* *paddr *0x00*80*\[0-9a-f\]*.*filesz *0x0\[0-9a-f\]* *memsz *0x0\[0-9a-f\]* *flags *rw-.*" # On a 64 bit ELF format, we need different numbers. if { [istarget alpha*-*-*] || [istarget "ia64*-*-*"] - || [istarget "hppa*64*-*-*"] || [istarget "x86_64*-*-*"] } then { + || [istarget "hppa*64*-*-*"] || [istarget "x86_64*-*-*"] + || [istarget "s390x*-*-*"]} then { set phdrs_regexp \ -".*Program Header:.*PHDR *off *0x00*40 *vaddr *0x00*80040 *paddr *0x00*80040.*filesz *0x0\[0-9a-f\]* *memsz *0x0\[0-9a-f\]* flags r--.*LOAD *off *0x00* *vaddr *0x00*80000 *paddr *0x00*80000.*filesz *0x00*\[0-9a-f\]* *memsz *0x0\[0-9a-f\]* *flags r-x.*LOAD *off *0x0\[0-9a-f\]* *vaddr *0x00*80*\[0-9a-f\]* *paddr *0x00*80*\[0-9a-f\]*.*filesz *0x0\[0-9a-f\]* *memsz *0x0\[0-9a-f\]* *flags *rw-.*" +".*Program Header:.*PHDR *off *0x00*40 *vaddr *0x00*800040 *paddr *0x00*800040.*filesz *0x0\[0-9a-f\]* *memsz *0x0\[0-9a-f\]* flags r--.*LOAD *off *0x00* *vaddr *0x00*800000 *paddr *0x00*800000.*filesz *0x00*\[0-9a-f\]* *memsz *0x0\[0-9a-f\]* *flags r-x.*LOAD *off *0x0\[0-9a-f\]* *vaddr *0x00*80*\[0-9a-f\]* *paddr *0x00*80*\[0-9a-f\]*.*filesz *0x0\[0-9a-f\]* *memsz *0x0\[0-9a-f\]* *flags *rw-.*" } if ![ld_simple_link $ld tmpdir/phdrs "-T $srcdir/$subdir/phdrs.t tmpdir/phdrs.o"] { diff --git a/ld/testsuite/ld-scripts/phdrs.t b/ld/testsuite/ld-scripts/phdrs.t index 243dfb10bc3..283e30c6799 100644 --- a/ld/testsuite/ld-scripts/phdrs.t +++ b/ld/testsuite/ld-scripts/phdrs.t @@ -7,7 +7,9 @@ PHDRS SECTIONS { - . = 0x80000 + SIZEOF_HEADERS; + /* This test will fail on architectures where the startaddress below + is less than the constant MAXPAGESIZE. */ + . = 0x800000 + SIZEOF_HEADERS; .text : { *(.text) } :text .data : { *(.data) } :data /DISCARD/ : { *(.*) } -- 2.30.2