# HG changeset patch # Parent e14997fb39fef9321579ba4ac0f8f19f5e1bfdd5 ld: testsuite: Check target in libgot tests diff --git a/ld/testsuite/ld-i386/binutils.exp b/ld/testsuite/ld-i386/binutils.exp --- a/ld/testsuite/ld-i386/binutils.exp +++ b/ld/testsuite/ld-i386/binutils.exp @@ -27,20 +27,16 @@ if { ![istarget "i?86-*-*"] && ![istarge return } -# Tests here need -melf_i386 support. -set status [catch "exec $LD -V -melf_i386" got] -if { $status == 0 } { - run_ld_link_tests [list \ - [list \ - "Build libgot-1-i386.so" \ - "-shared -melf_i386 --no-ld-generated-unwind-info \ - -z noseparate-code -z max-page-size=0x200000 \ - --rosegment --hash-style=sysv $NO_DT_RELR_LDFLAGS" \ - "" \ - "--32 -mx86-used-note=no --generate-missing-build-notes=no" \ - {got-1.s} \ - {{readelf {-rW --got-contents} libgot-1.rd}} \ - "libgot-1-i386.so" \ - ] \ - ] -} +run_ld_link_tests [list \ + [list \ + "Build libgot-1-i386.so" \ + "-shared -melf_i386 --no-ld-generated-unwind-info \ + -z noseparate-code -z max-page-size=0x200000 \ + --rosegment --hash-style=sysv $NO_DT_RELR_LDFLAGS" \ + "" \ + "--32 -mx86-used-note=no --generate-missing-build-notes=no" \ + {got-1.s} \ + {{readelf {-rW --got-contents} libgot-1.rd}} \ + "libgot-1-i386.so" \ + ] \ +] diff --git a/ld/testsuite/ld-x86-64/binutils.exp b/ld/testsuite/ld-x86-64/binutils.exp --- a/ld/testsuite/ld-x86-64/binutils.exp +++ b/ld/testsuite/ld-x86-64/binutils.exp @@ -27,28 +27,23 @@ if { ![istarget "x86_64-*-*"] } { return } -# Tests here need -melf_x86_64 support. -set status [catch "exec $LD -V -melf_x86_64" got] -if { $status == 0 } { - run_ld_link_tests [list \ - [list \ - "Build libgot-1-x64.so" \ - "-shared -melf_x86_64 --no-ld-generated-unwind-info \ - -z noseparate-code -z max-page-size=0x200000 \ - --hash-style=sysv -z nomark-plt $NO_DT_RELR_LDFLAGS \ - --rosegment" \ - "" \ - "--64 -mx86-used-note=no --generate-missing-build-notes=no" \ - {got-1.s} \ - {{readelf {-rW --got-contents} libgot-1.rd}} \ - "libgot-1-x64.so" \ - ] \ - ] -} +run_ld_link_tests [list \ + [list \ + "Build libgot-1-x64.so" \ + "-shared -melf_x86_64 --no-ld-generated-unwind-info \ + -z noseparate-code -z max-page-size=0x200000 \ + --hash-style=sysv -z nomark-plt $NO_DT_RELR_LDFLAGS \ + --rosegment" \ + "" \ + "--64 -mx86-used-note=no --generate-missing-build-notes=no" \ + {got-1.s} \ + {{readelf {-rW --got-contents} libgot-1.rd}} \ + "libgot-1-x64.so" \ + ] \ +] -# Tests here need -melf32_x86_64 support. -set status [catch "exec $LD -V -melf32_x86_64" got] -if { $status == 0 } { +# Tests here need x32 support. +if { [istarget "x86_64-*-linux*"] } { run_ld_link_tests [list \ [list \ "Build libgot-1-x32.so" \