]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - binutils/testsuite/binutils-all/readelf.exp
Add a testcase for PR binutils/26112
[thirdparty/binutils-gdb.git] / binutils / testsuite / binutils-all / readelf.exp
index cc78e66ea3cd9fe717bd845841d9e10ab2717e6b..cb924317bcc8ca4e9d15f7ee9cd7a6ae9c9215c3 100644 (file)
@@ -506,4 +506,28 @@ if {![binutils_assemble $srcdir/$subdir/dwo.s tmpdir/dwo.o]} then {
     readelf_test {--debug-dump=links} $tempfile readelf.k2  {}
 }
 
+if {![binutils_assemble $srcdir/$subdir/zero-sec.s tmpdir/zero-sec.o]} then {
+    unresolved "readelf --enable-checks (failed to assemble zero-sec.s)"
+} else {
+    if ![is_remote host] {
+       set tempfile tmpdir/zero-sec.o
+    } else {
+       set tempfile [remote_download host tmpdir/zero-sec.o]
+    }
+
+    readelf_test {--enable-checks --sections --wide} $tempfile zero-sec.r {}
+}
 
+if ![is_remote host] {
+    set test $srcdir/$subdir/pr26112.o.bz2
+    # We need to strip the ".bz2", but can leave the dirname.
+    set t $subdir/[file tail $test]
+    set testname [file rootname $t]
+    verbose $testname
+    set tempfile tmpdir/pr26112.o
+    if {[catch "system \"bzip2 -dc $test > $tempfile\""] != 0} {
+       untested "bzip2 -dc ($testname)"
+    } else {
+       readelf_test {--debug-dump=macro} $tempfile pr26112.r {}
+    }
+}