diff options
Diffstat (limited to 'binutils/testsuite/binutils-all/readelf.exp')
-rw-r--r-- | binutils/testsuite/binutils-all/readelf.exp | 46 |
1 files changed, 33 insertions, 13 deletions
diff --git a/binutils/testsuite/binutils-all/readelf.exp b/binutils/testsuite/binutils-all/readelf.exp index 58e140cc964..59fd556deb4 100644 --- a/binutils/testsuite/binutils-all/readelf.exp +++ b/binutils/testsuite/binutils-all/readelf.exp @@ -346,29 +346,49 @@ readelf_dump_test if {![binutils_assemble $srcdir/$subdir/version.s tmpdir/version.o]} then { perror "could not assemble version note test file" unresolved "readelf - failed to assemble" - return -} - -if ![is_remote host] { - set tempfile tmpdir/version.o + fail "readelf -n" } else { - set tempfile [remote_download host tmpdir/version.o] + + if ![is_remote host] { + set tempfile tmpdir/version.o + } else { + set tempfile [remote_download host tmpdir/version.o] + } + + readelf_test -n $tempfile readelf.n {} } -readelf_test -n $tempfile readelf.n {} # PR 18374 - Check that relocations against the .debug_loc section # do not prevent readelf from displaying all the location lists. if {![binutils_assemble $srcdir/$subdir/pr18374.s tmpdir/pr18374.o]} then { perror "could not assemble PR18374 test file" unresolved "readelf - failed to assemble" - return + fail "readelf --debug-loc" +} else { + + if ![is_remote host] { + set tempfile tmpdir/pr18374.o + } else { + set tempfile [remote_download host tmpdir/pr18374.o] + } + + readelf_test --debug-dump=loc $tempfile readelf.pr18374 {} } -if ![is_remote host] { - set tempfile tmpdir/pr18374.o + +# Check that decompressed dumps work. +if {![binutils_assemble $srcdir/$subdir/z.s tmpdir/z.o]} then { + perror "could not assemble decompress dump test file" + unresolved "readelf - failed to assemble" + fail "readelf -z" } else { - set tempfile [remote_download host tmpdir/pr18374.o] -} -readelf_test --debug-dump=loc $tempfile readelf.pr18374 {} + if ![is_remote host] { + set tempfile tmpdir/z.o + } else { + set tempfile [remote_download host tmpdir/z.o] + } + + readelf_test {--decompress --hex-dump .debug_loc} $tempfile readelf.z {} +} |