diff options
Diffstat (limited to 'ld/testsuite/ld-scripts/phdrs.exp')
-rw-r--r-- | ld/testsuite/ld-scripts/phdrs.exp | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/ld/testsuite/ld-scripts/phdrs.exp b/ld/testsuite/ld-scripts/phdrs.exp index 7901d79d39d..3bd7b819324 100644 --- a/ld/testsuite/ld-scripts/phdrs.exp +++ b/ld/testsuite/ld-scripts/phdrs.exp @@ -18,20 +18,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # PHDRS is only meaningful for ELF. -if { ![istarget *-*-sysv4*] \ - && ![istarget *-*-unixware*] \ - && ![istarget *-*-elf*] \ - && ![istarget *-*-eabi*] \ - && ![istarget hppa*64*-*-hpux*] \ - && ![istarget *-*-linux*] \ - && ![istarget *-*-irix5*] \ - && ![istarget *-*-irix6*] \ - && ![istarget *-*-solaris2*] } { - return -} - -if { [istarget *-*-linux*aout*] \ - || [istarget *-*-linux*oldld*] } { +if ![is_elf_format] { return } @@ -48,11 +35,8 @@ set phdrs_regexp \ ".*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*-*-*"] - || [istarget "s390x*-*-*"] || [istarget "sparc64*-*-*"] - || [istarget "powerpc64*-*-*"] || [istarget "*-*-*elf64*"] } then { - set phdrs_regexp \ +if [is_elf64 tmpdir/phdrs.o] { + set phdrs_regexp \ ".*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-.*" } |